summaryrefslogtreecommitdiffstats
path: root/utils/nf-log.c
diff options
context:
space:
mode:
authorDuncan Roe <duncan_roe@optusnet.com.au>2021-09-16 12:58:22 +1000
committerPablo Neira Ayuso <pablo@netfilter.org>2021-09-20 13:40:40 +0200
commita70dfaff5cf9f34100c48548dcc07e8e1ded64a6 (patch)
tree09abb51be83efeacfc003c6f4ce303c12382bbd4 /utils/nf-log.c
parent6ffbfc53f517b8e5c3dcbd3665b310d566de3898 (diff)
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 <duncan_roe@optusnet.com.au> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'utils/nf-log.c')
-rw-r--r--utils/nf-log.c8
1 files changed, 4 insertions, 4 deletions
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);