Modules | |
Generic Netlink Family | |
Management | |
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 nlattr * | genlmsg_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... | |
Send trivial generic netlink message.
Fills out a routing netlink request message and sends it out using nl_send_simple().
References genlmsghdr::cmd, nl_send_simple(), and version.
struct nlattr* genlmsg_attrdata | ( | const struct genlmsghdr * | gnlh, |
int | hdrlen | ||
) |
Get head of attribute data.
References genlmsg_data(), and NLMSG_ALIGN.
Referenced by genlmsg_parse(), and genlmsg_validate().
int genlmsg_attrlen | ( | const struct genlmsghdr * | gnlh, |
int | hdrlen | ||
) |
Get length of attribute data.
References genlmsg_len(), and NLMSG_ALIGN.
Referenced by genlmsg_parse(), and genlmsg_validate().
void* genlmsg_data | ( | const struct genlmsghdr * | gnlh | ) |
Get head of message payload.
References GENL_HDRLEN.
Referenced by genlmsg_attrdata().
int genlmsg_len | ( | const struct genlmsghdr * | gnlh | ) |
Get lenght of message payload.
References GENL_HDRLEN, nlh, NLMSG_HDRLEN, and nlmsghdr::nlmsg_len.
Referenced by genlmsg_attrlen(), and genlmsg_valid_hdr().
int genlmsg_parse | ( | struct nlmsghdr * | nlh, |
int | hdrlen, | ||
struct nlattr * | tb[], | ||
int | maxtype, | ||
struct nla_policy * | policy | ||
) |
References genlmsg_attrdata(), genlmsg_attrlen(), genlmsg_valid_hdr(), nla_parse(), NLE_MSG_TOOSHORT, and nlmsg_data().
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.
Returns pointer to user specific header.
References genlmsghdr::cmd, GENL_HDRLEN, NL_DBG, nlh, nlmsg_data(), nlmsg_put(), NULL, and version.
References GENL_HDRLEN, genlmsg_len(), NLMSG_ALIGN, nlmsg_data(), and nlmsg_valid_hdr().
Referenced by genlmsg_parse(), and genlmsg_validate().
int genlmsg_validate | ( | struct nlmsghdr * | nlh, |
int | hdrlen, | ||
int | maxtype, | ||
struct nla_policy * | policy | ||
) |
References genlmsg_attrdata(), genlmsg_attrlen(), genlmsg_valid_hdr(), nla_validate(), NLE_MSG_TOOSHORT, and nlmsg_data().