diff options
author | Thomas Graf <tgr@plip.localdomain> | 2008-12-10 17:12:30 (GMT) |
---|---|---|
committer | Thomas Graf <tgr@plip.localdomain> | 2008-12-10 17:12:30 (GMT) |
commit | 6782b6f709d03877a5661a4c8d8f8bd1b461f43f (patch) | |
tree | ad8e90d12ecea5eaa5f5d91cc03fc163d5223a86 /lib/utils.c | |
parent | b624b9ed936f4c23bc4f30d8dce34da49775dd15 (diff) | |
download | libnl-6782b6f709d03877a5661a4c8d8f8bd1b461f43f.zip libnl-6782b6f709d03877a5661a4c8d8f8bd1b461f43f.tar.gz libnl-6782b6f709d03877a5661a4c8d8f8bd1b461f43f.tar.bz2 |
restructure module documentation order
split hiearchy into one top level module per library
Diffstat (limited to 'lib/utils.c')
-rw-r--r-- | lib/utils.c | 42 |
1 files changed, 42 insertions, 0 deletions
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 * @{ */ |