]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-lwres.c
Handle very large -f files by rejecting them.
[tcpdump] / print-lwres.c
index 90a6866a0a19b098d49c132bd9db4b83e21b86aa..ae352807d006b2399e222b718eabf3dbfd24bbc2 100644 (file)
  * SUCH DAMAGE.
  */
 
+/* \summary: BIND9 Lightweight Resolver protocol printer */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include <tcpdump-stdinc.h>
+#include <netdissect-stdinc.h>
 
 #include "nameser.h"
 
 #include <stdio.h>
 #include <string.h>
 
-#include "interface.h"
+#include "netdissect.h"
 #include "addrtoname.h"
-#include "extract.h"                    /* must come after interface.h */
+#include "extract.h"
 
 /* BIND9 lib/lwres/include/lwres */
 typedef uint32_t lwres_uint32_t;
@@ -268,14 +270,12 @@ lwres_printaddr(netdissect_options *ndo,
                ND_PRINT((ndo, " %s", ipaddr_string(ndo, p)));
                p += sizeof(struct in_addr);
                break;
-#ifdef INET6
        case 2: /* IPv6 */
                if (l < 16)
                        return -1;
                ND_PRINT((ndo, " %s", ip6addr_string(ndo, p)));
                p += sizeof(struct in6_addr);
                break;
-#endif
        default:
                ND_PRINT((ndo, " %u/", EXTRACT_32BITS(&ap->family)));
                for (i = 0; i < l; i++)
@@ -542,7 +542,7 @@ lwres_print(netdissect_options *ndo,
                                    EXTRACT_16BITS(&grbn->rdclass))));
                        }
                        ND_PRINT((ndo, " TTL "));
-                       relts_print(ndo, EXTRACT_32BITS(&grbn->ttl));
+                       unsigned_relts_print(ndo, EXTRACT_32BITS(&grbn->ttl));
                        ND_PRINT((ndo, " %u/%u", EXTRACT_16BITS(&grbn->nrdatas),
                            EXTRACT_16BITS(&grbn->nsigs)));