---
name: "nfq_snprintf_xml"
section: "3"
platform: "linux"
package: "libnetfilter-queue-doc"
version: "1.0.5-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/nfq_snprintf_xml"
---

# nfq\_snprintf\_xml(3)

Printing \[DEPRECATED\]

## NAME

Printing - Printing \[DEPRECATED\]

## SYNOPSIS

### Functions

int **nfq\_snprintf\_xml** (char \*buf, size\_t rem, struct nfq\_data \*tb, int flags)\

## Detailed Description

## Function Documentation

### 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**

*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.

**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.

Definition at line **1378** of file **libnetfilter\_queue.c**.

## Author

Generated automatically by Doxygen for libnetfilter\_queue from the source code.
