libnl 3.7.0

Object representing a kernel side registered Generic Netlink family. More...

Object Allocation

struct genl_family * genl_family_alloc (void)
 Allocate new Generic Netlink family object. More...
 
void genl_family_put (struct genl_family *family)
 Release reference on Generic Netlink family object. More...
 

Numeric Identifier

unsigned int genl_family_get_id (struct genl_family *family)
 Return numeric identifier. More...
 
void genl_family_set_id (struct genl_family *family, unsigned int id)
 Set the numeric identifier. More...
 

Human Readable Name

char * genl_family_get_name (struct genl_family *family)
 Return human readable name. More...
 
void genl_family_set_name (struct genl_family *family, const char *name)
 Set human readable name. More...
 

Interface Version

uint8_t genl_family_get_version (struct genl_family *family)
 Return interface version. More...
 
void genl_family_set_version (struct genl_family *family, uint8_t version)
 Set interface version. More...
 

Header Size

uint32_t genl_family_get_hdrsize (struct genl_family *family)
 Return user header size expected by kernel component. More...
 
void genl_family_set_hdrsize (struct genl_family *family, uint32_t hdrsize)
 

Maximum Expected Attribute

uint32_t genl_family_get_maxattr (struct genl_family *family)
 
void genl_family_set_maxattr (struct genl_family *family, uint32_t maxattr)
 

Operations

int genl_family_add_op (struct genl_family *family, int id, int flags)
 
int genl_family_add_grp (struct genl_family *family, uint32_t id, const char *name)
 

Detailed Description

Object representing a kernel side registered Generic Netlink family.

Function Documentation

◆ genl_family_alloc()

struct genl_family * genl_family_alloc ( void  )

Allocate new Generic Netlink family object.

Returns
Newly allocated Generic Netlink family object or NULL.

Definition at line 180 of file family.c.

References nl_object_alloc().

+ Here is the call graph for this function:

◆ genl_family_put()

void genl_family_put ( struct genl_family *  family)

Release reference on Generic Netlink family object.

Parameters
familyGeneric Netlink family object

Reduces the reference counter of a Generic Netlink family object by one. The object is freed after the last user has returned its reference.

See also
nl_object_put()

Definition at line 194 of file family.c.

References nl_object_put().

Referenced by genl_ctrl_resolve(), and genl_ctrl_resolve_grp().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ genl_family_get_id()

unsigned int genl_family_get_id ( struct genl_family *  family)

Return numeric identifier.

Parameters
familyGeneric Netlink family object
Returns
Numeric identifier or 0 if not available.

Definition at line 212 of file family.c.

Referenced by genl_ctrl_resolve().

+ Here is the caller graph for this function:

◆ genl_family_set_id()

void genl_family_set_id ( struct genl_family *  family,
unsigned int  id 
)

Set the numeric identifier.

Parameters
familyGeneric Netlink family object
idNew numeric identifier

Definition at line 225 of file family.c.

◆ genl_family_get_name()

char * genl_family_get_name ( struct genl_family *  family)

Return human readable name.

Parameters
familyGeneric Netlink family object
Returns
Name of family or NULL if not available

Definition at line 244 of file family.c.

◆ genl_family_set_name()

void genl_family_set_name ( struct genl_family *  family,
const char *  name 
)

Set human readable name.

Parameters
familyGeneric Netlink family object
nameNew human readable name

Definition at line 257 of file family.c.

◆ genl_family_get_version()

uint8_t genl_family_get_version ( struct genl_family *  family)

Return interface version.

Parameters
familyGeneric Netlink family object
Returns
Interface version or 0 if not available.

Definition at line 274 of file family.c.

◆ genl_family_set_version()

void genl_family_set_version ( struct genl_family *  family,
uint8_t  version 
)

Set interface version.

Parameters
familyGeneric Netlink family object
versionNew interface version

Definition at line 287 of file family.c.

◆ genl_family_get_hdrsize()

uint32_t genl_family_get_hdrsize ( struct genl_family *  family)

Return user header size expected by kernel component.

Parameters
familyGeneric Netlink family object
Returns
Expected header length or 0 if not available.

Definition at line 306 of file family.c.

◆ genl_family_set_hdrsize()

void genl_family_set_hdrsize ( struct genl_family *  family,
uint32_t  hdrsize 
)

Definition at line 314 of file family.c.

◆ genl_family_get_maxattr()

uint32_t genl_family_get_maxattr ( struct genl_family *  family)

Definition at line 327 of file family.c.

◆ genl_family_set_maxattr()

void genl_family_set_maxattr ( struct genl_family *  family,
uint32_t  maxattr 
)

Definition at line 335 of file family.c.

◆ genl_family_add_op()

int genl_family_add_op ( struct genl_family *  family,
int  id,
int  flags 
)

Definition at line 348 of file family.c.

◆ genl_family_add_grp()

int genl_family_add_grp ( struct genl_family *  family,
uint32_t  id,
const char *  name 
)

Definition at line 365 of file family.c.