net/ipv4/gre_demux.c
Source file repositories/reference/linux-study-clean/net/ipv4/gre_demux.c
File Facts
- System
- Linux kernel
- Corpus path
net/ipv4/gre_demux.c- Extension
.c- Size
- 5089 bytes
- Lines
- 226
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/if.hlinux/icmp.hlinux/kernel.hlinux/kmod.hlinux/skbuff.hlinux/in.hlinux/ip.hlinux/netdevice.hlinux/if_tunnel.hlinux/spinlock.hnet/protocol.hnet/gre.hnet/erspan.hnet/icmp.hnet/route.hnet/xfrm.h
Detected Declarations
function gre_add_protocolfunction gre_del_protocolfunction pskb_may_pullfunction gre_rcvfunction gre_errfunction gre_initfunction gre_exitmodule init gre_initexport gre_add_protocolexport gre_del_protocolexport gre_parse_header
Annotated Snippet
module_init(gre_init);
module_exit(gre_exit);
MODULE_DESCRIPTION("GRE over IPv4 demultiplexer driver");
MODULE_AUTHOR("D. Kozlov <xeb@mail.ru>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/if.h`, `linux/icmp.h`, `linux/kernel.h`, `linux/kmod.h`, `linux/skbuff.h`, `linux/in.h`, `linux/ip.h`.
- Detected declarations: `function gre_add_protocol`, `function gre_del_protocol`, `function pskb_may_pull`, `function gre_rcv`, `function gre_err`, `function gre_init`, `function gre_exit`, `module init gre_init`, `export gre_add_protocol`, `export gre_del_protocol`.
- 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.