include/linux/netfilter/x_tables.h
Source file repositories/reference/linux-study-clean/include/linux/netfilter/x_tables.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/netfilter/x_tables.h- Extension
.h- Size
- 15922 bytes
- Lines
- 555
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/netdevice.hlinux/static_key.hlinux/netfilter.huapi/linux/netfilter/x_tables.hlinux/netfilter_ipv4.hnet/compat.h
Detected Declarations
struct xt_action_paramstruct xt_mtchk_paramstruct xt_mtdtor_paramstruct xt_tgchk_paramstruct xt_tgdtor_paramstruct xt_matchstruct xt_targetstruct xt_tablestruct xt_table_infostruct xt_percpu_counter_alloc_statestruct compat_xt_entry_matchstruct compat_xt_entry_targetstruct compat_xt_countersstruct compat_xt_counters_infostruct _compat_xt_alignfunction xt_hooknumfunction xt_familyfunction xt_write_recseq_beginfunction xt_write_recseq_endfunction ifname_compare_alignedfunction xt_get_this_cpu_counterfunction xt_get_per_cpu_counterfunction xt_compat_check
Annotated Snippet
struct xt_action_param {
union {
const struct xt_match *match;
const struct xt_target *target;
};
union {
const void *matchinfo, *targinfo;
};
const struct nf_hook_state *state;
unsigned int thoff;
u16 fragoff;
bool hotdrop;
};
static inline struct net *xt_net(const struct xt_action_param *par)
{
return par->state->net;
}
static inline struct net_device *xt_in(const struct xt_action_param *par)
{
return par->state->in;
}
static inline struct net_device *xt_out(const struct xt_action_param *par)
{
return par->state->out;
}
static inline unsigned int xt_hooknum(const struct xt_action_param *par)
{
return par->state->hook;
}
static inline u_int8_t xt_family(const struct xt_action_param *par)
{
return par->state->pf;
}
/**
* struct xt_mtchk_param - parameters for match extensions'
* checkentry functions
*
* @net: network namespace through which the check was invoked
* @table: table the rule is tried to be inserted into
* @entryinfo: the family-specific rule data
* (struct ipt_ip, ip6t_ip, arpt_arp or (note) ebt_entry)
* @match: struct xt_match through which this function was invoked
* @matchinfo: per-match data
* @hook_mask: via which hooks the new rule is reachable
* Other fields as above.
*/
struct xt_mtchk_param {
struct net *net;
const char *table;
const void *entryinfo;
const struct xt_match *match;
void *matchinfo;
unsigned int hook_mask;
u_int8_t family;
bool nft_compat;
};
/**
* struct xt_mdtor_param - match destructor parameters
* Fields as above.
*/
struct xt_mtdtor_param {
struct net *net;
const struct xt_match *match;
void *matchinfo;
u_int8_t family;
};
/**
* struct xt_tgchk_param - parameters for target extensions'
* checkentry functions
*
* @entryinfo: the family-specific rule data
* (struct ipt_entry, ip6t_entry, arpt_entry, ebt_entry)
*
* Other fields see above.
*/
struct xt_tgchk_param {
struct net *net;
const char *table;
const void *entryinfo;
const struct xt_target *target;
void *targinfo;
unsigned int hook_mask;
Annotation
- Immediate include surface: `linux/netdevice.h`, `linux/static_key.h`, `linux/netfilter.h`, `uapi/linux/netfilter/x_tables.h`, `linux/netfilter_ipv4.h`, `net/compat.h`.
- Detected declarations: `struct xt_action_param`, `struct xt_mtchk_param`, `struct xt_mtdtor_param`, `struct xt_tgchk_param`, `struct xt_tgdtor_param`, `struct xt_match`, `struct xt_target`, `struct xt_table`, `struct xt_table_info`, `struct xt_percpu_counter_alloc_state`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.