net/can/gw.c
Source file repositories/reference/linux-study-clean/net/can/gw.c
File Facts
- System
- Linux kernel
- Corpus path
net/can/gw.c- Extension
.c- Size
- 35135 bytes
- Lines
- 1369
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/init.hlinux/types.hlinux/kernel.hlinux/list.hlinux/spinlock.hlinux/rcupdate.hlinux/rculist.hlinux/net.hlinux/netdevice.hlinux/if_arp.hlinux/skbuff.hlinux/can.hlinux/can/core.hlinux/can/skb.hlinux/can/gw.hnet/can.hnet/rtnetlink.hnet/net_namespace.hnet/sock.h
Detected Declarations
struct cf_modstruct can_can_gwstruct cgw_jobfunction mod_and_fddatafunction mod_or_fddatafunction mod_xor_fddatafunction mod_set_fddatafunction mod_retrieve_ccdlcfunction mod_store_ccdlcfunction mod_and_ccdlcfunction mod_or_ccdlcfunction mod_xor_ccdlcfunction mod_set_ccdlcfunction canframecpyfunction canfdframecpyfunction cgw_chk_csum_parmsfunction calc_idxfunction cgw_csum_xor_relfunction cgw_csum_xor_posfunction cgw_csum_xor_negfunction cgw_csum_crc8_relfunction cgw_csum_crc8_posfunction cgw_csum_crc8_negfunction can_can_gw_rcvfunction protectionfunction cgw_register_filterfunction cgw_unregister_filterfunction cgw_job_free_rcufunction cgw_notifierfunction hlist_for_each_entry_safefunction cgw_put_jobfunction cgw_dump_jobsfunction cgw_parse_attrfunction cgw_create_jobfunction hlist_for_each_entryfunction cgw_remove_all_jobsfunction hlist_for_each_entry_safefunction cgw_remove_jobfunction cangw_pernet_initfunction cangw_pernet_exit_batchfunction cgw_module_initfunction cgw_module_exitmodule init cgw_module_init
Annotated Snippet
module_init(cgw_module_init);
module_exit(cgw_module_exit);
Annotation
- Immediate include surface: `linux/module.h`, `linux/init.h`, `linux/types.h`, `linux/kernel.h`, `linux/list.h`, `linux/spinlock.h`, `linux/rcupdate.h`, `linux/rculist.h`.
- Detected declarations: `struct cf_mod`, `struct can_can_gw`, `struct cgw_job`, `function mod_and_fddata`, `function mod_or_fddata`, `function mod_xor_fddata`, `function mod_set_fddata`, `function mod_retrieve_ccdlc`, `function mod_store_ccdlc`, `function mod_and_ccdlc`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.