nlmsg(3)
π nlmsg(3) β Netlink message helper functions π
okay so bestie, welcome to nlmsg, the Netlink message helper functions from the libnetfilter_queue manual, section 3 (that's the library functions section, iykyk). this is a lil' page, only two functions, but they're lowkey doing the Lord's work. let's get into it β¨
πΈ NAME πΈ
nlmsg β Netlink message helper functions. that's it, that's the whole vibe. two little helpers that make Netlink messages behave. π¦
β¨ SYNOPSIS β¨
π Functions π
here's the lineup, no notes:
int nfq_nlmsg_parse (const struct nlmsghdr *nlh, struct nlattr **attr)
struct nlmsghdr * nfq_nlmsg_put (char *buf, int type, uint32_t queue_num)
two baddies. one parses, one puts. balance. π
π Detailed Description π
so like, the detailed description section is literally just the function documentation chilling below it. no extra lore. the real content is in the functions themselves, so let's go π«Ά
π Function Documentation π
β int nfq_nlmsg_parse (const struct nlmsghdr * nlh, struct nlattr ** attr)
nfq_nlmsg_parse β it sets packet attributes from a netlink message. like, you hand it the message, it fills in your attribute array. main character energy fr fr. π«
Parameters
nlhβ Pointer to netlink message. yes bestie, that message.attrβ Pointer to array of attributes to set. it's gonna write into this one, so have it ready. π
Returns
MNL_CB_OKon success π β slay.MNL_CB_ERRORif any error occurs π β not slay, but at least you know.
Definition at line269of filenlmsg.c. π noted, bestie, don't lose it.
β struct nlmsghdr * nfq_nlmsg_put (char * buf, int type, uint32_t queue_num)
nfq_nlmsg_put β it converts a memory buffer into a Netlink buffer. glow-up but for bytes. β¨
Parameters
*bufβ Pointer to memory buffer. the before picture. πtypeβ EitherNFQNL_MSG_CONFIGorNFQNL_MSG_VERDICT. pick one, bestie, those are your two options, no cap. π¦queue_numβ Queue number. the queue in question. π
Returns
- Pointer to netlink message. that's the after picture. iconic. π
Definition at line283of filenlmsg.c. π second bookmark, you're welcome.
πΈ Author πΈ
Generated automatically by Doxygen for libnetfilter_queue from the source code. so technically Doxygen wrote this, I just gave it a makeover. π
and that's the whole page, bestie!! this is from libnetfilter_queue, Version 1.0.5, and it's the nlmsg(3) page in the library functions manual β dated right there with that version, so if you're reading this, you're on 1.0.5 era. go forth and parse those netlink messages, you absolute legend π«Άβ¨πππ¦πΈ
π¦ where this page comes from
- ubuntu noble: libnetfilter-queue-doc 1.0.5-4build1 Β· GPL-2.0-or-later
- ubuntu questing: libnetfilter-queue-doc 1.0.5-4build1
- ubuntu resolute: libnetfilter-queue-doc 1.0.5-4build2 Β· GPL-2.0-or-later
- ubuntu stonking: libnetfilter-queue-doc 1.0.5-4build2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms