]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-loopback.c
Add the nd_print_invalid() function
[tcpdump] / print-loopback.c
index e0df6f26c8604d40fda6485c475154c0eb6655d2..ea7d728023ff60e919f950f203e860286eb1e7d4 100644 (file)
@@ -42,7 +42,6 @@
 #include "extract.h"
 #include "addrtoname.h"
 
-static const char tstr[] = " [|loopback]";
 
 #define LOOPBACK_REPLY   1
 #define LOOPBACK_FWDDATA 2
@@ -97,11 +96,11 @@ loopback_message_print(netdissect_options *ndo, const u_char *cp, const u_int le
        return;
 
 invalid:
-       ND_PRINT("%s", istr);
+       nd_print_invalid(ndo);
        ND_TCHECK_LEN(cp, ep - cp);
        return;
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
 }
 
 void
@@ -127,10 +126,10 @@ loopback_print(netdissect_options *ndo, const u_char *cp, const u_int len)
        return;
 
 invalid:
-       ND_PRINT("%s", istr);
+       nd_print_invalid(ndo);
        ND_TCHECK_LEN(cp, ep - cp);
        return;
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
 }