net/netfilter/nfnetlink_hook.c
Source file repositories/reference/linux-study-clean/net/netfilter/nfnetlink_hook.c
File Facts
- System
- Linux kernel
- Corpus path
net/netfilter/nfnetlink_hook.c- Extension
.c- Size
- 11310 bytes
- Lines
- 487
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/bpf.hlinux/module.hlinux/kallsyms.hlinux/kernel.hlinux/types.hlinux/skbuff.hlinux/errno.hlinux/netlink.hlinux/slab.hlinux/netfilter.hlinux/netfilter/nfnetlink.hlinux/netfilter/nfnetlink_hook.hnet/netfilter/nf_tables.hnet/sock.h
Detected Declarations
struct nfnl_dump_hook_datafunction nf_netlink_dump_start_rcufunction nfnl_hook_put_bpf_prog_infofunction nfnl_hook_put_nft_info_descfunction nla_put_stringfunction nfnl_hook_put_nft_chain_infofunction nfnl_hook_put_nft_ft_infofunction nfnl_hook_dump_onefunction nfnl_hook_entries_headfunction nfnl_hook_dumpfunction nfnl_hook_dump_startfunction nfnl_hook_dump_stopfunction nfnl_hook_getfunction nfnetlink_hook_initfunction nfnetlink_hook_exitmodule init nfnetlink_hook_init
Annotated Snippet
module_init(nfnetlink_hook_init);
module_exit(nfnetlink_hook_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Florian Westphal <fw@strlen.de>");
MODULE_DESCRIPTION("nfnetlink_hook: list registered netfilter hooks");
Annotation
- Immediate include surface: `linux/bpf.h`, `linux/module.h`, `linux/kallsyms.h`, `linux/kernel.h`, `linux/types.h`, `linux/skbuff.h`, `linux/errno.h`, `linux/netlink.h`.
- Detected declarations: `struct nfnl_dump_hook_data`, `function nf_netlink_dump_start_rcu`, `function nfnl_hook_put_bpf_prog_info`, `function nfnl_hook_put_nft_info_desc`, `function nla_put_string`, `function nfnl_hook_put_nft_chain_info`, `function nfnl_hook_put_nft_ft_info`, `function nfnl_hook_dump_one`, `function nfnl_hook_entries_head`, `function nfnl_hook_dump`.
- 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.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.