summaryrefslogtreecommitdiff
path: root/print-isakmp.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-06-15 15:44:51 +0200
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2019-03-26 21:06:23 +0100
commit1af20c3adc4dfef93de41d4fcd02f0aeb6bbfd4e (patch)
treed56286b07d210e783a1bc3e9d85fdb8be51f6b6a /print-isakmp.c
parent176e182416d822df0f9d4695410479e8b17a07b3 (diff)
downloadtcpdump-1af20c3adc4dfef93de41d4fcd02f0aeb6bbfd4e.tar.gz
Add the ndo parameter to some functions
This parameter will be needed at the next step.
Diffstat (limited to 'print-isakmp.c')
-rw-r--r--print-isakmp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/print-isakmp.c b/print-isakmp.c
index 17e7ede9..3af263a8 100644
--- a/print-isakmp.c
+++ b/print-isakmp.c
@@ -766,7 +766,7 @@ cookie_find(const cookie_t *in)
/* record initiator */
static void
-cookie_record(const cookie_t *in, const u_char *bp2)
+cookie_record(netdissect_options *ndo, const cookie_t *in, const u_char *bp2)
{
int i;
const struct ip *ip;
@@ -802,10 +802,10 @@ cookie_record(const cookie_t *in, const u_char *bp2)
ninitiator = (ninitiator + 1) % MAXINITIATORS;
}
-#define cookie_isinitiator(x, y) cookie_sidecheck((x), (y), 1)
-#define cookie_isresponder(x, y) cookie_sidecheck((x), (y), 0)
+#define cookie_isinitiator(ndo, x, y) cookie_sidecheck(ndo, (x), (y), 1)
+#define cookie_isresponder(ndo, x, y) cookie_sidecheck(ndo, (x), (y), 0)
static int
-cookie_sidecheck(int i, const u_char *bp2, int initiator)
+cookie_sidecheck(netdissect_options *ndo, int i, const u_char *bp2, int initiator)
{
const struct ip *ip;
const struct ip6_hdr *ip6;
@@ -2831,13 +2831,13 @@ ikev1_print(netdissect_options *ndo,
/* the first packet */
ND_PRINT(" I");
if (bp2)
- cookie_record(&base->i_ck, bp2);
+ cookie_record(ndo, &base->i_ck, bp2);
} else
ND_PRINT(" ?");
} else {
- if (bp2 && cookie_isinitiator(i, bp2))
+ if (bp2 && cookie_isinitiator(ndo, i, bp2))
ND_PRINT(" I");
- else if (bp2 && cookie_isresponder(i, bp2))
+ else if (bp2 && cookie_isresponder(ndo, i, bp2))
ND_PRINT(" R");
else
ND_PRINT(" ?");