14 #ifndef NETLINK_NFNL_H_ 15 #define NETLINK_NFNL_H_ 17 #include <netlink/netlink.h> 23 #define NFNL_HDRLEN NLMSG_ALIGN(sizeof(struct nfgenmsg)) 24 #define NFNLMSG_TYPE(subsys, subtype) (((subsys) << 8) | (subtype)) 34 int, uint8_t, uint16_t);
37 extern int nfnlmsg_put(
struct nl_msg *, uint32_t, uint32_t,
38 uint8_t, uint8_t,
int, uint8_t, uint16_t);
uint8_t nfnlmsg_subsys(struct nlmsghdr *)
Get netfilter subsystem id from message.
uint8_t nfnlmsg_subtype(struct nlmsghdr *)
Get netfilter message type 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_send_simple(struct nl_sock *, uint8_t, uint8_t, int, uint8_t, uint16_t)
Send trivial netfilter netlink message.
uint8_t nfnlmsg_family(struct nlmsghdr *)
Get netfilter family from message.
int nfnl_connect(struct nl_sock *)
Create and connect netfilter netlink socket.
struct nl_msg * nfnlmsg_alloc_simple(uint8_t, uint8_t, int, uint8_t, uint16_t)
Allocate a new netfilter netlink message.
uint16_t nfnlmsg_res_id(struct nlmsghdr *)
Get netfilter resource id from message.