libnl: Generic Netlink Family Object

libnl 3.10.0

Generic Netlink Family Object
Generic Netlink Library (libnl-genl) » Controller (Resolver)

## Object Allocation
struct genl_family * | genl_family_alloc (void)
| Allocate new Generic Netlink family object.
void | genl_family_put (struct genl_family *family)
| Release reference on Generic Netlink family object.

## Numeric Identifier
unsigned int | genl_family_get_id (struct genl_family *family)
| Return numeric identifier.
void | genl_family_set_id (struct genl_family *family, unsigned int id)
| Set the numeric identifier.

## Human Readable Name
char * | genl_family_get_name (struct genl_family *family)
| Return human readable name.
void | genl_family_set_name (struct genl_family *family, const char *name)
| Set human readable name.

## Interface Version
uint8_t | genl_family_get_version (struct genl_family *family)
| Return interface version.
void | genl_family_set_version (struct genl_family *family, uint8_t version)
| Set interface version.

## Header Size
uint32_t | genl_family_get_hdrsize (struct genl_family *family)
| Return user header size expected by kernel component.
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 189 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

  family | Generic 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 203 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

  family | Generic Netlink family object

Returns
  Numeric identifier or 0 if not available.

Definition at line 221 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

  family | Generic Netlink family object
  id | New numeric identifier

Definition at line 234 of file family.c.

## ◆ genl_family_get_name()

char * genl_family_get_name | ( | struct genl_family * | family | ) |

Return human readable name.

Parameters

  family | Generic Netlink family object

Returns
  Name of family or NULL if not available

Definition at line 253 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

  family | Generic Netlink family object
  name | New human readable name

Definition at line 266 of file family.c.

## ◆ genl_family_get_version()

uint8_t genl_family_get_version | ( | struct genl_family * | family | ) |

Return interface version.

Parameters

  family | Generic Netlink family object

Returns
  Interface version or 0 if not available.

Definition at line 283 of file family.c.

## ◆ genl_family_set_version()

void genl_family_set_version | ( | struct genl_family * | family,
|  | uint8_t | version )

Set interface version.

Parameters

  family | Generic Netlink family object
  version | New interface version

Definition at line 296 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

  family | Generic Netlink family object

Returns
  Expected header length or 0 if not available.

Definition at line 315 of file family.c.

## ◆ genl_family_set_hdrsize()

void genl_family_set_hdrsize | ( | struct genl_family * | family,
|  | uint32_t | hdrsize )

Definition at line 323 of file family.c.

## ◆ genl_family_get_maxattr()

uint32_t genl_family_get_maxattr | ( | struct genl_family * | family | ) |

Definition at line 336 of file family.c.

## ◆ genl_family_set_maxattr()

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

Definition at line 344 of file family.c.

## ◆ genl_family_add_op()

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

Definition at line 357 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 374 of file family.c.