src: doc: Insert SYNOPSIS sections for man pages
PATCH 1/1 src: doc: Insert SYNOPSIS sections for man pages
In order to work with the post-processing logic in doxygen/Makefile.am, SYNOPSIS sections must be inserted at the end of the module description (text after \defgroup or \addtogroup)
(becomes Detailed Description in the man page).
Also a few minor updates including rename module uselessfns to do_not_use
Signed-off-by Duncan Roe <[email protected]>
--- src/extra/icmp.c | 9 +++++++++ src/extra/ipv4.c | 20 +++++++++++++++++++- src/extra/ipv6.c | 10 ++++++++++ src/extra/pktbuff.c | 37 +++++++++++++++++++++++++++++++------ src/extra/tcp.c | 20 ++++++++++++++++++++ src/extra/udp.c | 20 ++++++++++++++++++++ src/libnetfilter_queue.c | 37 +++++++++++++++++++++++++++++++++++-- src/nlmsg.c | 27 +++++++++++++++++++++++++++ 8 files changed, 171 insertions(+), 9 deletions(-)
src/extra/icmp.c +9 -0
@@ -19,6 +19,15 @@/** * \defgroup icmp ICMP helper functions +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libmnl/libmnl.h> +#include <libnetfilter_queue/libnetfilter_queue_icmp.h> +\endmanonly +* * @{ */
src/extra/ipv4.c +19 -1
@@ -22,6 +22,15 @@/** * \defgroup ipv4 IPv4 helper functions +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libmnl/libmnl.h> +#include <libnetfilter_queue/libnetfilter_queue_ipv4.h> +\endmanonly +* * @{ */
@@ -86,6 +95,15 @@ int nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph)* \defgroup ip_internals Internal IP functions * * Most user-space programs will never need these. +* +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libmnl/libmnl.h> +#include <libnetfilter_queue/libnetfilter_queue_ipv4.h> +\endmanonly * * @{ */
@@ -142,7 +160,7 @@ int nfq_ip_mangle(struct pkt_buff *pktb, unsigned int dataoff, }/** -* nfq_pkt_snprintf_ip - print IPv4 header into buffer in iptables LOG format +* nfq_ip_snprintf - print IPv4 header into buffer in iptables LOG format * \param buf: Pointer to buffer that will be used to print the header * \param size: Size of the buffer (or remaining room in it) * \param iph: Pointer to a valid IPv4 header
src/extra/ipv6.c +10 -0
@@ -23,6 +23,16 @@/** * \defgroup ipv6 IPv6 helper functions +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <arpa/inet.h> +#include <libnetfilter_queue/libnetfilter_queue.h> +#include <libnetfilter_queue/libnetfilter_queue_ipv6.h> +\endmanonly +* * @{ */
src/extra/pktbuff.c +31 -6
@@ -23,8 +23,17 @@/** * \defgroup pktbuff User-space network packet buffer * -* This library provides the user-space network packet buffer. This abstraction -* is strongly inspired by Linux kernel network buffer, the so-called sk_buff. +* These functions provide the user-space network packet buffer. +* This abstraction is strongly inspired by Linux kernel network buffer, +* the so-called sk_buff. +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libmnl/libmnl.h> +#include <libnetfilter_queue/pktbuff.h> +\endmanonly * * @{ */
@@ -150,20 +159,36 @@ void pktb_free(struct pkt_buff *pktb)* \n * 1. Functions to get values of members of opaque __struct pktbuff__, described * below -* \n +* * 2. Internal functions, described in Module __Internal functions__ +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libmnl/libmnl.h> +#include <libnetfilter_queue/pktbuff.h> +\endmanonly * * @{ */ /** -* \defgroup uselessfns Internal functions +* \defgroup do_not_use Internal functions * -* \warning Do not use these functions. Instead, always use the mangle +* Do not use these functions. Instead, always use the mangle * function appropriate to the level at which you are working. * \n * pktb_mangle() uses all the below functions except _pktb_pull_, which is not * used by anything. +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libmnl/libmnl.h> +#include <libnetfilter_queue/pktbuff.h> +\endmanonly * * @{ */
@@ -317,7 +342,7 @@ static int enlarge_pkt(struct pkt_buff *pktb, unsigned int extra)* excess of \b rep_len over \b match_len \warning pktb_mangle does not update any checksums. Developers should use the appropriate mangler for the protocol level: nfq_ip_mangle(), -nfq_tcp_mangle_ipv4() or nfq_udp_mangle_ipv4(). IPv6 versions are planned. +nfq_tcp_mangle_ipv4(), nfq_udp_mangle_ipv4() or IPv6 variants. \n It is appropriate to use pktb_mangle to change the MAC header. */
src/extra/tcp.c +20 -0
@@ -28,6 +28,15 @@/** * \defgroup tcp TCP helper functions +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libmnl/libmnl.h> +#include <libnetfilter_queue/libnetfilter_queue_tcp.h> +\endmanonly +* * @{ */
@@ -90,6 +99,17 @@ unsigned int nfq_tcp_get_payload_len(struct tcphdr *tcph, struct pkt_buff *pktb)* \defgroup tcp_internals Internal TCP functions * * Most user-space programs will never need these. +* +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <netinet/ip.h> +#include <netinet/ip6.h> +#include <netinet/tcp.h> +#include <libnetfilter_queue/libnetfilter_queue_tcp.h> +\endmanonly * * @{ */
src/extra/udp.c +20 -0
@@ -27,6 +27,15 @@/** * \defgroup udp UDP helper functions +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libmnl/libmnl.h> +#include <libnetfilter_queue/libnetfilter_queue_udp.h> +\endmanonly +* * @{ */
@@ -90,6 +99,17 @@ unsigned int nfq_udp_get_payload_len(struct udphdr *udph, struct pkt_buff *pktb)* \defgroup udp_internals Internal UDP functions * * Most user-space programs will never need these. +* +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <netinet/ip.h> +#include <netinet/ip6.h> +#include <netinet/udp.h> +#include <libnetfilter_queue/libnetfilter_queue_udp.h> +\endmanonly * * @{ */
src/libnetfilter_queue.c +35 -2
@@ -270,7 +270,7 @@ struct nfnl_handle *nfq_nfnlh(struct nfq_handle *h)nfq_handle_packet (h, buf, rv); } \endverbatim - * When the decision on a packet has been choosed, the verdict has to be given + * When the decision on a packet has been chosen, the verdict has to be given * by calling nfq_set_verdict() or nfq_set_verdict2(). The verdict * determines the destiny of the packet as follows: *
@@ -287,8 +287,18 @@ struct nfnl_handle *nfq_nfnlh(struct nfq_handle *h)* is to also set an nfmark using nfq_set_verdict2, and set up the nefilter * rules to only queue a packet when the mark is not (yet) set. * -* Data and information about the packet can be fetch by using message parsing +* Data and information about the packet can be fetched by using message parsing * functions (See \link Parsing \endlink). +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <linux/netfilter.h> +#include <linux/netfilter/nfnetlink_queue.h> +#include <libnetfilter_queue/libnetfilter_queue.h> +\endmanonly +* * @{ */
@@ -436,6 +446,13 @@ out_free:* * When the program has finished with libnetfilter_queue, it has to call * the nfq_close() function to free all associated resources. +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libnetfilter_queue/libnetfilter_queue.h> +\endmanonly * * @{ */
@@ -949,6 +966,14 @@ int nfq_set_verdict_mark(struct nfq_q_handle *qh, uint32_t id,/** * \defgroup Parsing Message parsing functions [DEPRECATED] +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libnetfilter_queue/libnetfilter_queue.h> +\endmanonly +* * @{ */
@@ -1348,6 +1373,14 @@ do { \/** * \defgroup Printing Printing [DEPRECATED] +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <libnetfilter_queue/libnetfilter_queue.h> +\endmanonly +* * @{ */
src/nlmsg.c +27 -0
@@ -27,6 +27,15 @@/** * \defgroup nfq_verd Verdict helpers +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <linux/netfilter.h> +#include <libnetfilter_queue/libnetfilter_queue.h> +\endmanonly +* * @{ */
@@ -139,6 +148,15 @@ void nfq_nlmsg_verdict_put_pkt(struct nlmsghdr *nlh, const void *pkt,/** * \defgroup nfq_cfg Config helpers +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <linux/netfilter/nfnetlink_queue.h> +#include <libnetfilter_queue/libnetfilter_queue.h> +\endmanonly +* * @{ */
@@ -205,6 +223,15 @@ void nfq_nlmsg_cfg_put_qmaxlen(struct nlmsghdr *nlh, uint32_t queue_maxlen)/** * \defgroup nlmsg Netlink message helper functions +* +* \manonly +.SH SYNOPSIS +.nf +\fB +#include <linux/netfilter/nfnetlink_queue.h> +#include <libnetfilter_queue/libnetfilter_queue.h> +\endmanonly +* * @{ */
Signature · 1 line
2.17.5