net/l2tp/l2tp_core.c
Source file repositories/reference/linux-study-clean/net/l2tp/l2tp_core.c
File Facts
- System
- Linux kernel
- Corpus path
net/l2tp/l2tp_core.c- Extension
.c- Size
- 52556 bytes
- Lines
- 1955
- 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/string.hlinux/list.hlinux/rculist.hlinux/uaccess.hlinux/kernel.hlinux/spinlock.hlinux/kthread.hlinux/sched.hlinux/slab.hlinux/errno.hlinux/jiffies.hlinux/netdevice.hlinux/net.hlinux/inetdevice.hlinux/skbuff.hlinux/init.hlinux/in.hlinux/ip.hlinux/udp.hlinux/l2tp.hlinux/sort.hlinux/file.hlinux/nsproxy.hnet/net_namespace.hnet/netns/generic.hnet/dst.hnet/ip.hnet/udp.hnet/udp_tunnel.hnet/inet_common.hnet/xfrm.h
Detected Declarations
struct l2tp_skb_cbstruct l2tp_netfunction l2tp_v2_session_keyfunction l2tp_v3_session_hashkeyfunction l2tp_sk_is_v6function l2tp_tunnel_freefunction l2tp_session_freefunction l2tp_tunnel_putfunction l2tp_session_putfunction refcount_inc_not_zerofunction hash_for_each_possible_rcufunction hash_for_each_possible_rcufunction l2tp_session_coll_list_addfunction l2tp_session_collision_addfunction l2tp_session_collision_delfunction l2tp_session_registerfunction l2tp_recv_queue_skbfunction l2tp_recv_dequeue_skbfunction l2tp_recv_dequeuefunction l2tp_seq_check_rx_windowfunction l2tp_recv_data_seqfunction datafunction l2tp_session_queue_purgefunction l2tp_udp_encap_recvfunction l2tp_udp_encap_err_recvfunction l2tp_build_l2tpv2_headerfunction l2tp_build_l2tpv3_headerfunction l2tp_xmit_queuefunction l2tp_xmit_corefunction l2tp_xmit_skbfunction l2tp_session_unhashfunction l2tp_tunnel_closeallfunction l2tp_udp_encap_destroyfunction l2tp_tunnel_removefunction l2tp_tunnel_del_workfunction l2tp_tunnel_sock_createfunction l2tp_tunnel_createfunction l2tp_validate_socketfunction l2tp_tunnel_registerfunction l2tp_tunnel_deletefunction l2tp_session_deletefunction l2tp_session_del_workfunction l2tp_session_set_header_lenfunction l2tp_init_netfunction l2tp_pre_exit_netfunction l2tp_idr_item_unexpectedfunction l2tp_exit_netfunction l2tp_init
Annotated Snippet
module_init(l2tp_init);
module_exit(l2tp_exit);
MODULE_AUTHOR("James Chapman <jchapman@katalix.com>");
MODULE_DESCRIPTION("L2TP core");
MODULE_LICENSE("GPL");
MODULE_VERSION(L2TP_DRV_VERSION);
Annotation
- Immediate include surface: `linux/module.h`, `linux/string.h`, `linux/list.h`, `linux/rculist.h`, `linux/uaccess.h`, `linux/kernel.h`, `linux/spinlock.h`, `linux/kthread.h`.
- Detected declarations: `struct l2tp_skb_cb`, `struct l2tp_net`, `function l2tp_v2_session_key`, `function l2tp_v3_session_hashkey`, `function l2tp_sk_is_v6`, `function l2tp_tunnel_free`, `function l2tp_session_free`, `function l2tp_tunnel_put`, `function l2tp_session_put`, `function refcount_inc_not_zero`.
- 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.