diff options
author | Thomas Graf <tgr@plip.localdomain> | 2008-12-10 18:12:30 +0100 |
---|---|---|
committer | Thomas Graf <tgr@plip.localdomain> | 2008-12-10 18:12:30 +0100 |
commit | 6782b6f709d03877a5661a4c8d8f8bd1b461f43f (patch) | |
tree | ad8e90d12ecea5eaa5f5d91cc03fc163d5223a86 | |
parent | b624b9ed936f4c23bc4f30d8dce34da49775dd15 (diff) | |
download | libnl-6782b6f709d03877a5661a4c8d8f8bd1b461f43f.tar.gz |
restructure module documentation order
split hiearchy into one top level module per library
-rw-r--r-- | lib/addr.c | 2 | ||||
-rw-r--r-- | lib/cache_mngt.c | 1 | ||||
-rw-r--r-- | lib/data.c | 2 | ||||
-rw-r--r-- | lib/family.c | 62 | ||||
-rw-r--r-- | lib/fib_lookup/lookup.c | 1 | ||||
-rw-r--r-- | lib/genl/genl.c | 1 | ||||
-rw-r--r-- | lib/handlers.c | 2 | ||||
-rw-r--r-- | lib/msg.c | 2 | ||||
-rw-r--r-- | lib/netfilter/nfnl.c | 1 | ||||
-rw-r--r-- | lib/nl.c | 2 | ||||
-rw-r--r-- | lib/route/rtnl.c | 3 | ||||
-rw-r--r-- | lib/socket.c | 2 | ||||
-rw-r--r-- | lib/utils.c | 42 |
13 files changed, 50 insertions, 73 deletions
@@ -10,7 +10,7 @@ */ /** - * @ingroup utils + * @ingroup core * @defgroup addr Abstract Address * * @par 1) Transform character string to abstract address diff --git a/lib/cache_mngt.c b/lib/cache_mngt.c index 4fede92..d57d836 100644 --- a/lib/cache_mngt.c +++ b/lib/cache_mngt.c @@ -10,6 +10,7 @@ */ /** + * @ingroup core * @defgroup cache_mngt Caching * @{ */ @@ -10,7 +10,7 @@ */ /** - * @ingroup utils + * @ingroup core * @defgroup data Abstract Data * @{ */ diff --git a/lib/family.c b/lib/family.c deleted file mode 100644 index ba1d65f..0000000 --- a/lib/family.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * lib/family.c Netlink Family - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation version 2.1 - * of the License. - * - * Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch> - */ - -/** - * @defgroup nlfam Netlink Families - * @brief - * - * @{ - */ - -#include <netlink-local.h> -#include <netlink/netlink.h> -#include <netlink/utils.h> - -/** - * @name Netlink Family Name Translation - * @{ - */ - -static struct trans_tbl nlfamilies[] = { - __ADD(NETLINK_ROUTE,route) - __ADD(NETLINK_USERSOCK,usersock) - __ADD(NETLINK_FIREWALL,firewall) - __ADD(NETLINK_INET_DIAG,inetdiag) - __ADD(NETLINK_NFLOG,nflog) - __ADD(NETLINK_XFRM,xfrm) - __ADD(NETLINK_SELINUX,selinux) - __ADD(NETLINK_ISCSI,iscsi) - __ADD(NETLINK_AUDIT,audit) - __ADD(NETLINK_FIB_LOOKUP,fib_lookup) - __ADD(NETLINK_CONNECTOR,connector) - __ADD(NETLINK_NETFILTER,netfilter) - __ADD(NETLINK_IP6_FW,ip6_fw) - __ADD(NETLINK_DNRTMSG,dnrtmsg) - __ADD(NETLINK_KOBJECT_UEVENT,kobject_uevent) - __ADD(NETLINK_GENERIC,generic) - __ADD(NETLINK_SCSITRANSPORT,scsitransport) - __ADD(NETLINK_ECRYPTFS,ecryptfs) -}; - -char * nl_nlfamily2str(int family, char *buf, size_t size) -{ - return __type2str(family, buf, size, nlfamilies, - ARRAY_SIZE(nlfamilies)); -} - -int nl_str2nlfamily(const char *name) -{ - return __str2type(name, nlfamilies, ARRAY_SIZE(nlfamilies)); -} - -/** @} */ - -/** @} */ diff --git a/lib/fib_lookup/lookup.c b/lib/fib_lookup/lookup.c index bb3837a..ce9c027 100644 --- a/lib/fib_lookup/lookup.c +++ b/lib/fib_lookup/lookup.c @@ -10,7 +10,6 @@ */ /** - * @ingroup nlfam * @defgroup fib_lookup FIB Lookup * @brief * @{ diff --git a/lib/genl/genl.c b/lib/genl/genl.c index 4db17e9..055be91 100644 --- a/lib/genl/genl.c +++ b/lib/genl/genl.c @@ -10,7 +10,6 @@ */ /** - * @ingroup nlfam * @defgroup genl Generic Netlink * * @par Message Format diff --git a/lib/handlers.c b/lib/handlers.c index 36695b2..f13b89e 100644 --- a/lib/handlers.c +++ b/lib/handlers.c @@ -10,7 +10,7 @@ */ /** - * @ingroup nl + * @ingroup core * @defgroup cb Callbacks/Customization * * @details @@ -10,7 +10,7 @@ */ /** - * @ingroup nl + * @ingroup core * @defgroup msg Messages * Netlink Message Construction/Parsing Interface * diff --git a/lib/netfilter/nfnl.c b/lib/netfilter/nfnl.c index b687636..ddce4b9 100644 --- a/lib/netfilter/nfnl.c +++ b/lib/netfilter/nfnl.c @@ -12,7 +12,6 @@ */ /** - * @ingroup nlfam * @defgroup nfnl Netfilter Netlink * * @par Message Format @@ -10,7 +10,7 @@ */ /** - * @defgroup nl Core Netlink API + * @defgroup core Core * * @details * @par 1) Connecting the socket diff --git a/lib/route/rtnl.c b/lib/route/rtnl.c index f87c5f5..2533674 100644 --- a/lib/route/rtnl.c +++ b/lib/route/rtnl.c @@ -10,8 +10,7 @@ */ /** - * @ingroup nlfam - * @defgroup rtnl Routing Netlink + * @defgroup rtnl Routing Family * @{ */ diff --git a/lib/socket.c b/lib/socket.c index 2cebf27..d1874f0 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -10,7 +10,7 @@ */ /** - * @ingroup nl + * @ingroup core * @defgroup socket Socket * @{ */ diff --git a/lib/utils.c b/lib/utils.c index ad25468..263eb38 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -10,6 +10,7 @@ */ /** + * @ingroup core * @defgroup utils Utilities * @{ */ @@ -434,6 +435,47 @@ char * nl_msec2str(uint64_t msec, char *buf, size_t len) /** @} */ /** + * @name Netlink Family Translations + * @{ + */ + +static struct trans_tbl nlfamilies[] = { + __ADD(NETLINK_ROUTE,route) + __ADD(NETLINK_USERSOCK,usersock) + __ADD(NETLINK_FIREWALL,firewall) + __ADD(NETLINK_INET_DIAG,inetdiag) + __ADD(NETLINK_NFLOG,nflog) + __ADD(NETLINK_XFRM,xfrm) + __ADD(NETLINK_SELINUX,selinux) + __ADD(NETLINK_ISCSI,iscsi) + __ADD(NETLINK_AUDIT,audit) + __ADD(NETLINK_FIB_LOOKUP,fib_lookup) + __ADD(NETLINK_CONNECTOR,connector) + __ADD(NETLINK_NETFILTER,netfilter) + __ADD(NETLINK_IP6_FW,ip6_fw) + __ADD(NETLINK_DNRTMSG,dnrtmsg) + __ADD(NETLINK_KOBJECT_UEVENT,kobject_uevent) + __ADD(NETLINK_GENERIC,generic) + __ADD(NETLINK_SCSITRANSPORT,scsitransport) + __ADD(NETLINK_ECRYPTFS,ecryptfs) +}; + +char * nl_nlfamily2str(int family, char *buf, size_t size) +{ + return __type2str(family, buf, size, nlfamilies, + ARRAY_SIZE(nlfamilies)); +} + +int nl_str2nlfamily(const char *name) +{ + return __str2type(name, nlfamilies, ARRAY_SIZE(nlfamilies)); +} + +/** + * @} + */ + +/** * @name Link Layer Protocol Translations * @{ */ |