net/netfilter/ipset/ip_set_core.c
Source file repositories/reference/linux-study-clean/net/netfilter/ipset/ip_set_core.c
File Facts
- System
- Linux kernel
- Corpus path
net/netfilter/ipset/ip_set_core.c- Extension
.c- Size
- 64680 bytes
- Lines
- 2460
- 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/init.hlinux/module.hlinux/moduleparam.hlinux/ip.hlinux/skbuff.hlinux/spinlock.hlinux/rculist.hnet/netlink.hnet/net_namespace.hnet/netns/generic.hlinux/netfilter.hlinux/netfilter/x_tables.hlinux/netfilter/nfnetlink.hlinux/netfilter/ipset/ip_set.h
Detected Declarations
struct ip_set_netfunction lockdep_nfnl_is_heldfunction ip_set_type_unlockfunction find_set_typefunction load_settypefunction __find_set_type_getfunction __find_set_type_minmaxfunction ip_set_type_registerfunction ip_set_type_unregisterfunction ip_set_allocfunction ip_set_freefunction flag_nestedfunction ip_set_get_ipaddr4function ip_set_get_ipaddr6function ip_set_timeout_getfunction ip_set_comment_ugetfunction ip_set_init_commentfunction ip_set_put_commentfunction ip_set_comment_freefunction add_extensionfunction ip_set_elem_lenfunction ip_set_get_extensionsfunction ip_set_get_bytesfunction ip_set_get_packetsfunction ip_set_put_counterfunction ip_set_put_skbinfofunction ip_set_put_extensionsfunction ip_set_match_counterfunction ip_set_add_bytesfunction ip_set_add_packetsfunction ip_set_update_counterfunction ip_set_get_skbinfofunction ip_set_match_extensionsfunction referencesfunction __ip_set_putfunction __ip_set_get_netlinkfunction __ip_set_put_netlinkfunction ip_set_rcu_getfunction ip_set_lockfunction ip_set_unlockfunction ip_set_testfunction ip_set_addfunction ip_set_delfunction ip_set_get_bynamefunction __ip_set_put_byindexfunction ip_set_put_byindexfunction ip_set_name_byindexfunction ip_set_nfnl_get_byindex
Annotated Snippet
module_init(ip_set_init);
module_exit(ip_set_fini);
MODULE_DESCRIPTION("ip_set: protocol " __stringify(IPSET_PROTOCOL));
Annotation
- Immediate include surface: `linux/init.h`, `linux/module.h`, `linux/moduleparam.h`, `linux/ip.h`, `linux/skbuff.h`, `linux/spinlock.h`, `linux/rculist.h`, `net/netlink.h`.
- Detected declarations: `struct ip_set_net`, `function lockdep_nfnl_is_held`, `function ip_set_type_unlock`, `function find_set_type`, `function load_settype`, `function __find_set_type_get`, `function __find_set_type_minmax`, `function ip_set_type_register`, `function ip_set_type_unregister`, `function ip_set_alloc`.
- 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.