]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-rx.c
DNS: Sync types with IANA
[tcpdump] / print-rx.c
index 7dfa3ddb9864cca0cea9b26b50ef26e1a7b5dd49..3f7589ea6bd517afe1cd7c714ccabdcdda70cf13 100644 (file)
@@ -40,7 +40,6 @@
 #endif
 
 #include <stdio.h>
-#include <stdlib.h>
 #include <string.h>
 #include "netdissect-stdinc.h"
 
@@ -500,7 +499,7 @@ static int  rx_cache_find(netdissect_options *, const struct rx_header *,
 
 static void fs_print(netdissect_options *, const u_char *, u_int);
 static void fs_reply_print(netdissect_options *, const u_char *, u_int, uint32_t);
-static void acl_print(netdissect_options *, u_char *, u_char *);
+static void acl_print(netdissect_options *, u_char *, const u_char *);
 static void cb_print(netdissect_options *, const u_char *, u_int);
 static void cb_reply_print(netdissect_options *, const u_char *, u_int, uint32_t);
 static void prot_print(netdissect_options *, const u_char *, u_int);
@@ -766,7 +765,6 @@ rx_cache_find(netdissect_options *ndo, const struct rx_header *rxh,
                }
 
 #define STROUT(MAX) { uint32_t _i; \
-                       ND_TCHECK_LEN(bp, sizeof(uint32_t)); \
                        _i = GET_BE_U_4(bp); \
                        if (_i > (MAX)) \
                                goto trunc; \
@@ -791,7 +789,6 @@ rx_cache_find(netdissect_options *ndo, const struct rx_header *rxh,
                }
 
 #define UINT64OUT() { uint64_t _i; \
-                       ND_TCHECK_LEN(bp, sizeof(uint64_t)); \
                        _i = GET_BE_U_8(bp); \
                        bp += sizeof(uint64_t); \
                        ND_PRINT(" %" PRIu64, _i); \
@@ -1143,11 +1140,12 @@ trunc:
  * representing a logical OR of all the ACL permission bits
  */
 
+#define XSTRINGIFY(x) #x
 #define NUMSTRINGIFY(x)        XSTRINGIFY(x)
 
 static void
 acl_print(netdissect_options *ndo,
-          u_char *s, u_char *end)
+          u_char *s, const u_char *end)
 {
        int pos, neg, acl;
        int n, i;