include/net/netfilter/nf_conntrack_act_ct.h
Source file repositories/reference/linux-study-clean/include/net/netfilter/nf_conntrack_act_ct.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/netfilter/nf_conntrack_act_ct.h- Extension
.h- Size
- 1350 bytes
- Lines
- 55
- 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
net/netfilter/nf_conntrack.hlinux/netfilter/nf_conntrack_common.hnet/netfilter/nf_conntrack_extend.h
Detected Declarations
struct nf_conn_act_ct_extfunction nf_conn_act_ct_ext_fill
Annotated Snippet
struct nf_conn_act_ct_ext {
int ifindex[IP_CT_DIR_MAX];
};
static inline struct nf_conn_act_ct_ext *nf_conn_act_ct_ext_find(const struct nf_conn *ct)
{
#if IS_ENABLED(CONFIG_NET_ACT_CT)
return nf_ct_ext_find(ct, NF_CT_EXT_ACT_CT);
#else
return NULL;
#endif
}
static inline void nf_conn_act_ct_ext_fill(struct sk_buff *skb, struct nf_conn *ct,
enum ip_conntrack_info ctinfo)
{
#if IS_ENABLED(CONFIG_NET_ACT_CT)
struct nf_conn_act_ct_ext *act_ct_ext;
act_ct_ext = nf_conn_act_ct_ext_find(ct);
if (dev_net(skb->dev) == &init_net && act_ct_ext)
act_ct_ext->ifindex[CTINFO2DIR(ctinfo)] = skb->dev->ifindex;
#endif
}
static inline struct
nf_conn_act_ct_ext *nf_conn_act_ct_ext_add(struct sk_buff *skb,
struct nf_conn *ct,
enum ip_conntrack_info ctinfo)
{
#if IS_ENABLED(CONFIG_NET_ACT_CT)
struct nf_conn_act_ct_ext *act_ct = nf_ct_ext_find(ct, NF_CT_EXT_ACT_CT);
if (act_ct)
return act_ct;
act_ct = nf_ct_ext_add(ct, NF_CT_EXT_ACT_CT, GFP_ATOMIC);
nf_conn_act_ct_ext_fill(skb, ct, ctinfo);
return act_ct;
#else
return NULL;
#endif
}
#endif /* _NF_CONNTRACK_ACT_CT_H */
Annotation
- Immediate include surface: `net/netfilter/nf_conntrack.h`, `linux/netfilter/nf_conntrack_common.h`, `net/netfilter/nf_conntrack_extend.h`.
- Detected declarations: `struct nf_conn_act_ct_ext`, `function nf_conn_act_ct_ext_fill`.
- 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.