libnetfilter_cttimeout  1.0.1
Functions
Netlink message helper functions

Functions

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

Detailed Description

Function Documentation

◆ nfct_timeout_nlmsg_build_hdr()

struct nlmsghdr __EXPORTED* nfct_timeout_nlmsg_build_hdr ( char *  buf,
uint8_t  cmd,
uint16_t  flags,
uint32_t  seq 
)

nfct_timeout_nlmsg_build_hdr - build netlink message header for ct timeout

Parameters
bufbuffer where this function outputs the netlink message.
cmdnfct_timeout nfnetlink command.
flagsnetlink flags.
seqsequence 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 474 of file libnetfilter_cttimeout.c.

◆ nfct_timeout_nlmsg_build_payload()

void __EXPORTED 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
nlhnetlink message that you want to use to add the payload.
tpointer to a conntrack timeout object

Definition at line 499 of file libnetfilter_cttimeout.c.

◆ nfct_timeout_nlmsg_parse_payload()

int __EXPORTED 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
nlhnetlink message that you want to use to add the payload.
tpointer 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 624 of file libnetfilter_cttimeout.c.