Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

struct nl_msg* nfnlmsg_alloc_simple ( uint8_t  subsys_id,
uint8_t  type,
int  flags,
uint8_t  family,
uint16_t  res_id 
) [read]

Allocate a new netfilter netlink message

  • subsys_id nfnetlink subsystem
  • type nfnetlink message type
  • flags message flags
  • family nfnetlink address family
  • res_id nfnetlink resource id
Newly allocated netlink message or NULL.

Definition at line 200 of file nfnl.c.

References nlmsg_alloc_simple(), and nlmsg_free().

      struct nl_msg *msg;

      msg = nlmsg_alloc_simple(NFNLMSG_TYPE(subsys_id, type), flags);
      if (msg == NULL)
            return NULL;

      if (nfnlmsg_append(msg, family, res_id) < 0)
            goto nla_put_failure;

      return msg;

      return NULL;

Generated by  Doxygen 1.6.0   Back to index