]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Rework "Update more link-layer dissectors to void functions"
authorFrancois-Xavier Le Bail <[email protected]>
Sat, 1 Aug 2020 12:05:59 +0000 (14:05 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 6 Aug 2020 20:36:16 +0000 (22:36 +0200)
It's a follow-up to commit 81dbf4a0b05092760d0ff0cdd48c692e4769ba99.

There is no need to update ether_print(), ether_common_print() and
ether_switch_tag_print() to void functions: back to u_int functions.

There is also no need to add a flag parameter to ether_print(),
ether_common_print() and ether_switch_tag_print(): Remove it.

15 files changed:
netdissect.h
print-bcm-li.c
print-brcmtag.c
print-dsa.c
print-ether.c
print-geneve.c
print-gre.c
print-juniper.c
print-lane.c
print-llc.c
print-nsh.c
print-openflow-1.0.c
print-otv.c
print-vxlan-gpe.c
print-vxlan.c

index efcf6633fac5b5ada76a80f46230ba674e438609..3da175da65b07760d626c2cce776b66ebc6941a7 100644 (file)
@@ -582,8 +582,8 @@ extern void eapol_print(netdissect_options *, const u_char *);
 extern void egp_print(netdissect_options *, const u_char *, u_int);
 extern void eigrp_print(netdissect_options *, const u_char *, u_int);
 extern void esp_print(netdissect_options *, const u_char *, u_int, const u_char *, u_int, int, u_int);
 extern void egp_print(netdissect_options *, const u_char *, u_int);
 extern void eigrp_print(netdissect_options *, const u_char *, u_int);
 extern void esp_print(netdissect_options *, const u_char *, u_int, const u_char *, u_int, int, u_int);
-extern void ether_print(netdissect_options *, const u_char *, u_int, u_int, void (*)(netdissect_options *, const u_char *), const u_char *, u_int);
-extern void ether_switch_tag_print(netdissect_options *, const u_char *, u_int, u_int, void (*)(netdissect_options *, const u_char *), u_int, u_int);
+extern u_int ether_print(netdissect_options *, const u_char *, u_int, u_int, void (*)(netdissect_options *, const u_char *), const u_char *);
+extern u_int ether_switch_tag_print(netdissect_options *, const u_char *, u_int, u_int, void (*)(netdissect_options *, const u_char *), u_int);
 extern int ethertype_print(netdissect_options *, u_short, const u_char *, u_int, u_int, const struct lladdr_info *, const struct lladdr_info *);
 extern u_int fddi_print(netdissect_options *, const u_char *, u_int, u_int);
 extern void forces_print(netdissect_options *, const u_char *, u_int);
 extern int ethertype_print(netdissect_options *, u_short, const u_char *, u_int, u_int, const struct lladdr_info *, const struct lladdr_info *);
 extern u_int fddi_print(netdissect_options *, const u_char *, u_int, u_int);
 extern void forces_print(netdissect_options *, const u_char *, u_int);
index 32214127a0e642f0171753d15f33fadce4846828..0233c3cb8a4b15cb52a6abfb58eef8c0a1e5852d 100644 (file)
@@ -95,7 +95,7 @@ bcm_li_print(netdissect_options *ndo, const u_char *p, u_int length)
 
        switch (pkt_type) {
        case BCM_LI_PKT_TYPE_ETHERNET:
 
        switch (pkt_type) {
        case BCM_LI_PKT_TYPE_ETHERNET:
-           ether_print(ndo, bp, length, length, NULL, NULL, FALSE);
+           ether_print(ndo, bp, length, length, NULL, NULL);
            break;
        case BCM_LI_PKT_TYPE_IPV4:
            ip_print(ndo, bp, length);
            break;
        case BCM_LI_PKT_TYPE_IPV4:
            ip_print(ndo, bp, length);
index 61521365390f5d3564ee5d76ddc3cf62bbace488..1e0c5884436822e2f24b6d17f3a6b197d0beb390 100644 (file)
@@ -118,9 +118,9 @@ brcm_tag_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
        u_int length = h->len;
 
        ndo->ndo_protocol = "brcm-tag";
        u_int length = h->len;
 
        ndo->ndo_protocol = "brcm-tag";
-       ndo->ndo_ll_hdr_len += 0;
-       ether_switch_tag_print(ndo, p, length, caplen,
-                              brcm_tag_print, BRCM_TAG_LEN, TRUE);
+       ndo->ndo_ll_hdr_len +=
+               ether_switch_tag_print(ndo, p, length, caplen,
+                                      brcm_tag_print, BRCM_TAG_LEN);
 }
 
 void
 }
 
 void
@@ -148,5 +148,6 @@ brcm_tag_prepend_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
        /*
         * Now print the Ethernet frame following it.
         */
        /*
         * Now print the Ethernet frame following it.
         */
-       ether_print(ndo, p, length, caplen, NULL, NULL, TRUE);
+       ndo->ndo_ll_hdr_len +=
+               ether_print(ndo, p, length, caplen, NULL, NULL);
 }
 }
index aec58f48e2cdec96e0ae86484485438a96c4f1eb..e45dc53fbe985660fd2fb4df6fbed8d483d789c4 100644 (file)
@@ -203,8 +203,8 @@ dsa_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char
        u_int length = h->len;
 
        ndo->ndo_protocol = "dsa";
        u_int length = h->len;
 
        ndo->ndo_protocol = "dsa";
-       ndo->ndo_ll_hdr_len += 0;
-       ether_switch_tag_print(ndo, p, length, caplen, dsa_tag_print, DSA_LEN, TRUE);
+       ndo->ndo_ll_hdr_len +=
+               ether_switch_tag_print(ndo, p, length, caplen, dsa_tag_print, DSA_LEN);
 }
 
 void
 }
 
 void
@@ -214,6 +214,6 @@ edsa_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char
        u_int length = h->len;
 
        ndo->ndo_protocol = "edsa";
        u_int length = h->len;
 
        ndo->ndo_protocol = "edsa";
-       ndo->ndo_ll_hdr_len += 0;
-       ether_switch_tag_print(ndo, p, length, caplen, edsa_tag_print, EDSA_LEN, TRUE);
+       ndo->ndo_ll_hdr_len +=
+               ether_switch_tag_print(ndo, p, length, caplen, edsa_tag_print, EDSA_LEN);
 }
 }
index e67539466bb94693eb87b4e44d70f1824234961b..7a1b42e0b0c65e9e8fbe03df9bd23a9f0a80b2da 100644 (file)
@@ -133,13 +133,13 @@ ether_type_print(netdissect_options *ndo, uint16_t type)
  * switch chips, and extra encapsulation header information before
  * printing Ethernet header information (such as a LANE ID for ATM LANE).
  */
  * switch chips, and extra encapsulation header information before
  * printing Ethernet header information (such as a LANE ID for ATM LANE).
  */
-static void
+static u_int
 ether_common_print(netdissect_options *ndo, const u_char *p, u_int length,
     u_int caplen,
     void (*print_switch_tag)(netdissect_options *ndo, const u_char *),
     u_int switch_tag_len,
     void (*print_encap_header)(netdissect_options *ndo, const u_char *),
 ether_common_print(netdissect_options *ndo, const u_char *p, u_int length,
     u_int caplen,
     void (*print_switch_tag)(netdissect_options *ndo, const u_char *),
     u_int switch_tag_len,
     void (*print_encap_header)(netdissect_options *ndo, const u_char *),
-    const u_char *encap_header_arg, u_int do_incr_ll_hdr_len)
+    const u_char *encap_header_arg)
 {
        const struct ether_header *ehp;
        u_int orig_length;
 {
        const struct ether_header *ehp;
        u_int orig_length;
@@ -151,15 +151,11 @@ ether_common_print(netdissect_options *ndo, const u_char *p, u_int length,
 
        if (caplen < ETHER_HDRLEN + switch_tag_len) {
                nd_print_trunc(ndo);
 
        if (caplen < ETHER_HDRLEN + switch_tag_len) {
                nd_print_trunc(ndo);
-               if (do_incr_ll_hdr_len)
-                       ndo->ndo_ll_hdr_len += caplen;
-               return;
+               return caplen;
        }
        if (length < ETHER_HDRLEN + switch_tag_len) {
                nd_print_trunc(ndo);
        }
        if (length < ETHER_HDRLEN + switch_tag_len) {
                nd_print_trunc(ndo);
-               if (do_incr_ll_hdr_len)
-                       ndo->ndo_ll_hdr_len += length;
-               return;
+               return length;
        }
 
        if (print_encap_header != NULL)
        }
 
        if (print_encap_header != NULL)
@@ -230,14 +226,10 @@ recurse:
                        /* Payload is encrypted; print it as raw data. */
                        if (!ndo->ndo_suppress_default_print)
                                ND_DEFAULTPRINT(p, caplen);
                        /* Payload is encrypted; print it as raw data. */
                        if (!ndo->ndo_suppress_default_print)
                                ND_DEFAULTPRINT(p, caplen);
-                       if (do_incr_ll_hdr_len)
-                               ndo->ndo_ll_hdr_len += hdrlen;
-                       return;
+                       return hdrlen;
                } else if (ret > 0) {
                        /* Problem printing the header; just quit. */
                } else if (ret > 0) {
                        /* Problem printing the header; just quit. */
-                       if (do_incr_ll_hdr_len)
-                               ndo->ndo_ll_hdr_len += ret;
-                       return;
+                       return ret;
                } else {
                        /*
                         * Keep processing type/length fields.
                } else {
                        /*
                         * Keep processing type/length fields.
@@ -266,16 +258,12 @@ recurse:
                if (caplen < 4) {
                        ndo->ndo_protocol = "vlan";
                        nd_print_trunc(ndo);
                if (caplen < 4) {
                        ndo->ndo_protocol = "vlan";
                        nd_print_trunc(ndo);
-                       if (do_incr_ll_hdr_len)
-                               ndo->ndo_ll_hdr_len += hdrlen + caplen;
-                       return;
+                       return hdrlen + caplen;
                }
                if (length < 4) {
                        ndo->ndo_protocol = "vlan";
                        nd_print_trunc(ndo);
                }
                if (length < 4) {
                        ndo->ndo_protocol = "vlan";
                        nd_print_trunc(ndo);
-                       if (do_incr_ll_hdr_len)
-                               ndo->ndo_ll_hdr_len += hdrlen + length;
-                       return;
+                       return hdrlen + length;
                }
                if (ndo->ndo_eflag) {
                        uint16_t tag = GET_BE_U_2(p);
                }
                if (ndo->ndo_eflag) {
                        uint16_t tag = GET_BE_U_2(p);
@@ -358,15 +346,11 @@ recurse:
        } else if (length_type == ETHERTYPE_ARISTA) {
                if (caplen < 2) {
                        ND_PRINT("[|arista]");
        } else if (length_type == ETHERTYPE_ARISTA) {
                if (caplen < 2) {
                        ND_PRINT("[|arista]");
-                       if (do_incr_ll_hdr_len)
-                               ndo->ndo_ll_hdr_len += hdrlen + caplen;
-                       return;
+                       return hdrlen + caplen;
                }
                if (length < 2) {
                        ND_PRINT("[|arista]");
                }
                if (length < 2) {
                        ND_PRINT("[|arista]");
-                       if (do_incr_ll_hdr_len)
-                               ndo->ndo_ll_hdr_len += hdrlen + length;
-                       return;
+                       return hdrlen + length;
                }
                ether_type_print(ndo, length_type);
                ND_PRINT(", length %u: ", orig_length);
                }
                ether_type_print(ndo, length_type);
                ND_PRINT(", length %u: ", orig_length);
@@ -417,9 +401,7 @@ recurse:
                                ND_DEFAULTPRINT(p, caplen);
                }
        }
                                ND_DEFAULTPRINT(p, caplen);
                }
        }
-       if (do_incr_ll_hdr_len)
-               ndo->ndo_ll_hdr_len += hdrlen;
-       return;
+       return hdrlen;
 }
 
 /*
 }
 
 /*
@@ -431,14 +413,14 @@ recurse:
  *
  * FIXME: caplen can and should be derived from ndo->ndo_snapend and p.
  */
  *
  * FIXME: caplen can and should be derived from ndo->ndo_snapend and p.
  */
-void
+u_int
 ether_switch_tag_print(netdissect_options *ndo, const u_char *p, u_int length,
     u_int caplen,
     void (*print_switch_tag)(netdissect_options *, const u_char *),
 ether_switch_tag_print(netdissect_options *ndo, const u_char *p, u_int length,
     u_int caplen,
     void (*print_switch_tag)(netdissect_options *, const u_char *),
-    u_int switch_tag_len, u_int do_incr_ll_hdr_len)
+    u_int switch_tag_len)
 {
 {
-       ether_common_print(ndo, p, length, caplen, print_switch_tag,
-                          switch_tag_len, NULL, NULL, do_incr_ll_hdr_len);
+       return ether_common_print(ndo, p, length, caplen, print_switch_tag,
+                                 switch_tag_len, NULL, NULL);
 }
 
 /*
 }
 
 /*
@@ -449,15 +431,15 @@ ether_switch_tag_print(netdissect_options *ndo, const u_char *p, u_int length,
  *
  * FIXME: caplen can and should be derived from ndo->ndo_snapend and p.
  */
  *
  * FIXME: caplen can and should be derived from ndo->ndo_snapend and p.
  */
-void
+u_int
 ether_print(netdissect_options *ndo,
            const u_char *p, u_int length, u_int caplen,
            void (*print_encap_header)(netdissect_options *ndo, const u_char *),
 ether_print(netdissect_options *ndo,
            const u_char *p, u_int length, u_int caplen,
            void (*print_encap_header)(netdissect_options *ndo, const u_char *),
-           const u_char *encap_header_arg, u_int do_incr_ll_hdr_len)
+           const u_char *encap_header_arg)
 {
        ndo->ndo_protocol = "ether";
 {
        ndo->ndo_protocol = "ether";
-       ether_common_print(ndo, p, length, caplen, NULL, 0,
-                          print_encap_header, encap_header_arg, do_incr_ll_hdr_len);
+       return ether_common_print(ndo, p, length, caplen, NULL, 0,
+                                 print_encap_header, encap_header_arg);
 }
 
 /*
 }
 
 /*
@@ -471,9 +453,8 @@ ether_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
               const u_char *p)
 {
        ndo->ndo_protocol = "ether";
               const u_char *p)
 {
        ndo->ndo_protocol = "ether";
-       ndo->ndo_ll_hdr_len += 0;
-
-       ether_print(ndo, p, h->len, h->caplen, NULL, NULL, TRUE);
+       ndo->ndo_ll_hdr_len +=
+               ether_print(ndo, p, h->len, h->caplen, NULL, NULL);
 }
 
 /*
 }
 
 /*
@@ -498,10 +479,11 @@ netanalyzer_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
                nd_print_trunc(ndo);
                return;
        }
                nd_print_trunc(ndo);
                return;
        }
-       ndo->ndo_ll_hdr_len += 4;
 
        /* Skip the pseudo-header. */
 
        /* Skip the pseudo-header. */
-       ether_print(ndo, p + 4, h->len - 4, h->caplen - 4, NULL, NULL, TRUE);
+       ndo->ndo_ll_hdr_len += 4;
+       ndo->ndo_ll_hdr_len +=
+               ether_print(ndo, p + 4, h->len - 4, h->caplen - 4, NULL, NULL);
 }
 
 /*
 }
 
 /*
@@ -529,10 +511,11 @@ netanalyzer_transparent_if_print(netdissect_options *ndo,
                nd_print_trunc(ndo);
                return;
        }
                nd_print_trunc(ndo);
                return;
        }
-       ndo->ndo_ll_hdr_len += 12;
 
        /* Skip the pseudo-header, preamble, and SOF. */
 
        /* Skip the pseudo-header, preamble, and SOF. */
-       ether_print(ndo, p + 12, h->len - 12, h->caplen - 12, NULL, NULL, TRUE);
+       ndo->ndo_ll_hdr_len += 12;
+       ndo->ndo_ll_hdr_len +=
+               ether_print(ndo, p + 12, h->len - 12, h->caplen - 12, NULL, NULL);
 }
 
 /*
 }
 
 /*
index d3e5e87ee9d184d63ba645036daccbdb080d2022..0b7ff6e514728fd92eaf2d5332106f7bfef428d3 100644 (file)
@@ -232,7 +232,7 @@ geneve_print(netdissect_options *ndo, const u_char *bp, u_int len)
 
     if (ethertype_print(ndo, prot, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL) == 0) {
         if (prot == ETHERTYPE_TEB)
 
     if (ethertype_print(ndo, prot, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL) == 0) {
         if (prot == ETHERTYPE_TEB)
-            ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
+            ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
         else
             ND_PRINT("geneve-proto-0x%x", prot);
     }
         else
             ND_PRINT("geneve-proto-0x%x", prot);
     }
index 53c418fb7db4126adcaa067a7f2158f980b9e2b4..09b2be113306267228a6fb5a5861c2e4b7714ec7 100644 (file)
@@ -224,7 +224,7 @@ gre_print_0(netdissect_options *ndo, const u_char *bp, u_int length)
                isoclns_print(ndo, bp, len);
                break;
        case ETHERTYPE_TEB:
                isoclns_print(ndo, bp, len);
                break;
        case ETHERTYPE_TEB:
-               ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
+               ether_print(ndo, bp, len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
                break;
        default:
                ND_PRINT("gre-proto-0x%x", prot);
                break;
        default:
                ND_PRINT("gre-proto-0x%x", prot);
index 0061b2ba113319bb2c5020e119f8bb40578fc9fa..e668d0e70215f1823b8462dc7eee5e37fd2f537e 100644 (file)
@@ -709,7 +709,7 @@ juniper_pppoe_if_print(netdissect_options *ndo,
 
         p+=l2info.header_len;
         /* this DLT contains nothing but raw ethernet frames */
 
         p+=l2info.header_len;
         /* this DLT contains nothing but raw ethernet frames */
-        ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL, FALSE);
+        ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL);
         ndo->ndo_ll_hdr_len += l2info.header_len;
 }
 #endif
         ndo->ndo_ll_hdr_len += l2info.header_len;
 }
 #endif
@@ -730,8 +730,9 @@ juniper_ether_if_print(netdissect_options *ndo,
 
         p+=l2info.header_len;
         /* this DLT contains nothing but raw Ethernet frames */
 
         p+=l2info.header_len;
         /* this DLT contains nothing but raw Ethernet frames */
-        ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL, TRUE);
-        ndo->ndo_ll_hdr_len += l2info.header_len;
+        ndo->ndo_ll_hdr_len +=
+               l2info.header_len +
+               ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL);
 }
 #endif
 
 }
 #endif
 
@@ -1127,7 +1128,7 @@ juniper_atm2_if_print(netdissect_options *ndo,
         if (l2info.direction != JUNIPER_BPF_PKT_IN && /* ether-over-1483 encaps ? */
             /* use EXTRACT_, not GET_ (not packet buffer pointer) */
             (EXTRACT_BE_U_4(l2info.cookie) & ATM2_GAP_COUNT_MASK)) {
         if (l2info.direction != JUNIPER_BPF_PKT_IN && /* ether-over-1483 encaps ? */
             /* use EXTRACT_, not GET_ (not packet buffer pointer) */
             (EXTRACT_BE_U_4(l2info.cookie) & ATM2_GAP_COUNT_MASK)) {
-            ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL, FALSE);
+            ether_print(ndo, p, l2info.length, l2info.caplen, NULL, NULL);
             ndo->ndo_ll_hdr_len += l2info.header_len;
             return;
         }
             ndo->ndo_ll_hdr_len += l2info.header_len;
             return;
         }
index 09f92c0616cf5190c794471897191d06413bf9ea..0dc7f25cbe3d93b7b35e4b43f4b6c1b9dfd4810f 100644 (file)
@@ -113,5 +113,5 @@ lane_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
         * Now print the encapsulated frame, under the assumption
         * that it's an Ethernet frame.
         */
         * Now print the encapsulated frame, under the assumption
         * that it's an Ethernet frame.
         */
-       ether_print(ndo, p, length, caplen, lane_hdr_print, p - 2, FALSE);
+       ether_print(ndo, p, length, caplen, lane_hdr_print, p - 2);
 }
 }
index c4422d9406a50e34e0ac843d8a818b7eff023846..750a8ccdae5499a4f2f5127922ae9b813dad90f4 100644 (file)
@@ -525,7 +525,7 @@ snap_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen,
                        /*
                         * What remains is an Ethernet packet.
                         */
                        /*
                         * What remains is an Ethernet packet.
                         */
-                       ether_print(ndo, p, length, caplen, NULL, NULL, FALSE);
+                       ether_print(ndo, p, length, caplen, NULL, NULL);
                        return (1);
 
                case PID_RFC2684_802_5_FCS:
                        return (1);
 
                case PID_RFC2684_802_5_FCS:
index 70e962dfcae5821618bf7a925eeca81a48894d36..17d6256925bd1e4b6a36071bc8de354eb733ab7c 100644 (file)
@@ -170,7 +170,7 @@ nsh_print(netdissect_options *ndo, const u_char *bp, u_int len)
         ip6_print(ndo, bp, next_len);
         break;
     case 0x3:
         ip6_print(ndo, bp, next_len);
         break;
     case 0x3:
-        ether_print(ndo, bp, next_len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
+        ether_print(ndo, bp, next_len, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
         break;
     default:
         ND_PRINT("ERROR: unknown-next-protocol");
         break;
     default:
         ND_PRINT("ERROR: unknown-next-protocol");
index 51ed38ef55a3eb1db0fa56e0a1aa11b5c6938ab6..71d8a7c1f215a3a508879b61cf31496120fe35ab 100644 (file)
@@ -1128,7 +1128,7 @@ of10_packet_data_print(netdissect_options *ndo,
        ND_TCHECK_LEN(cp, len);
        ndo->ndo_vflag -= 3;
        ND_PRINT(", frame decoding below\n");
        ND_TCHECK_LEN(cp, len);
        ndo->ndo_vflag -= 3;
        ND_PRINT(", frame decoding below\n");
-       ether_print(ndo, cp, len, ND_BYTES_AVAILABLE_AFTER(cp), NULL, NULL, FALSE);
+       ether_print(ndo, cp, len, ND_BYTES_AVAILABLE_AFTER(cp), NULL, NULL);
        ndo->ndo_vflag += 3;
        return cp + len;
 
        ndo->ndo_vflag += 3;
        return cp + len;
 
index f578d89ed604af81d86370e998906e1287328566..dbcef9f676c28a8e003eeb2c5097b096f4d9ce33 100644 (file)
@@ -67,7 +67,7 @@ otv_print(netdissect_options *ndo, const u_char *bp, u_int len)
     ND_TCHECK_1(bp);
     bp += 1;
 
     ND_TCHECK_1(bp);
     bp += 1;
 
-    ether_print(ndo, bp, len - OTV_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
+    ether_print(ndo, bp, len - OTV_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
     return;
 
 trunc:
     return;
 
 trunc:
index eb885824581e7d3b3f3d1b5872a01193c7aa6446..d7a80f25dfdb83e64659320e41b35d6efae8fa8e 100644 (file)
@@ -92,7 +92,7 @@ vxlan_gpe_print(netdissect_options *ndo, const u_char *bp, u_int len)
         ip6_print(ndo, bp, len - VXLAN_GPE_HDR_LEN);
         break;
     case 0x3:
         ip6_print(ndo, bp, len - VXLAN_GPE_HDR_LEN);
         break;
     case 0x3:
-        ether_print(ndo, bp, len - VXLAN_GPE_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
+        ether_print(ndo, bp, len - VXLAN_GPE_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
         break;
     case 0x4:
         nsh_print(ndo, bp, len - VXLAN_GPE_HDR_LEN);
         break;
     case 0x4:
         nsh_print(ndo, bp, len - VXLAN_GPE_HDR_LEN);
index 3d8c76c3c041278c790fd8fdf2abedfa7e03f5ee..d2b896b094503dcf9f215c75fd65965f83e55753 100644 (file)
@@ -65,7 +65,7 @@ vxlan_print(netdissect_options *ndo, const u_char *bp, u_int len)
     ND_PRINT("flags [%s] (0x%02x), ", flags & 0x08 ? "I" : ".", flags);
     ND_PRINT("vni %u\n", vni);
 
     ND_PRINT("flags [%s] (0x%02x), ", flags & 0x08 ? "I" : ".", flags);
     ND_PRINT("vni %u\n", vni);
 
-    ether_print(ndo, bp, len - VXLAN_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL, FALSE);
+    ether_print(ndo, bp, len - VXLAN_HDR_LEN, ND_BYTES_AVAILABLE_AFTER(bp), NULL, NULL);
 
     return;
 
 
     return;