]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Remove unneeded '&' when getting a pointer to a nd_ipv6 type
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 31 Jan 2018 07:33:31 +0000 (08:33 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 31 Jan 2018 07:33:31 +0000 (08:33 +0100)
print-aodv.c
print-dhcp6.c
print-icmp6.c
print-ospf6.c
print-ripng.c

index abec010414a43605f1831b71e4956adeda05652c..bb7ba33fa8bafc0ea0c45d0a6bb673175663a2ad 100644 (file)
@@ -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);
        }
index aa3077f5db0a7f9e917538c49c0f7210485fe23a..f075fe1f26a185191357b1b94674e09bb22e325e 100644 (file)
@@ -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);
index e460092f89c2e5c57995befc52108a3550ec3be0..47d5c06e96ead2f56b820b9d46e260f797ec3541 100644 (file)
@@ -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
index df27e65d748f298b84c71bd0215fd4f7dffbccbc..1283360a17d0285dea5faf23bf5b3b3b2c667fdf 100644 (file)
@@ -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;
index 12c8815984ddb5f1f573854e15fe160356222e86..075123cb7835466cba7790d178ac7a63460f7e8b 100644 (file)
@@ -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);