netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Printing [DEPRECATED]

Functions

int nflog_snprintf_xml (char *buf, size_t rem, struct nflog_data *tb, int flags)
 nflog_snprintf_xml - print the logged packet in XML format into a buffer More...
 
int nfq_snprintf_xml (char *buf, size_t rem, struct nfq_data *tb, int flags)
 nfq_snprintf_xml - print the enqueued packet in XML format into a buffer More...
 
 EXPORT_SYMBOL (nfq_snprintf_xml)
 

Detailed Description

Function Documentation

EXPORT_SYMBOL ( nfq_snprintf_xml  )
int nflog_snprintf_xml ( char *  buf,
size_t  rem,
struct nflog_data tb,
int  flags 
)

nflog_snprintf_xml - print the logged packet in XML format into a buffer

Parameters
bufThe buffer that you want to use to print the logged packet
remThe size of the buffer that you have passed
tbNetlink packet data handle passed to callback function
flagsThe flag that tell what to print into the buffer

This function supports the following flags:

  • 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 this flags with an binary OR.

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.

References data, nfulnl_msg_packet_hdr::hook, nfulnl_msg_packet_hw::hw_addr, nfulnl_msg_packet_hw::hw_addrlen, nfulnl_msg_packet_hdr::hw_protocol, len, mark, nflog_get_indev(), nflog_get_msg_packet_hdr(), nflog_get_nfmark(), nflog_get_outdev(), nflog_get_packet_hw(), nflog_get_payload(), nflog_get_physindev(), nflog_get_physoutdev(), nflog_get_prefix(), NFLOG_XML_DEV, NFLOG_XML_HW, NFLOG_XML_MARK, NFLOG_XML_PAYLOAD, NFLOG_XML_PHYSDEV, NFLOG_XML_PREFIX, NFLOG_XML_TIME, NULL, size, and SNPRINTF_FAILURE.

Here is the call graph for this function:

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

nfq_snprintf_xml - print the enqueued packet in XML format into a buffer

Parameters
bufThe buffer that you want to use to print the logged packet
remThe size of the buffer that you have passed
tbNetlink packet data handle passed to callback function
flagsThe 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.

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.

References data, nfqnl_msg_packet_hdr::hook, nfqnl_msg_packet_hw::hw_addr, nfqnl_msg_packet_hw::hw_addrlen, nfqnl_msg_packet_hdr::hw_protocol, len, mark, nfq_get_gid(), nfq_get_indev(), nfq_get_msg_packet_hdr(), nfq_get_nfmark(), nfq_get_outdev(), nfq_get_packet_hw(), nfq_get_payload(), nfq_get_physindev(), nfq_get_physoutdev(), nfq_get_uid(), NFQ_XML_DEV, NFQ_XML_GID, NFQ_XML_HW, NFQ_XML_MARK, NFQ_XML_PAYLOAD, NFQ_XML_PHYSDEV, NFQ_XML_TIME, NFQ_XML_UID, NULL, nfqnl_msg_packet_hdr::packet_id, size, and SNPRINTF_FAILURE.

Here is the call graph for this function: