nlmsg_new(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– nlmsg_new(9) β€” Kernel API Manual edition πŸ’–

🌟 NAME 🌟

nlmsg_new β€” Allocate a new netlink message. okay so this is literally the function that births a fresh netlink message, and it's giving main character energy. ✨

πŸŽ€ SYNOPSIS πŸŽ€

struct sk_buff * nlmsg_new (size_t payload , gfp_t flags );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • payload β€” size of the message payload. like, how much room the actual message body needs, bestie. πŸ’…
  • flags β€” the type of memory to allocate. this is the gfp_t situation, so you're telling the kernel what kind of allocation vibe you want. 🌸

🌈 DESCRIPTION 🌈

Use NLMSG_DEFAULT_SIZE if the size of the payload isn't known and a good default is needed. that's the whole tip, no cap β€” when you don't know the payload size and you need a solid default, NLMSG_DEFAULT_SIZE is your safety net. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

okay bestie, the cross-reference friend group is huge β€” like an entire netlink group chat. the Kernel file is literally ./include/net/netlink.h, and the first besties are struct nla_policy(9), struct nl_info(9), and enum netlink_validation(9). πŸ’–


and that's the whole page, bestie πŸ’– this one lives in ./include/net, and the date on the vibe check is October 2026. go forth and allocate responsibly. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from