libnetfilter_queue  1.0.5
Functions
Netlink message helper functions

Functions

int nfq_nlmsg_parse (const struct nlmsghdr *nlh, struct nlattr **attr)
 
struct nlmsghdr * nfq_nlmsg_put (char *buf, int type, uint32_t queue_num)
 

Detailed Description

Function Documentation

◆ nfq_nlmsg_parse()

int nfq_nlmsg_parse ( const struct nlmsghdr *  nlh,
struct nlattr **  attr 
)

nfq_nlmsg_parse - set packet attributes from netlink message

Parameters
nlhPointer to netlink message
attrPointer to array of attributes to set
Returns
MNL_CB_OK on success or MNL_CB_ERROR if any error occurs

Definition at line 269 of file nlmsg.c.

◆ nfq_nlmsg_put()

struct nlmsghdr* nfq_nlmsg_put ( char *  buf,
int  type,
uint32_t  queue_num 
)

nfq_nlmsg_put - Convert memory buffer into a Netlink buffer

Parameters
*bufPointer to memory buffer
typeEither NFQNL_MSG_CONFIG or NFQNL_MSG_VERDICT
queue_numQueue number
Returns
Pointer to netlink message

Definition at line 283 of file nlmsg.c.