]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-loopback.c
Rename the fn_printX() functions to nd_printX()
[tcpdump] / print-loopback.c
index e0c6efbdfc295a100aa75d0d836b4f0a256b0cf7..e0df6f26c8604d40fda6485c475154c0eb6655d2 100644 (file)
@@ -56,7 +56,7 @@ static const struct tok fcode_str[] = {
 static void
 loopback_message_print(netdissect_options *ndo, const u_char *cp, const u_int len)
 {
-       const u_char *ep = cp + len;
+       const u_char *ep = ndo->ndo_snapend;
        uint16_t function;
 
        if (len < 2)
@@ -107,9 +107,10 @@ trunc:
 void
 loopback_print(netdissect_options *ndo, const u_char *cp, const u_int len)
 {
-       const u_char *ep = cp + len;
+       const u_char *ep = ndo->ndo_snapend;
        uint16_t skipCount;
 
+       ndo->ndo_protocol = "loopback";
        ND_PRINT("Loopback");
        if (len < 2)
                goto invalid;