]> The Tcpdump Group git mirrors - tcpdump/commitdiff
make use of ND_DEFAULTPRINT()
authorDenis Ovsienko <[email protected]>
Wed, 26 Mar 2014 14:52:40 +0000 (18:52 +0400)
committerDenis Ovsienko <[email protected]>
Wed, 26 Mar 2014 14:52:40 +0000 (18:52 +0400)
21 files changed:
print-802_15_4.c
print-ap1394.c
print-arcnet.c
print-atm.c
print-bt.c
print-calm-fast.c
print-cip.c
print-ether.c
print-fddi.c
print-fr.c
print-geonet.c
print-ipfc.c
print-ipnet.c
print-mpls.c
print-nflog.c
print-null.c
print-pflog.c
print-ppi.c
print-sll.c
print-symantec.c
print-token.c

index ee66832fcf8ec4b301dfbcc4aed74478b6cecff7..0e10e68d3604ec54a51d270fa32d36551c6748e5 100644 (file)
@@ -174,7 +174,7 @@ ieee802_15_4_if_print(struct netdissect_options *ndo,
        }
 
        if (!ndo->ndo_suppress_default_print)
-               (ndo->ndo_default_print)(ndo, p, caplen);
+               ND_DEFAULTPRINT(p, caplen);
 
        return 0;
 }
index 41588a80ed1026f66c766e6d9125d4b9d1ac20f3..3ce31b1c710edd5018518eb78ccb94ff13fd8ee8 100644 (file)
@@ -106,7 +106,7 @@ ap1394_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch
                        ap1394_hdr_print(ndo, (u_char *)fp, length + FIREWIRE_HDRLEN);
 
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
        }
 
        return FIREWIRE_HDRLEN;
index 666b3115b6d70ba91b96cf8f83bc99f742512c10..640d31beb06fed2b39b543ebac4807593ae34ff6 100644 (file)
@@ -243,7 +243,7 @@ arcnet_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_ch
        }
 
        if (!arcnet_encap_print(ndo, arc_type, p, length, caplen))
-               ndo->ndo_default_print(ndo, p, caplen);
+               ND_DEFAULTPRINT(p, caplen);
 
        return (archdrlen);
 }
@@ -302,7 +302,7 @@ arcnet_linux_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, cons
        p += archdrlen;
 
        if (!arcnet_encap_print(ndo, arc_type, p, length, caplen))
-               ndo->ndo_default_print(ndo, p, caplen);
+               ND_DEFAULTPRINT(p, caplen);
 
        return (archdrlen);
 }
index adba71adbadfd5acff5a07b2ddf2158924137fce..b12295713307f17cc02e6d0306b70c15d55b7ef2 100644 (file)
@@ -140,7 +140,7 @@ atm_llc_print(netdissect_options *ndo,
                etherproto_string(htons(extracted_ethertype))));
                }
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
        }
 }
 
index 7337047dcd5005709b85092b2482a2076fb60a42..128daade063f8ade4c449803bbc5422c6a4d785a 100644 (file)
@@ -55,7 +55,7 @@ bt_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *
                ND_PRINT((ndo, "hci length %d, direction %s, ", length, (EXTRACT_32BITS(&hdr->direction)&0x1)?"in":"out"));
 
        if (!ndo->ndo_suppress_default_print)
-               ndo->ndo_default_print(ndo, p, caplen);
+               ND_DEFAULTPRINT(p, caplen);
 
        return (BT_HDRLEN);
 }
index 351b6b8dd2bd686e34d602da9a1b2abc92749440..324a118cc0ae1fd6622fdf259a662526843989c7 100644 (file)
@@ -48,7 +48,7 @@ calm_fast_print(netdissect_options *ndo, const u_char *eth, const u_char *bp, u_
        ND_PRINT((ndo, "DstNwref:%d; ", dstNwref));
 
        if (ndo->ndo_vflag)
-               ndo->ndo_default_print(ndo, bp, length);
+               ND_DEFAULTPRINT(bp, length);
 }
 
 
index f8b48ec2a92a206eef9f1419e42ce4c1c56ddbdf..91abe08d306ae6db93bdabca79688782926da6eb 100644 (file)
@@ -86,7 +86,7 @@ cip_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char
                               etherproto_string(htons(extracted_ethertype))));
                        }
                        if (!ndo->ndo_suppress_default_print)
-                               ndo->ndo_default_print(ndo, p, caplen);
+                               ND_DEFAULTPRINT(p, caplen);
                }
        } else {
                /*
index 09b9babab6ba01eb5578f7faa66bc1cdb071e37f..efbb8cfdbb591aac5eab40135eb734b90ae561ef 100644 (file)
@@ -166,7 +166,7 @@ recurse:
                        }
 
                        if (!ndo->ndo_suppress_default_print)
-                               ndo->ndo_default_print(ndo, p, caplen);
+                               ND_DEFAULTPRINT(p, caplen);
                }
        } else if (ether_type == ETHERTYPE_8021Q  ||
                 ether_type == ETHERTYPE_8021Q9100 ||
@@ -217,7 +217,7 @@ recurse:
                        }
 
                        if (!ndo->ndo_suppress_default_print)
-                               ndo->ndo_default_print(ndo, p, caplen);
+                               ND_DEFAULTPRINT(p, caplen);
                }
        } else {
                if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) {
@@ -229,7 +229,7 @@ recurse:
                        }
 
                        if (!ndo->ndo_suppress_default_print)
-                               ndo->ndo_default_print(ndo, p, caplen);
+                               ND_DEFAULTPRINT(p, caplen);
                }
        }
 }
index e79ab98f4afdb07df96413a2fe17ae129bb537ea..413a6efb2157f0ac12948c12b9cc6882e46bf3e6 100644 (file)
@@ -320,7 +320,7 @@ fddi_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
                        etherproto_string(htons(extracted_ethertype))));
                        }
                        if (!ndo->ndo_suppress_default_print)
-                               ndo->ndo_default_print(ndo, p, caplen);
+                               ND_DEFAULTPRINT(p, caplen);
                }
        } else if ((fddip->fddi_fc & FDDIFC_CLFF) == FDDIFC_SMT)
                fddi_smt_print(ndo, p, caplen);
@@ -330,7 +330,7 @@ fddi_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
                        fddi_hdr_print(ndo, fddip, length + FDDI_HDRLEN, ESRC(&ehdr),
                            EDST(&ehdr));
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
        }
 }
 
index c8e67bd1395d01d07835e922cb1d72713aaebd27..6111c50660ca1fe00ae840a1bf7db6d64b0c9c97 100644 (file)
@@ -300,7 +300,7 @@ fr_print(netdissect_options *ndo,
                             fr_hdr_print(ndo, length + hdr_len, hdr_len,
                                          dlci, flags, nlpid);
                        if (!ndo->ndo_suppress_default_print)
-                            ndo->ndo_default_print(ndo, p - hdr_len, length + hdr_len);
+                               ND_DEFAULTPRINT(p - hdr_len, length + hdr_len);
                }
                break;
 
@@ -321,7 +321,7 @@ fr_print(netdissect_options *ndo,
                     fr_hdr_print(ndo, length + hdr_len, addr_len,
                                     dlci, flags, nlpid);
                if (!ndo->ndo_xflag)
-                       ndo->ndo_default_print(ndo, p, length);
+                       ND_DEFAULTPRINT(p, length);
        }
 
        return hdr_len;
index cba77c71978cdd497d20d433fefd2d6fde5da183..229b25404711b5120cbb88515a8d9d61bedc54af 100644 (file)
@@ -235,7 +235,7 @@ geonet_print(netdissect_options *ndo, const u_char *eth, const u_char *bp, u_int
 
        /* Print user data part */
        if (ndo->ndo_vflag)
-               ndo->ndo_default_print(ndo, bp, length);
+               ND_DEFAULTPRINT(bp, length);
 }
 
 
index 7a7b6f933e1b2e0a8543a99d1eced3cbcd9645e6..4b397d1f3143940ff506594cbd9c983005d61208 100644 (file)
@@ -116,7 +116,7 @@ ipfc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
                etherproto_string(htons(extracted_ethertype))));
                }
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
        }
 }
 
index d777a95268f002a9a6198d023b867bb719693afe..9f11f39240a6eb5bde65e854daf40c79a16d6f80 100644 (file)
@@ -88,7 +88,7 @@ ipnet_print(struct netdissect_options *ndo, const u_char *p, u_int length, u_int
                                        length + sizeof(ipnet_hdr_t));
 
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
                break;
        }
 }
index 21b7ba46b0657e10cbc7597a6ccc832c030e7189..1220028f5fff8e913eca9ebbb631a2335918bc7f 100644 (file)
@@ -175,7 +175,7 @@ mpls_print(netdissect_options *ndo, const u_char *bp, u_int length)
         */
        if (pt == PT_UNKNOWN) {
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, length - (p - bp));
+                       ND_DEFAULTPRINT(p, length - (p - bp));
                return;
        }
        ND_PRINT((ndo, ndo->ndo_vflag ? "\n\t" : " "));
index 5985799eca3cb60777e710501f98acfa4ad5a5d6..29d23b627688ba344c944060a265b435ffea1649 100644 (file)
@@ -155,7 +155,7 @@ nflog_if_print(struct netdissect_options *ndo,
                                length + sizeof(nflog_hdr_t));
 
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
                break;
        }
 
index f1af54401a4e32d197a4dc4b52a9686b2784456e..f0ad66177232e7f94a6421a8ef1a0c7125928f46 100644 (file)
@@ -134,7 +134,7 @@ null_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char
                if (!ndo->ndo_eflag)
                        null_hdr_print(ndo, family, length + NULL_HDRLEN);
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
        }
 
        return (NULL_HDRLEN);
index 07f0732f7e592e9b629fa06d7762095fc609f2d1..a2fba1791df44e54f6f02bb921ccc078db0b934e 100644 (file)
@@ -166,7 +166,7 @@ pflog_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
                if (!ndo->ndo_eflag)
                        pflog_print(ndo, hdr);
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
        }
 
        return (hdrlen);
index 720142dffd6406bab3c3f5521e9b9a7f990058b3..f2a6dad94abb30fba5d4a7c0d1d549a36b916b28 100644 (file)
@@ -80,7 +80,7 @@ ppi_print(struct netdissect_options *ndo,
                                        length + sizeof(ppi_header_t));
 
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
        }
 }
 
index 6eda8195210289d615ecb05a009e61bf7c005c63..82bb4d63cf04f75db2715b8f7a97a8423293a172 100644 (file)
@@ -265,7 +265,7 @@ recurse:
                               etherproto_string(htons(extracted_ethertype))));
                        }
                        if (!ndo->ndo_suppress_default_print)
-                               ndo->ndo_default_print(ndo, p, caplen);
+                               ND_DEFAULTPRINT(p, caplen);
                        break;
                }
        } else if (ether_type == ETHERTYPE_8021Q) {
@@ -303,7 +303,7 @@ recurse:
                        if (!ndo->ndo_eflag)
                                sll_print(ndo, sllp, length + SLL_HDR_LEN);
                        if (!ndo->ndo_suppress_default_print)
-                               ndo->ndo_default_print(ndo, p, caplen);
+                               ND_DEFAULTPRINT(p, caplen);
                }
        }
 
index 631c7d961665d332886834023f61cfb2f0d2eb46..39d8b65162774f5f19558b3926bbf16af9922af2 100644 (file)
@@ -99,14 +99,14 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_
                        symantec_hdr_print(ndo, (u_char *)sp, length + sizeof (struct symantec_header));
 
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
        } else if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) {
                /* ether_type not known, print raw packet */
                if (!ndo->ndo_eflag)
                        symantec_hdr_print(ndo, (u_char *)sp, length + sizeof (struct symantec_header));
 
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
        }
 
        return (sizeof (struct symantec_header));
index 18a461b7454a014c6dad0af4f860e59f1b06a1e8..3aba5bcfccb51488665b8d64746c541935674d98 100644 (file)
@@ -223,7 +223,7 @@ token_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen
                        etherproto_string(htons(extracted_ethertype))));
                        }
                        if (!ndo->ndo_suppress_default_print)
-                               ndo->ndo_default_print(ndo, p, caplen);
+                               ND_DEFAULTPRINT(p, caplen);
                }
        } else {
                /* Some kinds of TR packet we cannot handle intelligently */
@@ -232,7 +232,7 @@ token_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen
                        token_hdr_print(ndo, trp, length + TOKEN_HDRLEN + route_len,
                            ESRC(&ehdr), EDST(&ehdr));
                if (!ndo->ndo_suppress_default_print)
-                       ndo->ndo_default_print(ndo, p, caplen);
+                       ND_DEFAULTPRINT(p, caplen);
        }
        return (hdr_len);
 }