]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-wb.c
Update .gitignore for other configurations
[tcpdump] / print-wb.c
index 42686906c252a4a3edd9b5cb99f310dbf8bb76af..b27104916aa6014805dbcb7632bbc533e7872d79 100644 (file)
@@ -31,7 +31,6 @@
 #include "addrtoname.h"
 #include "extract.h"
 
-static const char tstr[] = "[|wb]";
 
 /* XXX need to add byte-swapping macros! */
 /* XXX - you mean like the ones in "extract.h"? */
@@ -205,7 +204,7 @@ wb_id(netdissect_options *ndo,
        cp = (const char *)(io + nid);
        if (ND_TTEST_LEN(cp, len)) {
                ND_PRINT("\"");
-               fn_print(ndo, (const u_char *)cp, (const u_char *)cp + len);
+               nd_print(ndo, (const u_char *)cp, (const u_char *)cp + len);
                ND_PRINT("\"");
        }
 
@@ -319,7 +318,7 @@ wb_dops(netdissect_options *ndo, const struct pkt_dop *dop,
                u_int t;
 
                if (!ND_TTEST_SIZE(dh)) {
-                       ND_PRINT("%s", tstr);
+                       nd_print_trunc(ndo);
                        break;
                }
                t = EXTRACT_U_1(dh->dh_type);
@@ -405,7 +404,7 @@ wb_print(netdissect_options *ndo,
        ndo->ndo_protocol = "wb";
        ph = (const struct pkt_hdr *)hdr;
        if (len < sizeof(*ph) || !ND_TTEST_SIZE(ph)) {
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                return;
        }
        len -= sizeof(*ph);
@@ -422,37 +421,37 @@ wb_print(netdissect_options *ndo,
        case PT_ID:
                if (wb_id(ndo, (const struct pkt_id *)(ph + 1), len) >= 0)
                        return;
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                break;
 
        case PT_RREQ:
                if (wb_rreq(ndo, (const struct pkt_rreq *)(ph + 1), len) >= 0)
                        return;
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                break;
 
        case PT_RREP:
                if (wb_rrep(ndo, (const struct pkt_rrep *)(ph + 1), len) >= 0)
                        return;
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                break;
 
        case PT_DRAWOP:
                if (wb_drawop(ndo, (const struct pkt_dop *)(ph + 1), len) >= 0)
                        return;
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                break;
 
        case PT_PREQ:
                if (wb_preq(ndo, (const struct pkt_preq *)(ph + 1), len) >= 0)
                        return;
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                break;
 
        case PT_PREP:
                if (wb_prep(ndo, (const struct pkt_prep *)(ph + 1), len) >= 0)
                        return;
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                break;
 
        default: