#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>
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_msg * | nfnl_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... | |
#define NFNLMSG_QUEUE_TYPE | ( | type | ) | NFNLMSG_TYPE(NFNL_SUBSYS_QUEUE, (type)) |
struct nl_msg* nfnl_queue_msg_build_verdict | ( | const struct nfnl_queue_msg * | msg | ) |
References nfqnl_msg_verdict_hdr::id, nfnl_queue_msg_get_family(), nfnl_queue_msg_get_group(), nfnl_queue_msg_get_mark(), nfnl_queue_msg_get_packetid(), nfnl_queue_msg_get_verdict(), nfnl_queue_msg_test_mark(), NFNL_SUBSYS_QUEUE, nfnlmsg_alloc_simple(), NFQA_MARK, NFQA_VERDICT_HDR, NFQNL_MSG_VERDICT, nla_put(), nla_put_u32(), nlmsg_free(), NULL, and nfqnl_msg_verdict_hdr::verdict.
Referenced by nfnl_queue_msg_send_verdict(), and nfnl_queue_msg_send_verdict_payload().
int nfnl_queue_msg_send_verdict | ( | struct nl_sock * | nlh, |
const struct nfnl_queue_msg * | msg | ||
) |
Send a message verdict/mark.
References nfnl_queue_msg_build_verdict(), nl_send_auto_complete(), NLE_NOMEM, nlmsg_free(), and NULL.
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.
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.