]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tftp.c
AHCP: add version 1 decoder
[tcpdump] / print-tftp.c
index 0caff42843235d5aeaa4821fd99ad91edc7568a9..62e2c99893e561b10b1e0b2ea173e92178a7b892 100644 (file)
@@ -45,7 +45,7 @@ static const char rcsid[] _U_ =
 #include "tftp.h"
 
 /* op code to string mapping */
-static struct tok op2str[] = {
+static const struct tok op2str[] = {
        { RRQ,          "RRQ" },        /* read request */
        { WRQ,          "WRQ" },        /* write request */
        { DATA,         "DATA" },       /* data packet */
@@ -56,7 +56,7 @@ static struct tok op2str[] = {
 };
 
 /* error code to string mapping */
-static struct tok err2str[] = {
+static const struct tok err2str[] = {
        { EUNDEF,       "EUNDEF" },     /* not defined */
        { ENOTFOUND,    "ENOTFOUND" },  /* file not found */
        { EACCESS,      "EACCESS" },    /* access violation */
@@ -99,15 +99,7 @@ tftp_print(register const u_char *bp, u_int length)
        case RRQ:
        case WRQ:
        case OACK:
-               /*
-                * XXX Not all arpa/tftp.h's specify th_stuff as any
-                * array; use address of th_block instead
-                */
-#ifdef notdef
                p = (u_char *)tp->th_stuff;
-#else
-               p = (u_char *)&tp->th_block;
-#endif
                putchar(' ');
                /* Print filename or first option */
                if (opcode != OACK)