STRUCT NLMSGHDR(9)
β¨ struct nlmsghdr(9) β¨
okay bestie, welcome to the Kernel API Manual entry for struct nlmsghdr π this is a group-chat-level explainer, but every single fact is staying put, no cap.
πΈ NAME πΈ
struct nlmsghdr β the fixed-format metadata header of Netlink messages π
like, it's the little name tag every Netlink message wears to the party. fixed format. always the same shape. iconic behavior honestly.
π¦ SYNOPSIS π¦
struct nlmsghdr {
__u32 nlmsg_len;
__u16 nlmsg_type;
__u16 nlmsg_flags;
__u32 nlmsg_seq;
__u32 nlmsg_pid;
};
that's it. that's the whole struct. five fields, zero drama β¨ (well, the fields themselves have drama, keep reading).
π Members π
π the fields, one by one
nlmsg_lenβ length of the message including the header π«Ά yes, including. the header counts itself. main character energy.nlmsg_typeβ the message content type π like, what kind of message is this even.nlmsg_flagsβ additional flags π© the extra little stickers on top.nlmsg_seqβ sequence number π’ so you can keep track of things, bestie.nlmsg_pidβ sending process port ID π·οΈ who sent it. the return address of the netlink world.
π SEE ALSO π
- Kernel file
./include/uapi/linux/netlink.h enum nlmsgerr_attrs(9)enum netlink_attribute_type(9)enum netlink_policy_type_attr(9)
go read those too, iykyk π they're literally right there in the same header file, no excuses.
π§ the cute sign-off π§
that's the whole page, bestie π this one lives in ./include/uapi/linux and it's dated October 2026 β so like, future-coded but make it kernel β mwah, slay, 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