netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Config helpers

Functions

void nfq_nlmsg_cfg_put_cmd (struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd)
 nfq_nlmsg_cfg_build_request- build netlink config message More...
 
 EXPORT_SYMBOL (nfq_nlmsg_cfg_put_cmd)
 
void nfq_nlmsg_cfg_put_params (struct nlmsghdr *nlh, uint8_t mode, int range)
 
 EXPORT_SYMBOL (nfq_nlmsg_cfg_put_params)
 
void nfq_nlmsg_cfg_put_qmaxlen (struct nlmsghdr *nlh, uint32_t queue_maxlen)
 
 EXPORT_SYMBOL (nfq_nlmsg_cfg_put_qmaxlen)
 

Detailed Description

Function Documentation

EXPORT_SYMBOL ( nfq_nlmsg_cfg_put_cmd  )
EXPORT_SYMBOL ( nfq_nlmsg_cfg_put_params  )
EXPORT_SYMBOL ( nfq_nlmsg_cfg_put_qmaxlen  )
void nfq_nlmsg_cfg_put_cmd ( struct nlmsghdr nlh,
uint16_t  pf,
uint8_t  cmd 
)

nfq_nlmsg_cfg_build_request- build netlink config message

Parameters
bufBuffer where netlink message is going to be written.
cfgStructure that contains the config parameters.
commandnfqueue nfnetlink command.

This function returns a pointer to the netlink message. If something goes wrong it returns NULL.

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.

References nfqnl_msg_config_cmd::command, mnl_attr_put(), and NFQA_CFG_CMD.

Here is the call graph for this function:

void nfq_nlmsg_cfg_put_params ( struct nlmsghdr nlh,
uint8_t  mode,
int  range 
)

References nfqnl_msg_config_params::copy_range, mnl_attr_put(), and NFQA_CFG_PARAMS.

Here is the call graph for this function:

void nfq_nlmsg_cfg_put_qmaxlen ( struct nlmsghdr nlh,
uint32_t  queue_maxlen 
)

References mnl_attr_put_u32(), and NFQA_CFG_QUEUE_MAXLEN.

Here is the call graph for this function: