IPQ\_SET\_VERDICT(3) Linux Programmer's Manual IPQ\_SET\_VERDICT(3)

# [NAME](#NAME)

ipq\_set\_verdict — issue verdict and optionally modified packet to kernel

# [SYNOPSIS](#SYNOPSIS)

**#include &lt;linux/netfilter.h&gt;**  
**#include &lt;libipq.h&gt;**

**int ipq\_set\_verdict(const struct ipq\_handle \*h, ipq\_id\_t id, unsigned int verdict, size\_t data\_len, unsigned char \*buf);**

# [DESCRIPTION](#DESCRIPTION)

The **ipq\_set\_verdict** function issues a verdict on a packet previously obtained with **ipq\_read**, specifying the intended disposition of the packet, and optionally supplying a modified version of the payload data.

The *h* parameter is a context handle which must previously have been returned successfully from a call to **ipq\_create\_handle**.

The *id* parameter is the packet identifier obtained via **ipq\_get\_packet**.

The *verdict* parameter must be one of:

[**NF\_ACCEPT**](#NF_ACCEPT)

Accept the packet and continue traversal within the kernel.

[**NF\_DROP**](#NF_DROP)

Drop the packet.

[**NF\_QUEUE**](#NF_QUEUE)

Requeue the packet.

**NF\_STOLEN** and **NF\_REPEAT** are kernel-internal constants and should not be used from userspace as their exact side effects have not been investigated.

The *data\_len* parameter is the length of the data pointed to by *buf*, the optional replacement payload data.

If simply setting a verdict without modifying the payload data, use zero for *data\_len* and NULL for *buf*.

The application is responsible for recalculating any packet checksums when modifying packets.

# [RETURN VALUE](#RETURN_VALUE)

On failure, -1 is returned.  
On success, a non-zero positive value is returned.

# [ERRORS](#ERRORS)

On error, a descriptive error message will be available via the **ipq\_errstr** function.

# [BUGS](#BUGS)

None known.

# [AUTHOR](#AUTHOR)

James Morris &lt;jmorris@intercode.com.au&gt;

# [COPYRIGHT](#COPYRIGHT)

Copyright (c) 2000-2001 Netfilter Core Team.

Distributed under the GNU General Public License.

# [SEE ALSO](#SEE_ALSO)

[**iptables**(8)](/man/os/iptables/iptables.8), [**libipq**(3)](/man/os/iptables/libipq.3).

16 October 2001 Linux iptables 1.2

---

Document: ipq_set_verdict(3) from iptables 1.8.13-r5 (Chainguard OS)
Source: https://git.netfilter.org/iptables/
