libnl 3.7.0

Definition of a Generic Netlink family. More...

#include <netlink/genl/mngt.h>

Data Fields

unsigned int o_hdrsize
 Length of user header. More...
 
int o_id
 Numeric identifier, automatically filled in by genl_ops_resolve() More...
 
char * o_name
 Human readable name, used by genl_ops_resolve() to resolve numeric id. More...
 
struct nl_cache_ops * o_cache_ops
 If registered via genl_register(), will point to the related cache operations. More...
 
struct genl_cmdo_cmds
 Optional array defining the available Generic Netlink commands. More...
 
int o_ncmds
 Number of elements in o_cmds array. More...
 

Private Attributes

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

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
int genl_register_family(struct genl_ops *)
Register Generic Netlink family and associated commands.
Definition: mngt.c:164
Definition of a Generic Netlink command.
Definition: mngt.h:82
Definition of a Generic Netlink family.
Definition: mngt.h:127
char * o_name
Human readable name, used by genl_ops_resolve() to resolve numeric id.
Definition: mngt.h:135
struct genl_cmd * o_cmds
Optional array defining the available Generic Netlink commands.
Definition: mngt.h:144
See also
genl_cmd

Definition at line 126 of file mngt.h.

Field Documentation

◆ o_hdrsize

unsigned int genl_ops::o_hdrsize

Length of user header.

Definition at line 129 of file mngt.h.

◆ o_id

int genl_ops::o_id

Numeric identifier, automatically filled in by genl_ops_resolve()

Definition at line 132 of file mngt.h.

Referenced by genl_register_family().

◆ o_name

char* genl_ops::o_name

Human readable name, used by genl_ops_resolve() to resolve numeric id.

Definition at line 135 of file mngt.h.

Referenced by genl_register_family().

◆ o_cache_ops

struct nl_cache_ops* genl_ops::o_cache_ops

If registered via genl_register(), will point to the related cache operations.

Definition at line 141 of file mngt.h.

◆ o_cmds

struct genl_cmd* genl_ops::o_cmds

Optional array defining the available Generic Netlink commands.

Definition at line 144 of file mngt.h.

Referenced by genl_register_family().

◆ o_ncmds

int genl_ops::o_ncmds

Number of elements in o_cmds array.

Definition at line 147 of file mngt.h.

Referenced by genl_register_family().

◆ o_list

struct nl_list_head genl_ops::o_list
private

Used internally to link together all registered operations.

Definition at line 153 of file mngt.h.

Referenced by genl_mngt_resolve(), genl_register_family(), and genl_unregister_family().