EXTRACT_U_1(ap->rreq_type) & RREQ_UNKNOWN ? "[U] " : " ",
EXTRACT_U_1(ap->rreq_hops),
EXTRACT_BE_U_4(ap->rreq_id),
- ipaddr_string(ndo, &ap->rreq_da),
+ ipaddr_string(ndo, ap->rreq_da),
EXTRACT_BE_U_4(ap->rreq_ds),
- ipaddr_string(ndo, &ap->rreq_oa),
+ ipaddr_string(ndo, ap->rreq_oa),
EXTRACT_BE_U_4(ap->rreq_os));
i = length - sizeof(*ap);
if (i >= sizeof(struct aodv_ext))
EXTRACT_U_1(ap->rrep_type) & RREP_ACK ? "[A] " : " ",
EXTRACT_U_1(ap->rrep_ps) & RREP_PREFIX_MASK,
EXTRACT_U_1(ap->rrep_hops),
- ipaddr_string(ndo, &ap->rrep_da),
+ ipaddr_string(ndo, ap->rrep_da),
EXTRACT_BE_U_4(ap->rrep_ds),
- ipaddr_string(ndo, &ap->rrep_oa),
+ ipaddr_string(ndo, ap->rrep_oa),
EXTRACT_BE_U_4(ap->rrep_life));
i = length - sizeof(*ap);
if (i >= sizeof(struct aodv_ext))
ND_TCHECK_SIZE(dp);
if (i < sizeof(*dp))
goto trunc;
- ND_PRINT(" {%s}(%u)", ipaddr_string(ndo, &dp->u_da),
+ ND_PRINT(" {%s}(%u)", ipaddr_string(ndo, dp->u_da),
EXTRACT_BE_U_4(dp->u_ds));
dp++;
i -= sizeof(*dp);
if (i < sizeof(*dp6))
goto trunc;
ND_PRINT(" {%s}(%u)", ip6addr_string(ndo, dp6->u_da),
- EXTRACT_BE_U_4(dp6->u_ds));
+ EXTRACT_BE_U_4(dp6->u_ds));
dp6++;
i -= sizeof(*dp6);
}
if (i < sizeof(*dp6))
goto trunc;
ND_PRINT(" {%s}(%u)", ip6addr_string(ndo, dp6->u_da),
- EXTRACT_BE_U_4(dp6->u_ds));
+ EXTRACT_BE_U_4(dp6->u_ds));
dp6++;
i -= sizeof(*dp6);
}
switch (icmp6_type) {
case ICMP6_DST_UNREACH:
- ND_TCHECK_16(&oip->ip6_dst);
+ ND_TCHECK_16(oip->ip6_dst);
ND_PRINT(", %s", tok2str(icmp6_dst_unreach_code_values,"unknown unreach code (%u)",icmp6_code));
switch (icmp6_code) {
case ICMP6_DST_UNREACH_NOROUTE: /* fall through */
case ICMP6_DST_UNREACH_ADMIN:
case ICMP6_DST_UNREACH_ADDR:
- ND_PRINT(" %s",ip6addr_string(ndo, &oip->ip6_dst));
+ ND_PRINT(" %s",ip6addr_string(ndo, oip->ip6_dst));
break;
case ICMP6_DST_UNREACH_BEYONDSCOPE:
ND_PRINT(" %s, source address %s",
- ip6addr_string(ndo, &oip->ip6_dst),
- ip6addr_string(ndo, &oip->ip6_src));
+ ip6addr_string(ndo, oip->ip6_dst),
+ ip6addr_string(ndo, oip->ip6_src));
break;
case ICMP6_DST_UNREACH_NOPORT:
if ((ouh = get_upperlayer(ndo, (const u_char *)oip, &prot))
switch (prot) {
case IPPROTO_TCP:
ND_PRINT(", %s tcp port %s",
- ip6addr_string(ndo, &oip->ip6_dst),
+ ip6addr_string(ndo, oip->ip6_dst),
tcpport_string(ndo, dport));
break;
case IPPROTO_UDP:
ND_PRINT(", %s udp port %s",
- ip6addr_string(ndo, &oip->ip6_dst),
+ ip6addr_string(ndo, oip->ip6_dst),
udpport_string(ndo, dport));
break;
default:
ND_PRINT(", %s protocol %u port %u unreachable",
- ip6addr_string(ndo, &oip->ip6_dst),
+ ip6addr_string(ndo, oip->ip6_dst),
prot, dport);
break;
}
ND_PRINT(", mtu %u", EXTRACT_BE_U_4(dp->icmp6_mtu));
break;
case ICMP6_TIME_EXCEEDED:
- ND_TCHECK_16(&oip->ip6_dst);
+ ND_TCHECK_16(oip->ip6_dst);
switch (icmp6_code) {
case ICMP6_TIME_EXCEED_TRANSIT:
ND_PRINT(" for %s",
- ip6addr_string(ndo, &oip->ip6_dst));
+ ip6addr_string(ndo, oip->ip6_dst));
break;
case ICMP6_TIME_EXCEED_REASSEMBLY:
ND_PRINT(" (reassembly)");
}
break;
case ICMP6_PARAM_PROB:
- ND_TCHECK_16(&oip->ip6_dst);
+ ND_TCHECK_16(oip->ip6_dst);
switch (icmp6_code) {
case ICMP6_PARAMPROB_HEADER:
ND_PRINT(", erroneous - octet %u", EXTRACT_BE_U_4(dp->icmp6_pptr));
in6 = (const nd_ipv6 *)(dp + 1);
for (; (const u_char *)in6 < cp; in6++) {
ND_TCHECK_SIZE(in6);
- ND_PRINT(", %s", ip6addr_string(ndo, in6));
+ ND_PRINT(", %s", ip6addr_string(ndo, (const u_char *)in6));
}
}
break;
default:
goto trunc;
}
- ND_PRINT(" %s/%u", ip6addr_string(ndo, &in6),
+ ND_PRINT(" %s/%u", ip6addr_string(ndo, (const u_char *)&in6),
EXTRACT_U_1(opri->nd_opt_rti_prefixlen));
ND_PRINT(", pref=%s", get_rtpref(EXTRACT_U_1(opri->nd_opt_rti_flags)));
ND_PRINT(", lifetime=%s",
break;
}
+ cp = (const u_char *)(ni6 + 1);
switch (EXTRACT_U_1(ni6->ni_code)) {
case ICMP6_NI_SUBJ_IPV6:
if (!ND_TTEST_LEN(dp, sizeof(*ni6) + sizeof(nd_ipv6)))
break;
}
ND_PRINT(", subject=%s",
- ip6addr_string(ndo, ni6 + 1));
+ ip6addr_string(ndo, cp));
break;
case ICMP6_NI_SUBJ_FQDN:
ND_PRINT(", subject=DNS name");
- cp = (const u_char *)(ni6 + 1);
if (EXTRACT_U_1(cp) == ep - cp - 1) {
/* icmp-name-lookup-03, pascal string */
if (ndo->ndo_vflag)
break;
}
ND_PRINT(", subject=%s",
- ipaddr_string(ndo, ni6 + 1));
+ ipaddr_string(ndo, cp));
break;
default:
ND_PRINT(", unknown subject");
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));
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