From e46569cd8583fd0ed4ed20fc51ff7e2b875c2d11 Mon Sep 17 00:00:00 2001 From: Duncan Roe Date: Sun, 27 Oct 2019 19:49:06 +1100 Subject: Minimally resurrect doxygen documentation The documentation was written in the days before doxygen required groups or even doxygen.cfg, so create doxygen.cfg.in and introduce one \defgroup per source file, encompassing pretty-much the whole file. Also add a tiny \mainpage. Added: doxygen.cfg.in: Same as for libmnl except FILE_PATTERNS = *.c libnfnetlink.h Updated: configure.ac: Create doxygen.cfg src/iftable.c: Add defgroup src/libnfnetlink.c: Add mainpage and defgroup Signed-off-by: Duncan Roe Signed-off-by: Pablo Neira Ayuso --- src/iftable.c | 9 +++++++++ src/libnfnetlink.c | 17 ++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/iftable.c b/src/iftable.c index 157f97b..6d1d135 100644 --- a/src/iftable.c +++ b/src/iftable.c @@ -24,6 +24,11 @@ #include "rtnl.h" #include "linux_list.h" +/** + * \defgroup iftable Functions in iftable.c + * @{ + */ + struct ifindex_node { struct list_head head; @@ -333,3 +338,7 @@ int nlif_fd(struct nlif_handle *h) return -1; } + +/** + * @} + */ diff --git a/src/libnfnetlink.c b/src/libnfnetlink.c index df57533..3db21e0 100644 --- a/src/libnfnetlink.c +++ b/src/libnfnetlink.c @@ -52,6 +52,18 @@ #include +/** + * \mainpage + * + * libnfnetlink is the bottom-level communication between the kernel and + * userspace + */ + +/** + * \defgroup libnfnetlink Functions in libnfnetlink.c + * @{ + */ + #ifndef NETLINK_ADD_MEMBERSHIP #define NETLINK_ADD_MEMBERSHIP 1 #endif @@ -60,7 +72,6 @@ #define SOL_NETLINK 270 #endif - #define nfnl_error(format, args...) \ fprintf(stderr, "%s: " format "\n", __FUNCTION__, ## args) @@ -1572,3 +1583,7 @@ int nfnl_query(struct nfnl_handle *h, struct nlmsghdr *nlh) return nfnl_catch(h); } + +/** + * @} + */ -- cgit v1.2.3