libnl  3.2.24-rc1
genl_ops Struct Reference

Definition of a Generic Netlink family. More...

#include <netlink/genl/mngt.h>

Data Fields

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 nl_cache_ops * o_cache_ops
 If registered via genl_register(), will point to the related cache operations.
 
struct genl_cmdo_cmds
 Optional array defining the available Generic Netlink commands.
 
int o_ncmds
 Number of elements in o_cmds array.
 

Private Attributes

struct nl_list_head o_list
 Used internally to link together all registered operations.
 

Detailed Description

Definition of a Generic Netlink family.

Example:
static struct genl_cmd foo_cmds[] = {
[...]
};
static struct genl_ops my_genl_ops = {
.o_name = "foo",
.o_hdrsize = sizeof(struct my_hdr),
.o_cmds = foo_cmds,
.o_ncmds = ARRAY_SIZE(foo_cmds),
};
if ((err = genl_register_family(&my_genl_ops)) < 0)
// ERROR
See Also
genl_cmd

Definition at line 132 of file mngt.h.