libnl 3.7.0
|
API for modules implementing specific link types/semantics. More...
Modules | |
IPv4 Link Module | |
Implementation of IPv4 specific link attributes. | |
Link Address Family Modules | |
struct rtnl_link_af_ops * | rtnl_link_af_ops_lookup (const unsigned int family) |
Return operations of a specific link address family. More... | |
void | rtnl_link_af_ops_put (struct rtnl_link_af_ops *ops) |
Give back reference to a set of operations. More... | |
void * | rtnl_link_af_alloc (struct rtnl_link *link, const struct rtnl_link_af_ops *ops) |
Allocate and return data buffer for link address family modules. More... | |
void * | rtnl_link_af_data (const struct rtnl_link *link, const struct rtnl_link_af_ops *ops) |
Return data buffer for link address family modules. More... | |
int | rtnl_link_af_register (struct rtnl_link_af_ops *ops) |
Register operations for a link address family. More... | |
int | rtnl_link_af_unregister (struct rtnl_link_af_ops *ops) |
Unregister operations for a link address family. More... | |
int | rtnl_link_af_data_compare (struct rtnl_link *a, struct rtnl_link *b, int family) |
Compare af data for a link address family. More... | |
int | rtnl_link_info_data_compare (struct rtnl_link *a, struct rtnl_link *b, int flags) |
Compare link info data. More... | |
Link Info Modules | |
struct rtnl_link_info_ops * | rtnl_link_info_ops_lookup (const char *name) |
Return operations of a specific link info type. More... | |
void | rtnl_link_info_ops_get (struct rtnl_link_info_ops *ops) |
Take reference to a set of operations. More... | |
void | rtnl_link_info_ops_put (struct rtnl_link_info_ops *ops) |
Give back reference to a set of operations. More... | |
int | rtnl_link_register_info (struct rtnl_link_info_ops *ops) |
Register operations for a link info type. More... | |
int | rtnl_link_unregister_info (struct rtnl_link_info_ops *ops) |
Unregister operations for a link info type. More... | |
API for modules implementing specific link types/semantics.
struct rtnl_link_info_ops * rtnl_link_info_ops_lookup | ( | const char * | name | ) |
Return operations of a specific link info type.
name | Name of link info type. |
Definition at line 71 of file api.c.
Referenced by rtnl_link_set_type().
void rtnl_link_info_ops_get | ( | struct rtnl_link_info_ops * | ops | ) |
void rtnl_link_info_ops_put | ( | struct rtnl_link_info_ops * | ops | ) |
int rtnl_link_register_info | ( | struct rtnl_link_info_ops * | ops | ) |
Register operations for a link info type.
ops | Link info operations |
This function must be called by modules implementing a specific link info type. It will make the operations implemented by the module available for everyone else.
int rtnl_link_unregister_info | ( | struct rtnl_link_info_ops * | ops | ) |
Unregister operations for a link info type.
ops | Link info operations |
This function must be called if a module implementing a specific link info type is unloaded or becomes unavailable. It must provide a set of operations which have previously been registered using rtnl_link_register_info().
struct rtnl_link_af_ops * rtnl_link_af_ops_lookup | ( | const unsigned int | family | ) |
Return operations of a specific link address family.
family | Address family |
Definition at line 206 of file api.c.
Referenced by rtnl_link_af_data_compare().
void rtnl_link_af_ops_put | ( | struct rtnl_link_af_ops * | ops | ) |
Give back reference to a set of operations.
ops | Address family operations. |
Definition at line 223 of file api.c.
Referenced by rtnl_link_af_data_compare().
void * rtnl_link_af_alloc | ( | struct rtnl_link * | link, |
const struct rtnl_link_af_ops * | ops | ||
) |
Allocate and return data buffer for link address family modules.
link | Link object |
ops | Address family operations |
This function must be called by link address family modules in all cases where the API does not provide the data buffer as argument already. This typically includes set functions the module provides. Calling this function is strictly required to ensure proper allocation of the buffer upon first use. Link objects will NOT proactively allocate a data buffer for each registered link address family.
Definition at line 246 of file api.c.
Referenced by rtnl_link_inet_set_conf().
void * rtnl_link_af_data | ( | const struct rtnl_link * | link, |
const struct rtnl_link_af_ops * | ops | ||
) |
Return data buffer for link address family modules.
link | Link object |
ops | Address family operations |
This function returns a pointer to the data buffer for the specified link address family module or NULL if the buffer was not allocated yet. This function is typically used by get functions of modules which are not interested in having the data buffer allocated if no values have been set yet.
Definition at line 281 of file api.c.
Referenced by rtnl_link_inet_get_conf().
int rtnl_link_af_register | ( | struct rtnl_link_af_ops * | ops | ) |
Register operations for a link address family.
ops | Address family operations |
This function must be called by modules implementing a specific link address family. It will make the operations implemented by the module available for everyone else.
int rtnl_link_af_unregister | ( | struct rtnl_link_af_ops * | ops | ) |
Unregister operations for a link address family.
ops | Address family operations |
This function must be called if a module implementing a specific link address family is unloaded or becomes unavailable. It must provide a set of operations which have previously been registered using rtnl_link_af_register().
Compare af data for a link address family.
a | Link object a |
b | Link object b |
family | af data family |
This function will compare af_data between two links a and b of family given by arg family
Definition at line 382 of file api.c.
References rtnl_link_af_ops_lookup(), and rtnl_link_af_ops_put().