From a70dfaff5cf9f34100c48548dcc07e8e1ded64a6 Mon Sep 17 00:00:00 2001 From: Duncan Roe Date: Thu, 16 Sep 2021 12:58:22 +1000 Subject: src: doc: revise doxygen for module "Netlink message helper functions" Adjust style to work better in a man page. Document actual return values. Replace qnum with gnum (and in .h and utils/). Show possible copy modes (rather than refer users to header file) Signed-off-by: Duncan Roe Signed-off-by: Pablo Neira Ayuso --- utils/nf-log.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'utils/nf-log.c') diff --git a/utils/nf-log.c b/utils/nf-log.c index ad8369c..e6832b0 100644 --- a/utils/nf-log.c +++ b/utils/nf-log.c @@ -144,13 +144,13 @@ int main(int argc, char *argv[]) char buf[MNL_SOCKET_BUFFER_SIZE]; struct nlmsghdr *nlh; int ret; - unsigned int portid, qnum; + unsigned int portid, gnum; if (argc != 2) { printf("Usage: %s [queue_num]\n", argv[0]); exit(EXIT_FAILURE); } - qnum = atoi(argv[1]); + gnum = atoi(argv[1]); nl = mnl_socket_open(NETLINK_NETFILTER); if (nl == NULL) { @@ -188,7 +188,7 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - nlh = nflog_nlmsg_put_header(buf, NFULNL_MSG_CONFIG, AF_INET, qnum); + nlh = nflog_nlmsg_put_header(buf, NFULNL_MSG_CONFIG, AF_INET, gnum); if (nflog_attr_put_cfg_cmd(nlh, NFULNL_CFG_CMD_BIND) < 0) { perror("nflog_attr_put_cfg_cmd"); exit(EXIT_FAILURE); @@ -199,7 +199,7 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - nlh = nflog_nlmsg_put_header(buf, NFULNL_MSG_CONFIG, AF_UNSPEC, qnum); + nlh = nflog_nlmsg_put_header(buf, NFULNL_MSG_CONFIG, AF_UNSPEC, gnum); if (nflog_attr_put_cfg_mode(nlh, NFULNL_COPY_PACKET, 0xffff) < 0) { perror("nflog_attr_put_cfg_mode"); exit(EXIT_FAILURE); -- cgit v1.2.3