Printing(3)

πŸŽ€ NAME πŸŽ€

Printing β€” Printing [DEPRECATED] πŸ™ˆ

okay bestie, before literally anything else: this whole page is flagged DEPRECATED. it's giving vintage. it's giving "we keep it around but don't @ me." πŸ’€ the manual name is Printing and it lives in section 3 (that's Library Functions Manual energy, iykyk). now let's get into it πŸ’…


✨ SYNOPSIS ✨

πŸ¦‹ Functions πŸ¦‹

int nfq_snprintf_xml (char *buf, size_t rem, struct nfq_data *tb, int
    flags)

πŸ’« Detailed Description πŸ’«

lowkey there's not a big blob of prose here, the actual tea is all down in Function Documentation. so scroll, babe, it's right there πŸ‘‡


πŸ“– Function Documentation πŸ“–

int nfq_snprintf_xml (char * buf, size_t rem, struct nfq_data * tb, int flags)

nfq_snprintf_xml β€” bestie, this one prints the enqueued packet in XML format straight into a buffer. it's giving "packet, but make it ✨markup✨" πŸŽ€

🌸 Parameters 🌸

  • buf β€” the buffer that you want to use to print the logged packet
  • rem β€” the size of the buffer that you have passed
  • tb β€” Netlink packet data handle passed to callback function
  • flags β€” the flag that tell what to print into the buffer

this function supports the following flags:

  • NFQ_XML_HW: include the hardware link layer address
  • NFQ_XML_MARK: include the packet mark
  • NFQ_XML_DEV: include the device information
  • NFQ_XML_PHYSDEV: include the physical device information
  • NFQ_XML_PAYLOAD: include the payload (in hexadecimal)
  • NFQ_XML_TIME: include the timestamp
  • NFQ_XML_ALL: include all the logging information (all flags set)

you can combine this flags with an binary OR. (yes, mix and match, it's a whole vibe, the bitwise way 🫢)

⭐ Returns ⭐

-1 in case of failure, otherwise the length of the string that would have been printed into the buffer (in case that there is enough room in it). See snprintf() return value for more information. πŸ‘‘

ok so real talk, that return value is the snprintf classic β€” it tells you how long the string would have been, so don't get it twisted when the buffer's too small bestie 😭

Definition at line 1378 of file libnetfilter_queue.c.


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libnetfilter_queue from the source code. πŸ€–βœ¨ (yes it wrote itself, main character behavior fr fr)


and that's the whole page, bestie!! this lil doc came from libnetfilter_queue, Version 1.0.5, and the page you're reading is Printing(3) β€” mwah, take care of her, she's deprecated but she's iconic πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from