STRUCT XT_TGCHK_PARAM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 rn
  • table β€” the table the rule is tried to be inserted into πŸ“‹ the destination, basically
  • entryinfo β€” the family-specific rule data (that's struct ipt_entry, ip6t_entry, arpt_entry, ebt_entry) πŸ‘‘ so it depends on the family, iykyk
  • target β€” the target extension itself 🎯 the star of the show
  • targinfo β€” per-target data πŸ’« each target gets its own lil payload
  • hook_mask β€” via which hooks the new rule is reachable πŸͺ hook reachability, fr fr
  • family β€” the actual NFPROTO_* through which the function is invoked πŸ”₯ and super helpful when match->family == NFPROTO_UNSPEC, because then you'd be lost otherwise ngl
  • nft_compat β€” true if 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 🌈:

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