From: Duncan Roe <duncan_roe@optusnet.com.au>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH libnetfilter_log 1/2] utils: nfulnl_test: Agree with man pages
Date: Tue, 21 Sep 2021 18:53:14 +1000 [thread overview]
Message-ID: <20210921085315.4340-2-duncan_roe@optusnet.com.au> (raw)
In-Reply-To: <20210921085315.4340-1-duncan_roe@optusnet.com.au>
Use the same variable name as the man pages / html for functions in the Parsing
module (e.g. nflog_get_msg_packet_hdr(nfad)).
Rationale: make it easier for users to follow the code
Signed-off-by: Duncan Roe <duncan_roe@optusnet.com.au>
---
utils/nfulnl_test.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/utils/nfulnl_test.c b/utils/nfulnl_test.c
index 05ddc6c..237adc3 100644
--- a/utils/nfulnl_test.c
+++ b/utils/nfulnl_test.c
@@ -6,15 +6,15 @@
#include <libnetfilter_log/libnetfilter_log.h>
-static int print_pkt(struct nflog_data *ldata)
+static int print_pkt(struct nflog_data *nfad)
{
- struct nfulnl_msg_packet_hdr *ph = nflog_get_msg_packet_hdr(ldata);
- uint32_t mark = nflog_get_nfmark(ldata);
- uint32_t indev = nflog_get_indev(ldata);
- uint32_t outdev = nflog_get_outdev(ldata);
- char *prefix = nflog_get_prefix(ldata);
+ struct nfulnl_msg_packet_hdr *ph = nflog_get_msg_packet_hdr(nfad);
+ uint32_t mark = nflog_get_nfmark(nfad);
+ uint32_t indev = nflog_get_indev(nfad);
+ uint32_t outdev = nflog_get_outdev(nfad);
+ char *prefix = nflog_get_prefix(nfad);
char *payload;
- int payload_len = nflog_get_payload(ldata, &payload);
+ int payload_len = nflog_get_payload(nfad, &payload);
if (ph) {
printf("hw_protocol=0x%04x hook=%u ",
--
2.17.5
next prev parent reply other threads:[~2021-09-21 8:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 8:53 [PATCH libnetfilter_log 0/2] utils: nfulnl_test: Test nflog_get_packet_hw Duncan Roe
2021-09-21 8:53 ` Duncan Roe [this message]
2021-09-28 10:50 ` [PATCH libnetfilter_log 1/2] utils: nfulnl_test: Agree with man pages Pablo Neira Ayuso
2021-09-21 8:53 ` [PATCH libnetfilter_log 2/2] utils: nfulnl_test: Add rather extensive test of nflog_get_packet_hw() Duncan Roe
2021-09-28 10:50 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210921085315.4340-2-duncan_roe@optusnet.com.au \
--to=duncan_roe@optusnet.com.au \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).