net/netfilter/nft_limit.c
Source file repositories/reference/linux-study-clean/net/netfilter/nft_limit.c
File Facts
- System
- Linux kernel
- Corpus path
net/netfilter/nft_limit.c- Extension
.c- Size
- 12541 bytes
- Lines
- 483
- 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/kernel.hlinux/init.hlinux/module.hlinux/spinlock.hlinux/netlink.hlinux/netfilter.hlinux/netfilter/nf_tables.hnet/netfilter/nf_tables.h
Detected Declarations
struct nft_limitstruct nft_limit_privstruct nft_limit_priv_pktsfunction nft_limit_evalfunction nft_limit_initfunction nft_limit_dumpfunction nft_limit_destroyfunction nft_limit_clonefunction nft_limit_pkts_evalfunction nft_limit_pkts_initfunction nft_limit_pkts_dumpfunction nft_limit_pkts_destroyfunction nft_limit_pkts_clonefunction nft_limit_bytes_evalfunction nft_limit_bytes_initfunction nft_limit_bytes_dumpfunction nft_limit_bytes_destroyfunction nft_limit_bytes_clonefunction nft_limit_select_opsfunction nft_limit_obj_pkts_evalfunction nft_limit_obj_pkts_initfunction nft_limit_obj_pkts_dumpfunction nft_limit_obj_pkts_destroyfunction nft_limit_obj_bytes_evalfunction nft_limit_obj_bytes_initfunction nft_limit_obj_bytes_dumpfunction nft_limit_obj_bytes_destroyfunction nft_limit_obj_select_opsfunction nft_limit_module_initfunction nft_limit_module_exitmodule init nft_limit_module_init
Annotated Snippet
module_init(nft_limit_module_init);
module_exit(nft_limit_module_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Patrick McHardy <kaber@trash.net>");
MODULE_ALIAS_NFT_EXPR("limit");
MODULE_ALIAS_NFT_OBJ(NFT_OBJECT_LIMIT);
MODULE_DESCRIPTION("nftables limit expression support");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/init.h`, `linux/module.h`, `linux/spinlock.h`, `linux/netlink.h`, `linux/netfilter.h`, `linux/netfilter/nf_tables.h`, `net/netfilter/nf_tables.h`.
- Detected declarations: `struct nft_limit`, `struct nft_limit_priv`, `struct nft_limit_priv_pkts`, `function nft_limit_eval`, `function nft_limit_init`, `function nft_limit_dump`, `function nft_limit_destroy`, `function nft_limit_clone`, `function nft_limit_pkts_eval`, `function nft_limit_pkts_init`.
- 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.