12 #ifndef NETLINK_GENL_H_ 13 #define NETLINK_GENL_H_ 15 #include <netlink/netlink.h> 16 #include <netlink/msg.h> 17 #include <netlink/attr.h> 27 extern void *
genlmsg_put(
struct nl_msg *, uint32_t, uint32_t,
28 int,
int,
int, uint8_t, uint8_t);
33 extern int genlmsg_parse(
struct nlmsghdr *,
int,
struct nlattr **,
35 extern struct genlmsghdr *
46 extern char * genl_op2name(
int,
int,
char *,
size_t);
void * genlmsg_user_hdr(const struct genlmsghdr *)
Return pointer to user header.
int genlmsg_parse(struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[], int maxtype, const struct nla_policy *policy)
Parse Generic Netlink message including attributes.
Attribute validation policy.
int genl_connect(struct nl_sock *)
Connect a Generic Netlink socket.
int genlmsg_validate(struct nlmsghdr *, int, int, const struct nla_policy *)
Validate Generic Netlink message including attributes.
void * genlmsg_put(struct nl_msg *, uint32_t, uint32_t, int, int, int, uint8_t, uint8_t)
Add Generic Netlink headers to Netlink message.
int genlmsg_user_datalen(const struct genlmsghdr *, const int)
Return length of user data.
int genl_send_simple(struct nl_sock *, int, int, int, int)
Send a Generic Netlink message consisting only of a header.
struct nlattr * genlmsg_attrdata(const struct genlmsghdr *, int)
Return pointer to message attributes.
struct genlmsghdr * genlmsg_hdr(struct nlmsghdr *)
Return pointer to Generic Netlink header.
int genlmsg_attrlen(const struct genlmsghdr *, int)
Return length of message attributes.
void * genlmsg_data(const struct genlmsghdr *)
Return pointer to message payload.
int genlmsg_len(const struct genlmsghdr *)
Return length of message payload including user header.
int genlmsg_valid_hdr(struct nlmsghdr *, int)
Validate Generic Netlink message headers.
void * genlmsg_user_data(const struct genlmsghdr *, const int)
Return pointer to user data.