net/mpls/mpls_iptunnel.c
Source file repositories/reference/linux-study-clean/net/mpls/mpls_iptunnel.c
File Facts
- System
- Linux kernel
- Corpus path
net/mpls/mpls_iptunnel.c- Extension
.c- Size
- 7951 bytes
- Lines
- 304
- 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.
- 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/types.hlinux/skbuff.hlinux/net.hlinux/module.hlinux/mpls.hlinux/vmalloc.hnet/ip.hnet/dst.hnet/lwtunnel.hnet/netevent.hnet/netns/generic.hnet/ip6_fib.hnet/route.hnet/mpls_iptunnel.hlinux/mpls_iptunnel.hinternal.h
Detected Declarations
function mpls_encap_sizefunction mpls_xmitfunction mpls_build_statefunction mpls_fill_encap_infofunction mpls_encap_nlsizefunction mpls_encap_cmpfunction mpls_iptunnel_initfunction mpls_iptunnel_exitmodule init mpls_iptunnel_init
Annotated Snippet
module_init(mpls_iptunnel_init);
static void __exit mpls_iptunnel_exit(void)
{
lwtunnel_encap_del_ops(&mpls_iptun_ops, LWTUNNEL_ENCAP_MPLS);
}
module_exit(mpls_iptunnel_exit);
MODULE_ALIAS_RTNL_LWT(MPLS);
MODULE_SOFTDEP("post: mpls_gso");
MODULE_DESCRIPTION("MultiProtocol Label Switching IP Tunnels");
MODULE_LICENSE("GPL v2");
Annotation
- Immediate include surface: `linux/types.h`, `linux/skbuff.h`, `linux/net.h`, `linux/module.h`, `linux/mpls.h`, `linux/vmalloc.h`, `net/ip.h`, `net/dst.h`.
- Detected declarations: `function mpls_encap_size`, `function mpls_xmit`, `function mpls_build_state`, `function mpls_fill_encap_info`, `function mpls_encap_nlsize`, `function mpls_encap_cmp`, `function mpls_iptunnel_init`, `function mpls_iptunnel_exit`, `module init mpls_iptunnel_init`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration implementation candidate.
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.