]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Move the definitions of "bootp_flag_values[]" and "bootp_op_values[]"
authorguy <guy>
Tue, 1 Jul 2003 19:16:06 +0000 (19:16 +0000)
committerguy <guy>
Tue, 1 Jul 2003 19:16:06 +0000 (19:16 +0000)
out of "bootp.h" into "print-bootp.c", so we don't get unused copies of
them in files other than "print-bootp.c" that include "bootp.h", and so
we don't get warnings from GCC 3.3 about those unused copies.

bootp.h
print-bootp.c

diff --git a/bootp.h b/bootp.h
index 35f6297eaa8fc797b474e3490d7bf8792d1b1d90..d348379ba91394d6d2a1c523f0a8ea264b69d72d 100644 (file)
--- a/bootp.h
+++ b/bootp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.14 2003-04-28 07:43:03 hannes Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.15 2003-07-01 19:16:06 guy Exp $ (LBL) */
 /*
  * Bootstrap Protocol (BOOTP).  RFC951 and RFC1048.
  *
@@ -27,7 +27,7 @@ struct bootp {
        u_int8_t        bp_hops;        /* gateway hops */
        u_int32_t       bp_xid;         /* transaction ID */
        u_int16_t       bp_secs;        /* seconds since boot began */
-       u_int16_t       bp_flags;       /* flags - see bootp_flag_values[] */
+       u_int16_t       bp_flags;       /* flags - see bootp_flag_values[] in print-bootp.c */
        struct in_addr  bp_ciaddr;      /* client IP address */
        struct in_addr  bp_yiaddr;      /* 'your' IP address */
        struct in_addr  bp_siaddr;      /* server IP address */
@@ -38,11 +38,6 @@ struct bootp {
        u_int8_t        bp_vend[64];    /* vendor-specific area */
 };
 
-static const struct tok bootp_flag_values[] = {
-    { 0x8000,                   "Broadcast" },
-    { 0, NULL}
-};
-
 /*
  * UDP port numbers, server and client.
  */
@@ -52,12 +47,6 @@ static const struct tok bootp_flag_values[] = {
 #define BOOTPREPLY             2
 #define BOOTPREQUEST           1
 
-static const struct tok bootp_op_values[] = {
-    { BOOTPREQUEST,             "Request" },
-    { BOOTPREPLY,               "Reply" },
-    { 0, NULL}
-};
-
 /*
  * Vendor magic cookie (v_magic) for CMU
  */
index 605103c02fbbf8cb30c27967f78031eab0e4a683..ce1f9c6c8b5b575dfa57313e5dbb36afd04ce058 100644 (file)
@@ -22,7 +22,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.73 2003-05-01 18:02:12 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.74 2003-07-01 19:16:06 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -45,6 +45,17 @@ static void cmu_print(const u_char *);
 
 static char tstr[] = " [|bootp]";
 
+static const struct tok bootp_flag_values[] = {
+    { 0x8000,                   "Broadcast" },
+    { 0, NULL}
+};
+
+static const struct tok bootp_op_values[] = {
+    { BOOTPREQUEST,             "Request" },
+    { BOOTPREPLY,               "Reply" },
+    { 0, NULL}
+};
+
 /*
  * Print bootp requests
  */