netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
queue_msg.c File Reference
#include <sys/types.h>
#include <linux/netfilter/nfnetlink_queue.h>
#include <netlink-local.h>
#include <netlink/attr.h>
#include <netlink/netfilter/nfnl.h>
#include <netlink/netfilter/queue_msg.h>
Include dependency graph for queue_msg.c:

Macros

#define NFNLMSG_QUEUE_TYPE(type)   NFNLMSG_TYPE(NFNL_SUBSYS_QUEUE, (type))
 

Functions

int nfnlmsg_queue_msg_parse (struct nlmsghdr *nlh, struct nfnl_queue_msg **result)
 
struct nl_msgnfnl_queue_msg_build_verdict (const struct nfnl_queue_msg *msg)
 
int nfnl_queue_msg_send_verdict (struct nl_sock *nlh, const struct nfnl_queue_msg *msg)
 Send a message verdict/mark. More...
 
int nfnl_queue_msg_send_verdict_payload (struct nl_sock *nlh, const struct nfnl_queue_msg *msg, const void *payload_data, unsigned payload_len)
 Send a message verdict including the payload. More...
 

Macro Definition Documentation

#define NFNLMSG_QUEUE_TYPE (   type)    NFNLMSG_TYPE(NFNL_SUBSYS_QUEUE, (type))

Function Documentation

int nfnl_queue_msg_send_verdict ( struct nl_sock nlh,
const struct nfnl_queue_msg msg 
)

Send a message verdict/mark.

  • nlh netlink messsage header
  • msg queue msg
    Returns
    0 on OK or error code

References nfnl_queue_msg_build_verdict(), nl_send_auto_complete(), NLE_NOMEM, nlmsg_free(), and NULL.

Here is the call graph for this function:

int nfnl_queue_msg_send_verdict_payload ( struct nl_sock nlh,
const struct nfnl_queue_msg msg,
const void *  payload_data,
unsigned  payload_len 
)

Send a message verdict including the payload.

  • nlh netlink messsage header
  • msg queue msg
  • payload_data packet payload data
  • payload_len payload length
    Returns
    0 on OK or error code

References nfnl_queue_msg_build_verdict(), NFQA_PAYLOAD, nl_auto_complete(), nl_send_iovec(), NLA_ALIGN, nlattr::nla_len, nlattr::nla_type, NLE_NOMEM, nlmsg_free(), nlmsg_hdr(), nlmsghdr::nlmsg_len, and NULL.

Here is the call graph for this function: