summaryrefslogtreecommitdiff
path: root/print-pflog.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-06-16 17:23:21 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-03-26 21:06:24 +0100
commitee68aa36460d7efeca48747f33b7f2adc0900bfb (patch)
tree72c1b65d29301835c0e064b433ea685fc856a68e /print-pflog.c
parent1af20c3adc4dfef93de41d4fcd02f0aeb6bbfd4e (diff)
downloadtcpdump-ee68aa36460d7efeca48747f33b7f2adc0900bfb.tar.gz
Use the new GET_ macros instead of the EXTRACT_ ones
The exceptions are currently: Some EXTRACT_ in print-juniper.c, not used on packet buffer pointer. An EXTRACT_BE_U_3 in addrtoname.c, not always used on packet buffer pointer.
Diffstat (limited to 'print-pflog.c')
-rw-r--r--print-pflog.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/print-pflog.c b/print-pflog.c
index 7cd96b2e..fc83a04b 100644
--- a/print-pflog.c
+++ b/print-pflog.c
@@ -90,17 +90,17 @@ pflog_print(netdissect_options *ndo, const struct pfloghdr *hdr)
uint32_t rulenr, subrulenr;
ndo->ndo_protocol = "pflog";
- rulenr = EXTRACT_BE_U_4(&hdr->rulenr);
- subrulenr = EXTRACT_BE_U_4(&hdr->subrulenr);
+ rulenr = GET_BE_U_4(&hdr->rulenr);
+ subrulenr = GET_BE_U_4(&hdr->subrulenr);
if (subrulenr == (uint32_t)-1)
ND_PRINT("rule %u/", rulenr);
else
ND_PRINT("rule %u.%s.%u/", rulenr, hdr->ruleset, subrulenr);
ND_PRINT("%s: %s %s on %s: ",
- tok2str(pf_reasons, "unkn(%u)", EXTRACT_U_1(&hdr->reason)),
- tok2str(pf_actions, "unkn(%u)", EXTRACT_U_1(&hdr->action)),
- tok2str(pf_directions, "unkn(%u)", EXTRACT_U_1(&hdr->dir)),
+ tok2str(pf_reasons, "unkn(%u)", GET_U_1(&hdr->reason)),
+ tok2str(pf_actions, "unkn(%u)", GET_U_1(&hdr->action)),
+ tok2str(pf_directions, "unkn(%u)", GET_U_1(&hdr->dir)),
hdr->ifname);
}
@@ -140,7 +140,7 @@ pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
pflog_print(ndo, hdr);
/* skip to the real packet */
- af = EXTRACT_U_1(&hdr->af);
+ af = GET_U_1(&hdr->af);
length -= hdrlen;
caplen -= hdrlen;
p += hdrlen;