]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-loopback.c
Fix spaces
[tcpdump] / print-loopback.c
index 46942c94d7190a73ee00ec9c78b5b0cef9e2e6ba..e47e404d9e414474eb6800b527a9a734a5109f38 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
@@ -101,7 +100,7 @@ invalid:
        ND_TCHECK_LEN(cp, ep - cp);
        return;
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
 }
 
 void
@@ -110,6 +109,7 @@ loopback_print(netdissect_options *ndo, const u_char *cp, const u_int len)
        const u_char *ep = ndo->ndo_snapend;
        uint16_t skipCount;
 
+       ndo->ndo_protocol = "loopback";
        ND_PRINT("Loopback");
        if (len < 2)
                goto invalid;
@@ -130,6 +130,6 @@ invalid:
        ND_TCHECK_LEN(cp, ep - cp);
        return;
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
 }