]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-lwres.c
Update .gitignore for other configurations
[tcpdump] / print-lwres.c
index 0e0d1aa24df540b6f7575fad6107e7139194987b..320244296dd179433bdf5e1fa3507e8d4e7fa7e1 100644 (file)
@@ -205,7 +205,7 @@ lwres_printname(netdissect_options *ndo,
 
        ND_PRINT(" ");
        for (i = 0; i < l; i++) {
-               safeputchar(ndo, EXTRACT_U_1(p));
+               fn_print_char(ndo, EXTRACT_U_1(p));
                p++;
        }
        p++;    /* skip terminating \0 */
@@ -281,13 +281,13 @@ lwres_printaddr(netdissect_options *ndo,
                if (l < 4)
                        return -1;
                ND_PRINT(" %s", ipaddr_string(ndo, p));
-               p += sizeof(struct in_addr);
+               p += sizeof(nd_ipv4);
                break;
        case 2: /* IPv6 */
                if (l < 16)
                        return -1;
                ND_PRINT(" %s", ip6addr_string(ndo, p));
-               p += sizeof(struct in6_addr);
+               p += sizeof(nd_ipv6);
                break;
        default:
                ND_PRINT(" %u/", EXTRACT_BE_U_4(ap->family));
@@ -315,6 +315,7 @@ lwres_print(netdissect_options *ndo,
        int advance;
        int unsupported = 0;
 
+       ndo->ndo_protocol = "lwres";
        np = (const struct lwres_lwpacket *)bp;
        ND_TCHECK_2(np->authlength);
 
@@ -601,5 +602,5 @@ lwres_print(netdissect_options *ndo,
        return;
 
   trunc:
-       ND_PRINT("[|lwres]");
+       nd_print_trunc(ndo);
 }