Lines Matching full:link
2 * lib/route/link/api.c Link Info API
13 * @ingroup link
14 * @defgroup link_API Link Modules API
15 * @brief API for modules implementing specific link types/semantics.
17 * @par 1) Registering/Unregistering a new link info type
45 #include <netlink/route/link.h>
46 #include <netlink-private/route/link/api.h>
65 * @name Link Info Modules
70 * Return operations of a specific link info type
71 * @arg name Name of link info type.
91 * @arg ops Link info operations.
100 * Register operations for a link info type
101 * @arg ops Link info operations
103 * This function must be called by modules implementing a specific link
108 * @return -NLE_INVAL Link info name not specified.
124 NL_DBG(1, "Registered link info operations %s\n", ops->io_name); in rtnl_link_register_info()
134 * Unregister operations for a link info type
135 * @arg ops Link info operations
137 * This function must be called if a module implementing a specific link
143 * @return _NLE_OPNOTSUPP Link info operations not registered.
144 * @return -NLE_BUSY Link info operations still in use.
162 NL_DBG(1, "Unregistered link info operations %s\n", in rtnl_link_unregister_info()
178 * @name Link Address Family Modules
185 * Return operations of a specific link address family
216 * Allocate and return data buffer for link address family modules
217 * @arg link Link object
220 * This function must be called by link address family modules in all
224 * of the buffer upon first use. Link objects will NOT proactively
225 * allocate a data buffer for each registered link address family.
229 void *rtnl_link_af_alloc(struct rtnl_link *link, in rtnl_link_af_alloc() argument
234 if (!link || !ops) in rtnl_link_af_alloc()
239 if (!link->l_af_data[family]) { in rtnl_link_af_alloc()
243 link->l_af_data[family] = ops->ao_alloc(link); in rtnl_link_af_alloc()
244 if (!link->l_af_data[family]) in rtnl_link_af_alloc()
248 return link->l_af_data[family]; in rtnl_link_af_alloc()
252 * Return data buffer for link address family modules
253 * @arg link Link object
256 * This function returns a pointer to the data buffer for the specified link
264 void *rtnl_link_af_data(const struct rtnl_link *link, in rtnl_link_af_data() argument
267 if (!link || !ops) in rtnl_link_af_data()
270 return link->l_af_data[ops->ao_family]; in rtnl_link_af_data()
274 * Register operations for a link address family
277 * This function must be called by modules implementing a specific link
301 NL_DBG(1, "Registered link address family operations %u\n", in rtnl_link_af_register()
311 * Unregister operations for a link address family
314 * This function must be called if a module implementing a specific link
344 NL_DBG(1, "Unregistered link address family operations %u\n", in rtnl_link_af_unregister()
354 * Compare af data for a link address family
355 * @arg a Link object a
356 * @arg b Link object b