include/net/netfilter/nf_conntrack_extend.h
Source file repositories/reference/linux-study-clean/include/net/netfilter/nf_conntrack_extend.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/netfilter/nf_conntrack_extend.h- Extension
.h- Size
- 1454 bytes
- Lines
- 68
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/slab.hnet/netfilter/nf_conntrack.h
Detected Declarations
struct nf_ct_extenum nf_ct_ext_idfunction __nf_ct_ext_existfunction nf_ct_ext_exist
Annotated Snippet
struct nf_ct_ext {
u8 offset[NF_CT_EXT_NUM];
u8 len;
char data[] __aligned(8);
};
static inline bool __nf_ct_ext_exist(const struct nf_ct_ext *ext, u8 id)
{
return !!ext->offset[id];
}
static inline bool nf_ct_ext_exist(const struct nf_conn *ct, u8 id)
{
return (ct->ext && __nf_ct_ext_exist(ct->ext, id));
}
static inline void *nf_ct_ext_find(const struct nf_conn *ct, u8 id)
{
struct nf_ct_ext *ext = ct->ext;
if (!ext || !__nf_ct_ext_exist(ext, id))
return NULL;
return (void *)ct->ext + ct->ext->offset[id];
}
/* Add this type, returns pointer to data or NULL. */
void *nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp);
#endif /* _NF_CONNTRACK_EXTEND_H */
Annotation
- Immediate include surface: `linux/slab.h`, `net/netfilter/nf_conntrack.h`.
- Detected declarations: `struct nf_ct_ext`, `enum nf_ct_ext_id`, `function __nf_ct_ext_exist`, `function nf_ct_ext_exist`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
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.