nflog_nlmsg_snprintf - print a nflog nlattrs to a buffer
- Parameters
-
buf | buffer used to build the printable nflog |
bufsiz | size of the buffer |
nlh | pointer to netlink message (to get queue num in the future) |
attr | pointer to an array of nlattr of size NFULA_MAX + 1 |
type | print message type in enum nflog_output_type |
flags | The flag that tell what to print into the buffer |
This function supports the following types / flags:
type: NFLOG_OUTPUT_XML
- NFLOG_XML_PREFIX: include the string prefix
- NFLOG_XML_HW: include the hardware link layer address
- NFLOG_XML_MARK: include the packet mark
- NFLOG_XML_DEV: include the device information
- NFLOG_XML_PHYSDEV: include the physical device information
- NFLOG_XML_PAYLOAD: include the payload (in hexadecimal)
- NFLOG_XML_TIME: include the timestamp
- NFLOG_XML_ALL: include all the logging information (all flags set)
You can combine these flags with a bitwise OR.
- Returns
- -1 on failure else same as snprintf
- Errors
- EOPNOTSUPP type is unsupported (i.e. not NFLOG_OUTPUT_XML)
- See also
- snprintf(3)
Definition at line 196 of file nlmsg.c.