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