11#include <netlink/netlink.h>
17#define NFNL_HDRLEN NLMSG_ALIGN(sizeof(struct nfgenmsg))
18#define NFNLMSG_TYPE(subsys, subtype) (((subsys) << 8) | (subtype))
28 int, uint8_t, uint16_t);
31extern int nfnlmsg_put(
struct nl_msg *, uint32_t, uint32_t,
32 uint8_t, uint8_t,
int, uint8_t, uint16_t);
uint16_t nfnlmsg_res_id(struct nlmsghdr *)
Get netfilter resource id from message.
uint8_t nfnlmsg_subsys(struct nlmsghdr *)
Get netfilter subsystem id from message.
uint8_t nfnlmsg_family(struct nlmsghdr *)
Get netfilter family from message.
int nfnlmsg_put(struct nl_msg *, uint32_t, uint32_t, uint8_t, uint8_t, int, uint8_t, uint16_t)
Add netlink and netfilter netlink headers to netlink message.
int nfnl_connect(struct nl_sock *)
Create and connect netfilter netlink socket.
int nfnl_send_simple(struct nl_sock *, uint8_t, uint8_t, int, uint8_t, uint16_t)
Send trivial netfilter netlink message.
uint8_t nfnlmsg_subtype(struct nlmsghdr *)
Get netfilter message type from message.
struct nl_msg * nfnlmsg_alloc_simple(uint8_t, uint8_t, int, uint8_t, uint16_t)
Allocate a new netfilter netlink message.