net/ipv4/esp4.c
Source file repositories/reference/linux-study-clean/net/ipv4/esp4.c
File Facts
- System
- Linux kernel
- Corpus path
net/ipv4/esp4.c- Extension
.c- Size
- 28144 bytes
- Lines
- 1219
- 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
crypto/aead.hcrypto/authenc.hlinux/err.hlinux/module.hnet/ip.hnet/xfrm.hnet/esp.hlinux/scatterlist.hlinux/kernel.hlinux/pfkeyv2.hlinux/rtnetlink.hlinux/slab.hlinux/spinlock.hlinux/in6.hnet/icmp.hnet/protocol.hnet/udp.hnet/tcp.hnet/espintcp.hlinux/skbuff_ref.hlinux/highmem.h
Detected Declarations
struct esp_skb_cbstruct esp_output_extrafunction esp_ssg_unreffunction esp_output_tcp_finishfunction esp_output_tcp_encap_cbfunction esp_output_tail_tcpfunction esp_output_tail_tcpfunction esp_output_donefunction esp_restore_headerfunction esp_output_restore_headerfunction esp_output_done_esnfunction esp_output_encapfunction esp_output_headfunction esp_output_tailfunction esp_outputfunction esp_remove_trailerfunction esp_input_done2function esp_input_donefunction esp_input_restore_headerfunction esp_input_set_headerfunction esp_input_done_esnfunction esp_inputfunction esp4_errfunction esp_destroyfunction esp_init_aeadfunction esp_init_authencfunction esp_init_statefunction esp4_rcv_cbfunction esp4_initfunction esp4_finimodule init esp4_initexport esp_output_headexport esp_output_tailexport esp_input_done2
Annotated Snippet
module_init(esp4_init);
module_exit(esp4_fini);
MODULE_DESCRIPTION("IPv4 ESP transformation library");
MODULE_LICENSE("GPL");
MODULE_ALIAS_XFRM_TYPE(AF_INET, XFRM_PROTO_ESP);
Annotation
- Immediate include surface: `crypto/aead.h`, `crypto/authenc.h`, `linux/err.h`, `linux/module.h`, `net/ip.h`, `net/xfrm.h`, `net/esp.h`, `linux/scatterlist.h`.
- Detected declarations: `struct esp_skb_cb`, `struct esp_output_extra`, `function esp_ssg_unref`, `function esp_output_tcp_finish`, `function esp_output_tcp_encap_cb`, `function esp_output_tail_tcp`, `function esp_output_tail_tcp`, `function esp_output_done`, `function esp_restore_header`, `function esp_output_restore_header`.
- 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.