summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-01-31 08:33:31 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-01-31 08:33:31 +0100
commit150fa329b589d8e052d2b739a43c53b3252e9a07 (patch)
tree8734ecb75f8572c74737f1aeed67c266fc772c17
parent77ece6d435c77c3bf1ff221e295408ca268444df (diff)
downloadtcpdump-150fa329b589d8e052d2b739a43c53b3252e9a07.tar.gz
Remove unneeded '&' when getting a pointer to a nd_ipv6 type
-rw-r--r--print-aodv.c24
-rw-r--r--print-dhcp6.c4
-rw-r--r--print-icmp6.c12
-rw-r--r--print-ospf6.c2
-rw-r--r--print-ripng.c3
5 files changed, 23 insertions, 22 deletions
diff --git a/print-aodv.c b/print-aodv.c
index abec0104..bb7ba33f 100644
--- a/print-aodv.c
+++ b/print-aodv.c
@@ -312,9 +312,9 @@ aodv_v6_rreq(netdissect_options *ndo, const u_char *dat, u_int length)
EXTRACT_U_1(ap->rreq_type) & RREQ_UNKNOWN ? "[U] " : " ",
EXTRACT_U_1(ap->rreq_hops),
EXTRACT_BE_U_4(ap->rreq_id),
- ip6addr_string(ndo, &ap->rreq_da),
+ ip6addr_string(ndo, ap->rreq_da),
EXTRACT_BE_U_4(ap->rreq_ds),
- ip6addr_string(ndo, &ap->rreq_oa),
+ ip6addr_string(ndo, ap->rreq_oa),
EXTRACT_BE_U_4(ap->rreq_os));
i = length - sizeof(*ap);
if (i >= sizeof(struct aodv_ext))
@@ -340,9 +340,9 @@ aodv_v6_rrep(netdissect_options *ndo, const u_char *dat, u_int length)
EXTRACT_U_1(ap->rrep_type) & RREP_ACK ? "[A] " : " ",
EXTRACT_U_1(ap->rrep_ps) & RREP_PREFIX_MASK,
EXTRACT_U_1(ap->rrep_hops),
- ip6addr_string(ndo, &ap->rrep_da),
+ ip6addr_string(ndo, ap->rrep_da),
EXTRACT_BE_U_4(ap->rrep_ds),
- ip6addr_string(ndo, &ap->rrep_oa),
+ ip6addr_string(ndo, ap->rrep_oa),
EXTRACT_BE_U_4(ap->rrep_life));
i = length - sizeof(*ap);
if (i >= sizeof(struct aodv_ext))
@@ -372,8 +372,8 @@ aodv_v6_rerr(netdissect_options *ndo, const u_char *dat, u_int length)
ND_TCHECK_SIZE(dp6);
if (i < sizeof(*dp6))
goto trunc;
- ND_PRINT(" {%s}(%u)", ip6addr_string(ndo, &dp6->u_da),
- EXTRACT_BE_U_4(dp6->u_ds));
+ ND_PRINT(" {%s}(%u)", ip6addr_string(ndo, dp6->u_da),
+ EXTRACT_BE_U_4(dp6->u_ds));
dp6++;
i -= sizeof(*dp6);
}
@@ -401,9 +401,9 @@ aodv_v6_draft_01_rreq(netdissect_options *ndo, const u_char *dat, u_int length)
EXTRACT_U_1(ap->rreq_type) & RREQ_UNKNOWN ? "[U] " : " ",
EXTRACT_U_1(ap->rreq_hops),
EXTRACT_BE_U_4(ap->rreq_id),
- ip6addr_string(ndo, &ap->rreq_da),
+ ip6addr_string(ndo, ap->rreq_da),
EXTRACT_BE_U_4(ap->rreq_ds),
- ip6addr_string(ndo, &ap->rreq_oa),
+ ip6addr_string(ndo, ap->rreq_oa),
EXTRACT_BE_U_4(ap->rreq_os));
i = length - sizeof(*ap);
if (i >= sizeof(struct aodv_ext))
@@ -429,9 +429,9 @@ aodv_v6_draft_01_rrep(netdissect_options *ndo, const u_char *dat, u_int length)
EXTRACT_U_1(ap->rrep_type) & RREP_ACK ? "[A] " : " ",
EXTRACT_U_1(ap->rrep_ps) & RREP_PREFIX_MASK,
EXTRACT_U_1(ap->rrep_hops),
- ip6addr_string(ndo, &ap->rrep_da),
+ ip6addr_string(ndo, ap->rrep_da),
EXTRACT_BE_U_4(ap->rrep_ds),
- ip6addr_string(ndo, &ap->rrep_oa),
+ ip6addr_string(ndo, ap->rrep_oa),
EXTRACT_BE_U_4(ap->rrep_life));
i = length - sizeof(*ap);
if (i >= sizeof(struct aodv_ext))
@@ -461,8 +461,8 @@ aodv_v6_draft_01_rerr(netdissect_options *ndo, const u_char *dat, u_int length)
ND_TCHECK_SIZE(dp6);
if (i < sizeof(*dp6))
goto trunc;
- ND_PRINT(" {%s}(%u)", ip6addr_string(ndo, &dp6->u_da),
- EXTRACT_BE_U_4(dp6->u_ds));
+ ND_PRINT(" {%s}(%u)", ip6addr_string(ndo, dp6->u_da),
+ EXTRACT_BE_U_4(dp6->u_ds));
dp6++;
i -= sizeof(*dp6);
}
diff --git a/print-dhcp6.c b/print-dhcp6.c
index aa3077f5..f075fe1f 100644
--- a/print-dhcp6.c
+++ b/print-dhcp6.c
@@ -826,10 +826,10 @@ dhcp6_print(netdissect_options *ndo,
ND_TCHECK_16(dh6relay->dh6relay_peeraddr);
- memcpy(&addr6, &dh6relay->dh6relay_linkaddr, sizeof (addr6));
+ memcpy(&addr6, dh6relay->dh6relay_linkaddr, sizeof (addr6));
ND_PRINT("linkaddr=%s", ip6addr_string(ndo, &addr6));
- memcpy(&addr6, &dh6relay->dh6relay_peeraddr, sizeof (addr6));
+ memcpy(&addr6, dh6relay->dh6relay_peeraddr, sizeof (addr6));
ND_PRINT(" peeraddr=%s", ip6addr_string(ndo, &addr6));
dhcp6opt_print(ndo, (const u_char *)(dh6relay + 1), ep);
diff --git a/print-icmp6.c b/print-icmp6.c
index e460092f..47d5c06e 100644
--- a/print-icmp6.c
+++ b/print-icmp6.c
@@ -1451,9 +1451,9 @@ icmp6_opt_print(netdissect_options *ndo, const u_char *bp, int resid)
break;
case ND_OPT_PREFIX_INFORMATION:
opp = (const struct nd_opt_prefix_info *)op;
- ND_TCHECK_16(&opp->nd_opt_pi_prefix);
+ ND_TCHECK_16(opp->nd_opt_pi_prefix);
ND_PRINT("%s/%u%s, Flags [%s], valid time %s",
- ip6addr_string(ndo, &opp->nd_opt_pi_prefix),
+ ip6addr_string(ndo, opp->nd_opt_pi_prefix),
EXTRACT_U_1(opp->nd_opt_pi_prefix_len),
(opt_len != 4) ? "badlen" : "",
bittok2str(icmp6_opt_pi_flag_values, "none", EXTRACT_U_1(opp->nd_opt_pi_flags_reserved)),
@@ -1477,9 +1477,9 @@ icmp6_opt_print(netdissect_options *ndo, const u_char *bp, int resid)
ND_PRINT(" lifetime %us,",
EXTRACT_BE_U_4(oprd->nd_opt_rdnss_lifetime));
for (i = 0; i < l; i++) {
- ND_TCHECK_16(&oprd->nd_opt_rdnss_addr[i]);
+ ND_TCHECK_16(oprd->nd_opt_rdnss_addr[i]);
ND_PRINT(" addr: %s",
- ip6addr_string(ndo, &oprd->nd_opt_rdnss_addr[i]));
+ ip6addr_string(ndo, oprd->nd_opt_rdnss_addr[i]));
}
break;
case ND_OPT_DNSSL:
@@ -2055,7 +2055,7 @@ icmp6_rrenum_print(netdissect_options *ndo, const u_char *bp, const u_char *ep)
ND_PRINT(",min=%u", EXTRACT_U_1(match->rpm_minlen));
ND_PRINT(",max=%u", EXTRACT_U_1(match->rpm_maxlen));
}
- if (addrtostr6(&match->rpm_prefix, hbuf, sizeof(hbuf)))
+ if (addrtostr6(match->rpm_prefix, hbuf, sizeof(hbuf)))
ND_PRINT(",%s/%u", hbuf, EXTRACT_U_1(match->rpm_matchlen));
else
ND_PRINT(",?/%u", EXTRACT_U_1(match->rpm_matchlen));
@@ -2098,7 +2098,7 @@ icmp6_rrenum_print(netdissect_options *ndo, const u_char *bp, const u_char *ep)
ND_PRINT("pltime=%u,",
EXTRACT_BE_U_4(use->rpu_pltime));
}
- if (addrtostr6(&use->rpu_prefix, hbuf, sizeof(hbuf)))
+ if (addrtostr6(use->rpu_prefix, hbuf, sizeof(hbuf)))
ND_PRINT("%s/%u/%u", hbuf, EXTRACT_U_1(use->rpu_uselen),
EXTRACT_U_1(use->rpu_keeplen));
else
diff --git a/print-ospf6.c b/print-ospf6.c
index df27e65d..1283360a 100644
--- a/print-ospf6.c
+++ b/print-ospf6.c
@@ -653,7 +653,7 @@ ospf6_print_lsa(netdissect_options *ndo,
prefixes = EXTRACT_BE_U_4(llsap->llsa_nprefix);
ND_PRINT("\n\t Priority %u, Link-local address %s, Prefixes %u:",
EXTRACT_U_1(llsap->llsa_priority),
- ip6addr_string(ndo, &llsap->llsa_lladdr),
+ ip6addr_string(ndo, llsap->llsa_lladdr),
prefixes);
tptr = (const uint8_t *)llsap->llsa_prefix;
diff --git a/print-ripng.c b/print-ripng.c
index 12c88159..075123cb 100644
--- a/print-ripng.c
+++ b/print-ripng.c
@@ -97,7 +97,8 @@ rip6_entry_print(netdissect_options *ndo, const struct netinfo6 *ni, u_int metri
int l;
uint16_t tag;
- l = ND_PRINT("%s/%u", ip6addr_string(ndo, &ni->rip6_dest), EXTRACT_U_1(ni->rip6_plen));
+ l = ND_PRINT("%s/%u", ip6addr_string(ndo, ni->rip6_dest),
+ EXTRACT_U_1(ni->rip6_plen));
tag = EXTRACT_BE_U_2(ni->rip6_tag);
if (tag)
l += ND_PRINT(" [%u]", tag);