STRUCT GENL_SPLIT_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct genl_split_ops

okay so bestie, welcome to the Kernel API Manual ✨ β€” this is the page for struct genl_split_ops, aka generic netlink operations, do/dump split version. It’s giving β€œone struct, two callback personalities,” and we’re gonna walk through every member, no cap. πŸ¦‹


🌸 NAME

struct genl_split_ops β€” generic netlink operations (do/dump split version) πŸ’–


πŸ¦‹ SYNOPSIS

struct genl_split_ops {
    union {
      struct {
        int (*pre_doit)(const struct genl_split_ops *ops, struct sk_buff *skb, struct genl_info *info);
        int (*doit)(struct sk_buff *skb, struct genl_info *info);
        void (*post_doit)(const struct genl_split_ops *ops, struct sk_buff *skb, struct genl_info *info);
      };
      struct {
        int (*start)(struct netlink_callback *cb);
        int (*dumpit)(struct sk_buff *skb, struct netlink_callback *cb);
        int (*done)(struct netlink_callback *cb);
      };
    };
    const struct nla_policy *policy;
    unsigned int            maxattr;
    u8 cmd;
    u8 internal_flags;
    u8 flags;
    u8 validate;
};

🫢 Members

  • {unnamed_union} β€” anonymous. literally an unnamed union doing its anonymous-union thing πŸ’…
  • {unnamed_struct} β€” anonymous.
  • pre_doit β€” called before an operation’s doit callback; it may do additional, common, filtering and return an error πŸŽ€
  • doit β€” standard command callback ✨
  • post_doit β€” called after an operation’s doit callback; it may undo operations done by pre_doit, for example release locks πŸ”“
  • {unnamed_struct} β€” anonymous.
  • start β€” start callback for dumps 🌊
  • dumpit β€” callback for dumpers πŸŒ€
  • done β€” completion callback for dumps βœ…
  • policy β€” netlink policy (takes precedence over family policy) πŸ‘‘
  • maxattr β€” maximum number of attributes supported πŸ”’
  • cmd β€” command identifier 🏷️
  • internal_flags β€” flags used by the family 🚩
  • flags β€” GENL_* flags (GENL_ADMIN_PERM or GENL_UNS_ADMIN_PERM) πŸ”₯
  • validate β€” validation flags from enum genl_validate_flags 🧚

πŸ’– Description

✨ Do callbacks:

These are the do-side slots β€” the pre_doit, doit, and post_doit energy from the union above. πŸ’…

🌊 Dump callbacks:

These are the dump-side slots β€” the start, dumpit, and done energy. πŸŒ€

Do callbacks can be used if GENL_CMD_CAP_DO is set in flags. Dump callbacks can be used if GENL_CMD_CAP_DUMP is set in flags. Exactly one of those flags must be set. not zero, not both β€” exactly one. periodt. πŸ’€


🌈 SEE ALSO

the whole reference squad is here, bestie β€” the kernel file ./include/net/genetlink.h plus these icons:


okay bye bestie πŸ’‹ β€” this one’s from source/version ./include/net, dated October 2026, and yes the page is struct genl_split_ops(9). πŸŽ€βœ¨

πŸ“¦ where this page comes from