]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-resp.c
On Solaris, for 64-bit builds, use the 64-bit pcap-config.
[tcpdump] / print-resp.c
index 244fec58301120fc93cc2d4046aa00c719f15707..00a6e257d41746656825c9fe2c8ddde0b8d61cdf 100644 (file)
@@ -36,9 +36,6 @@
 #include "netdissect-stdinc.h"
 #include "netdissect.h"
 #include <limits.h>
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
 
 #include "extract.h"
 
@@ -59,7 +56,6 @@
 #define resp_print_length_negative(ndo)  ND_PRINT(" length negative and not -1")
 #define resp_print_invalid(ndo)          ND_PRINT(" invalid")
 
-void       resp_print(netdissect_options *, const u_char *, u_int);
 static int resp_parse(netdissect_options *, const u_char *, int);
 static int resp_print_string_error_integer(netdissect_options *, const u_char *, int);
 static int resp_print_simple_string(netdissect_options *, const u_char *, int);
@@ -116,7 +112,6 @@ static int resp_get_length(netdissect_options *, const u_char *, int, const u_ch
 #define FIND_CR_OR_LF(_ptr, _len)           \
     for (;;) {                              \
         LCHECK(_len);                       \
-        ND_TCHECK_1(_ptr);                  \
         if (GET_U_1(_ptr) == '\r' ||        \
             GET_U_1(_ptr) == '\n')          \
             break;                          \
@@ -250,7 +245,6 @@ resp_parse(netdissect_options *ndo, const u_char *bp, int length)
     int ret_len;
 
     LCHECK2(length, 1);
-    ND_TCHECK_1(bp);
     op = GET_U_1(bp);
 
     /* bp now points to the op, so these routines must skip it */
@@ -467,7 +461,6 @@ resp_get_length(netdissect_options *ndo, const u_char *bp, int len, const u_char
 
     if (len == 0)
         goto trunc;
-    ND_TCHECK_1(bp);
     too_large = 0;
     neg = 0;
     if (GET_U_1(bp) == '-') {
@@ -481,7 +474,6 @@ resp_get_length(netdissect_options *ndo, const u_char *bp, int len, const u_char
     for (;;) {
         if (len == 0)
             goto trunc;
-        ND_TCHECK_1(bp);
         c = GET_U_1(bp);
         if (!(c >= '0' && c <= '9')) {
             if (!saw_digit) {
@@ -519,7 +511,6 @@ resp_get_length(netdissect_options *ndo, const u_char *bp, int len, const u_char
     len--;
     if (len == 0)
         goto trunc;
-    ND_TCHECK_1(bp);
     if (GET_U_1(bp) != '\n') {
         bp++;
         goto invalid;