STRUCT XT_TGCHK_PARAM(9)
π struct xt_tgchk_param(9) π
okay bestie, so this is a page straight out of the Kernel API Manual and it's literally all about struct xt_tgchk_param β the little bundle of parameters you hand over to target extensions' checkentry functions β¨. yes, that's the whole vibe. it's giving "paperwork for your netfilter target" and honestly? iconic.
π NAME π
struct xt_tgchk_param β the parameters for target extensions' checkentry functions, no cap π«Ά
πΈ SYNOPSIS πΈ
struct xt_tgchk_param {
struct net *net;
const char *table;
const void *entryinfo;
const struct xt_target *target;
void *targinfo;
unsigned int hook_mask;
u_int8_t family;
bool nft_compat;
};
like, that's the struct. every field matters, don't skip a single one π
π¦ Members π¦
okay so let's go field by field, main character energy only:
netβ the network namespace through which the check was invoked π like, which netns are we even in rntableβ the table the rule is tried to be inserted into π the destination, basicallyentryinfoβ the family-specific rule data (that'sstruct ipt_entry,ip6t_entry,arpt_entry,ebt_entry) π so it depends on the family, iykyktargetβ the target extension itself π― the star of the showtarginfoβ per-target data π« each target gets its own lil payloadhook_maskβ via which hooks the new rule is reachable πͺ hook reachability, fr frfamilyβ the actualNFPROTO_*through which the function is invoked π₯ and super helpful whenmatch->family == NFPROTO_UNSPEC, because then you'd be lost otherwise nglnft_compatβtrueif this is running from the nft compat layer β that's it, that's the flag
π SEE ALSO π
go touch some grass in the kernel source, bestie π:
- Kernel file
./include/linux/netfilter/x_tables.hstructxt_action_param(9) struct xt_mtchk_param(9)struct xt_mtdtor_param(9)- var
xt_recseq(9) xt_write_recseq_begin(9)xt_write_recseq_end(9)
lowkey important: those are the exact names, don't go renaming them in your head, they will not find you π
aaaand that's the page!! π this one's brought to you from ./include/linux/netfilter, dated October 2026 β so like, mark your calendars, this manual page is a whole era ππ slay, now go write your checkentry function. periodt. π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms