12 #ifndef NETLINK_GENL_MNGT_H_ 13 #define NETLINK_GENL_MNGT_H_ 15 #include <netlink/netlink.h> 16 #include <netlink/attr.h> 17 #include <netlink/list.h> 40 struct sockaddr_nl *
who;
43 struct nlmsghdr *
nlh;
struct sockaddr_nl * who
Socket address of sender.
int genl_mngt_resolve(struct nl_sock *)
Resolve all registered Generic Netlink families.
struct nla_policy * c_attr_policy
Attribute validation policy, enforced before the callback is called.
int genl_handle_msg(struct nl_msg *, void *)
Run a received message through the demultiplexer.
int genl_register(struct nl_cache_ops *)
Register Generic Netlink family backed cache.
struct genl_cmd * o_cmds
Optional array defining the available Generic Netlink commands.
Definition of a Generic Netlink command.
Attribute validation policy.
char * c_name
Human readable name (required)
int o_ncmds
Number of elements in o_cmds array.
int genl_unregister_family(struct genl_ops *)
Unregister Generic Netlink family.
int c_id
Numeric command identifier (required)
void genl_unregister(struct nl_cache_ops *)
Unregister cache based Generic Netlink family.
Definition of a Generic Netlink family.
int genl_ops_resolve(struct nl_sock *, struct genl_ops *)
Resolve a single Generic Netlink family.
Informative structure passed on to message parser callbacks.
int genl_register_family(struct genl_ops *)
Register Generic Netlink family and associated commands.
struct nl_cache_ops * o_cache_ops
If registered via genl_register(), will point to the related cache operations.
struct genlmsghdr * genlhdr
Pointer to Generic Netlink message header.
struct nlmsghdr * nlh
Pointer to Netlink message header.
unsigned int o_hdrsize
Length of user header.
int o_id
Numeric identifier, automatically filled in by genl_ops_resolve()
char * o_name
Human readable name, used by genl_ops_resolve() to resolve numeric id.
struct nlattr ** attrs
Pointer to array of parsed attributes.
int(* c_msg_parser)(struct nl_cache_ops *, struct genl_cmd *, struct genl_info *, void *)
Called whenever a message for this command is received.
struct nl_list_head o_list
Used internally to link together all registered operations.
int c_maxattr
Maximum attribute identifier that the command is prepared to handle.
void * userhdr
Pointer to user header.