libnetfilter_cttimeout  1.0.0
Functions
Netlink message helper functions

Functions

struct nlmsghdr * nfct_timeout_nlmsg_build_hdr (char *buf, uint8_t cmd, uint16_t flags, uint32_t seq)
void nfct_timeout_nlmsg_build_payload (struct nlmsghdr *nlh, const struct nfct_timeout *t)
int nfct_timeout_nlmsg_parse_payload (const struct nlmsghdr *nlh, struct nfct_timeout *t)

Function Documentation

struct nlmsghdr* nfct_timeout_nlmsg_build_hdr ( char *  buf,
uint8_t  cmd,
uint16_t  flags,
uint32_t  seq 
) [read]

nfct_timeout_nlmsg_build_hdr - build netlink message header for ct timeout

Parameters:
buf,:buffer where this function outputs the netlink message.
cmd,:nfct_timeout nfnetlink command.
flags,:netlink flags.
seq,:sequence number for this message.

Possible commands:

  • CTNL_MSG_TIMEOUT_NEW: new conntrack timeout object.
  • CTNL_MSG_TIMEOUT_GET: get conntrack timeout object.
  • CTNL_MSG_TIMEOUT_DEL: delete conntrack timeout object.

Definition at line 481 of file libnetfilter_cttimeout.c.

void nfct_timeout_nlmsg_build_payload ( struct nlmsghdr *  nlh,
const struct nfct_timeout *  t 
)

nfct_timeout_nlmsg_build_payload - build payload from ct timeout object

Parameters:
nlh,:netlink message that you want to use to add the payload.
t,:pointer to a conntrack timeout object

Definition at line 507 of file libnetfilter_cttimeout.c.

int nfct_timeout_nlmsg_parse_payload ( const struct nlmsghdr *  nlh,
struct nfct_timeout *  t 
)

nfct_timeout_nlmsg_parse_payload - set timeout object attributes from message

Parameters:
nlh,:netlink message that you want to use to add the payload.
t,:pointer to a conntrack timeout object

This function returns -1 in case that some mandatory attributes are missing. On sucess, it returns 0.

Definition at line 633 of file libnetfilter_cttimeout.c.