libnl  3.2.24-rc1
Generic Netlink Family Object

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

struct genl_family* genl_family_alloc ( void  )
read

Allocate new Generic Netlink family object.

Returns
Newly allocated Generic Netlink family object or NULL.

Definition at line 181 of file family.c.

References nl_object_alloc().

+ Here is the call graph for this function:

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 195 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:

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 213 of file family.c.

Referenced by genl_ctrl_resolve().

+ Here is the caller graph for this function:

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 226 of file family.c.

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 245 of file family.c.

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 258 of file family.c.

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 275 of file family.c.

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 288 of file family.c.

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 307 of file family.c.