link/api: Improve API documentation.

This commit is contained in:
Thomas Graf 2010-11-11 16:38:53 +01:00
parent 67aeb7474f
commit 12b82e4f6f
4 changed files with 26 additions and 17 deletions

View file

@ -19,16 +19,16 @@ extern "C" {
#endif
/**
* @ingroup link_info
* @ingroup link_api
*
* Link info operations
* Available operations to modules implementing a link info type.
*/
struct rtnl_link_info_ops
{
/** Name of operations, must match name on kernel side */
/** Name of link info type, must match name on kernel side */
char * io_name;
/** Reference count (internal, do not use) */
/** Reference count, DO NOT MODIFY */
int io_refcnt;
/** Called to assign an info type to a link.
@ -69,6 +69,11 @@ extern int rtnl_link_register_info(struct rtnl_link_info_ops *);
extern int rtnl_link_unregister_info(struct rtnl_link_info_ops *);
/**
* @ingroup link_api
*
* Available operations to modules implementing a link address family.
*/
struct rtnl_link_af_ops
{
/** The address family this operations set implements */

View file

@ -11,8 +11,8 @@
/**
* @ingroup link
* @defgroup link_info Link Info API
* @brief
* @defgroup link_API Link Modules API
* @brief API for modules implementing specific link types/semantics.
*
* @par 1) Registering/Unregistering a new link info type
* @code
@ -58,6 +58,11 @@ static struct rtnl_link_info_ops *__rtnl_link_info_ops_lookup(const char *name)
return NULL;
}
/**
* @name Link Info Modules
* @{
*/
/**
* Return operations of a specific link info type
* @arg name Name of link info type.
@ -147,6 +152,13 @@ int rtnl_link_unregister_info(struct rtnl_link_info_ops *ops)
return -NLE_OPNOTSUPP;
}
/** @} */
/**
* @name Link Address Family Modules
* @{
*/
static struct rtnl_link_af_ops *af_ops[AF_MAX];
/**
@ -242,3 +254,5 @@ int rtnl_link_af_unregister(struct rtnl_link_af_ops *ops)
/** @} */
/** @} */

View file

@ -9,14 +9,6 @@
* Copyright (c) 2010 Thomas Graf <tgraf@suug.ch>
*/
/**
* @ingroup link
* @defgroup link_bridge Bridge Specifics
* @brief
*
* @{
*/
#include <netlink-local.h>
#include <netlink/netlink.h>
#include <netlink/attr.h>
@ -89,5 +81,3 @@ static void __exit bridge_exit(void)
{
rtnl_link_af_unregister(&bridge_ops);
}
/** @} */

View file

@ -10,7 +10,7 @@
*/
/**
* @ingroup link_info
* @ingroup link_api
* @defgroup vlan VLAN
* @brief
*