libnl 3.5.0

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

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

References nl_object_put().

Referenced by genl_ctrl_resolve().

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 216 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 229 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 248 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 261 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 278 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 291 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 310 of file family.c.