netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
genl.c File Reference
#include <netlink-generic.h>
#include <netlink/netlink.h>
#include <netlink/genl/genl.h>
#include <netlink/utils.h>
Include dependency graph for genl.c:

Functions

Socket Creating
int genl_connect (struct nl_sock *sk)
 
Sending
int genl_send_simple (struct nl_sock *sk, int family, int cmd, int version, int flags)
 Send trivial generic netlink message. More...
 
Message Parsing
int genlmsg_valid_hdr (struct nlmsghdr *nlh, int hdrlen)
 
int genlmsg_validate (struct nlmsghdr *nlh, int hdrlen, int maxtype, struct nla_policy *policy)
 
int genlmsg_parse (struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[], int maxtype, struct nla_policy *policy)
 
void * genlmsg_data (const struct genlmsghdr *gnlh)
 Get head of message payload. More...
 
int genlmsg_len (const struct genlmsghdr *gnlh)
 Get lenght of message payload. More...
 
struct nlattrgenlmsg_attrdata (const struct genlmsghdr *gnlh, int hdrlen)
 Get head of attribute data. More...
 
int genlmsg_attrlen (const struct genlmsghdr *gnlh, int hdrlen)
 Get length of attribute data. More...
 
Message Building
void * genlmsg_put (struct nl_msg *msg, uint32_t pid, uint32_t seq, int family, int hdrlen, int flags, uint8_t cmd, uint8_t version)
 Add generic netlink header to netlink message. More...