net/netfilter/x_tables.c
Source file repositories/reference/linux-study-clean/net/netfilter/x_tables.c
File Facts
- System
- Linux kernel
- Corpus path
net/netfilter/x_tables.c- Extension
.c- Size
- 56699 bytes
- Lines
- 2231
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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/kernel.hlinux/module.hlinux/socket.hlinux/net.hlinux/proc_fs.hlinux/seq_file.hlinux/string.hlinux/vmalloc.hlinux/mutex.hlinux/mm.hlinux/slab.hlinux/audit.hlinux/user_namespace.hnet/net_namespace.hnet/netns/generic.hlinux/netfilter/x_tables.hlinux/netfilter_arp.hlinux/netfilter_ipv4/ip_tables.hlinux/netfilter_ipv6/ip6_tables.hlinux/netfilter_arp/arp_tables.h
Detected Declarations
struct xt_templatestruct xt_pernetstruct compat_deltastruct xt_afstruct compat_xt_standard_targetstruct compat_xt_error_targetstruct nf_mttg_travfunction xt_register_targetfunction xt_unregister_targetfunction xt_register_targetsfunction xt_unregister_targetsfunction xt_register_matchfunction xt_unregister_matchfunction xt_register_matchesfunction xt_unregister_matchesfunction heldfunction xt_request_find_matchfunction xt_obj_to_userfunction xt_data_to_userfunction XT_ALIGNfunction xt_target_to_userfunction match_revfnfunction target_revfnfunction xt_find_revisionfunction textify_hooksfunction xt_check_proc_namefunction xt_check_match_commonfunction strcmpfunction xt_checkentry_matchfunction xt_check_hooks_matchfunction xt_check_matchfunction xt_check_entry_matchfunction xt_check_table_hooksfunction verdict_okfunction error_tg_okfunction xt_compat_add_offsetfunction xt_compat_flush_offsetsfunction xt_compat_calc_jumpfunction xt_compat_init_offsetsfunction xt_compat_match_offsetfunction xt_compat_match_from_userfunction COMPAT_XT_ALIGNfunction xt_compat_check_entry_offsetsfunction xt_check_entry_offsetsfunction xt_find_jump_offsetfunction xt_check_target_commonfunction strcmpfunction xt_check_hooks_target
Annotated Snippet
module_init(xt_init);
module_exit(xt_fini);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/socket.h`, `linux/net.h`, `linux/proc_fs.h`, `linux/seq_file.h`, `linux/string.h`, `linux/vmalloc.h`.
- Detected declarations: `struct xt_template`, `struct xt_pernet`, `struct compat_delta`, `struct xt_af`, `struct compat_xt_standard_target`, `struct compat_xt_error_target`, `struct nf_mttg_trav`, `function xt_register_target`, `function xt_unregister_target`, `function xt_register_targets`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.