---
name: "nfq_nlmsg_cfg_put_cmd"
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_nlmsg_cfg_put_cmd"
---

# nfq\_nlmsg\_cfg\_put\_cmd(3)

Config helpers

## NAME

nfq\_cfg - Config helpers

## SYNOPSIS

### Functions

void **nfq\_nlmsg\_cfg\_put\_cmd** (struct nlmsghdr \*nlh, uint16\_t pf, uint8\_t cmd)\
 void **nfq\_nlmsg\_cfg\_put\_params** (struct nlmsghdr \*nlh, uint8\_t mode, int range)\
 void **nfq\_nlmsg\_cfg\_put\_qmaxlen** (struct nlmsghdr \*nlh, uint32\_t queue\_maxlen)\

## Detailed Description

## Function Documentation

### void nfq\_nlmsg\_cfg\_put\_cmd (struct nlmsghdr \* nlh, uint16\_t pf, uint8\_t cmd)

nfq\_nlmsg\_cfg\_put\_cmd Add netlink config command to netlink message

**Parameters**

*nlh* Pointer to netlink message \
 *pf* Packet family (e.g. AF\_INET) \
 *cmd* nfqueue nfnetlink command.

Possible commands are:

- •

  NFQNL\_CFG\_CMD\_NONE: Do nothing. It can be useful to know if the queue subsystem is working.

- •

  NFQNL\_CFG\_CMD\_BIND: Binds the program to a specific queue.

- •

  NFQNL\_CFG\_CMD\_UNBIND: Unbinds the program to a specifiq queue.

Obsolete commands:

- •

  NFQNL\_CFG\_CMD\_PF\_BIND: Binds to process packets belonging to the given protocol family (ie. PF\_INET, PF\_INET6, etc).

- •

  NFQNL\_CFG\_CMD\_PF\_UNBIND: Unbinds from processing packets belonging to the given protocol family. Both commands are ignored by Linux kernel 3.8 and later versions.

Definition at line **166** of file **nlmsg.c**.

### void nfq\_nlmsg\_cfg\_put\_params (struct nlmsghdr \* nlh, uint8\_t mode, int range)

nfq\_nlmsg\_cfg\_put\_params Add parameter to netlink message

**Parameters**

*nlh* Pointer to netlink message \
 *mode* one of NFQNL\_COPY\_NONE, NFQNL\_COPY\_META or NFQNL\_COPY\_PACKET \
 *range* value of parameter

Definition at line **182** of file **nlmsg.c**.

### void nfq\_nlmsg\_cfg\_put\_qmaxlen (struct nlmsghdr \* nlh, uint32\_t queue\_maxlen)

nfq\_nlmsg\_cfg\_put\_qmaxlen Add queue maximum length to netlink message

**Parameters**

*nlh* Pointer to netlink message \
 *queue\_maxlen* Maximum queue length

Definition at line **197** of file **nlmsg.c**.

## Author

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