STRUCT GENL_INFO(9)
π struct genl_info(9) β the kernel API manual, bestie edition π
okay so this is struct genl_info(9) from the Kernel API Manual, and it's literally the struct that handles receiving information in generic netlink π. She's the main character of "a message just came in, here's everything about it" energy, and we're gonna go through her field by field, no skipping, periodt β¨
πΈ SYNOPSIS πΈ
struct genl_info {
u32 snd_seq;
u32 snd_portid;
const struct genl_family *family;
const struct nlmsghdr * nlhdr;
struct genlmsghdr * genlhdr;
struct nlattr ** attrs;
possible_net_t _net;
union {
u8 ctx[NETLINK_CTX_SIZE];
void * user_ptr[2];
};
struct netlink_ext_ack *extack;
};
like, look at her. every single field stays exactly as written, don't touch a character π
π¦ Members π¦
so this is the part where we meet everyone in the group chat:
snd_seqβ the sending sequence number, iykyk πsnd_portidβ the netlink portid of the sender, so you know who's texting you fr πfamilyβ the generic netlink family, aka which squad this message belongs to πnlhdrβ the netlink message header πgenlhdrβ the generic netlink message header β¨attrsβ the netlink attributes, the little extras riding along π_netβ the network namespace π{unnamed_union}β anonymous, she has no name and she doesn't need one πctxβ storage space for use by the family, this is the spot the family gets to stash stuff in π§user_ptrβ user pointers, and ngl this one is deprecated, so usectxinstead bestie, no cap π«Άextackβ the extended ACK report struct, for when the kernel needs to say more than just "no" π
β SEE ALSO β
all the siblings and cousins, linked from the kernel file ./include/net/genetlink.h β go say hi: struct genl_multicast_group(9), struct genl_family(9), struct genl_small_ops(9), struct genl_ops(9), struct genl_split_ops(9), struct genl_dumpit_info(9), genl_info_init_ntf(9), genlmsg_iput(9), genlmsg_nlhdr(9), genlmsg_parse_deprecated(9), genlmsg_parse(9), genl_dump_check_consistent(9), genlmsg_put_reply(9), genlmsg_end(9), genlmsg_cancel(9), genlmsg_multicast_netns_filtered(9), genlmsg_multicast_netns(9), genlmsg_multicast(9), genlmsg_multicast_allns(9), genlmsg_unicast(9), genlmsg_reply(9), genlmsg_data(9), genlmsg_len(9), genlmsg_msg_size(9), genlmsg_total_size(9), genlmsg_new(9), genl_set_err(9) π
and that's the whole page, bestie π¦ β sourced from ./include/net, dated October 2026, and she's struct genl_info(9) through and through. slay, stay hydrated, and always check your extack πβ¨
π¦ 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