]> The Tcpdump Group git mirrors - tcpdump/commitdiff
fixes to make ansi-pedantic compilers happier. no char types for bit fields and...
authorassar <assar>
Wed, 17 Nov 1999 04:14:50 +0000 (04:14 +0000)
committerassar <assar>
Wed, 17 Nov 1999 04:14:50 +0000 (04:14 +0000)
igrp.h
isakmp.h
print-l2tp.c
print-pim.c

diff --git a/igrp.h b/igrp.h
index cc6088a8217e19561c71274fee010b8f03ab98cb..1d84b543912919c7b2227201a8198610d3079626 100644 (file)
--- a/igrp.h
+++ b/igrp.h
@@ -4,11 +4,11 @@
 
 struct igrphdr {
 #ifdef WORDS_BIGENDIAN
-       u_char ig_v:4;          /* protocol version number */
-       u_char ig_op:4;         /* opcode */
+       u_int ig_v:4;           /* protocol version number */
+       u_int ig_op:4;          /* opcode */
 #else
-       u_char ig_op:4;         /* opcode */
-       u_char ig_v:4;          /* protocol version number */
+       u_int ig_op:4;          /* opcode */
+       u_int ig_v:4;           /* protocol version number */
 #endif
        u_char ig_ed;           /* edition number */
        u_short ig_as;          /* autonomous system number */
index b989a233c029ec53049152a9e3226fc997759bbf..e8c7bd55975cc313071fc6b6e7da748c6ed09f10 100644 (file)
--- a/isakmp.h
+++ b/isakmp.h
@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-/* YIPS @(#)$Id: isakmp.h,v 1.2 1999-10-30 07:36:36 itojun Exp $ */
+/* YIPS @(#)$Id: isakmp.h,v 1.3 1999-11-17 04:14:50 assar Exp $ */
 
 /* refer to RFC 2408 */
 
@@ -102,10 +102,10 @@ struct isakmp {
        cookie_t r_ck;     /* Responder Cookie */
        u_int8_t   np;       /* Next Payload Type */
 #if defined(WORDS_BIGENDIAN) || (defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN))
-       u_int8_t   v_maj:4,  /* MnVer */
+       u_int   v_maj:4,  /* MnVer */
                 v_min:4;  /* MjVer */
 #else
-       u_int8_t   v_min:4,  /* MnVer */
+       u_int   v_min:4,  /* MnVer */
                 v_maj:4;  /* MjVer */
 #endif
        u_int8_t   etype;    /* Exchange Type */
index 3b47b1aabee3552bcc8edce097d56cec2c23ebc7..619aed5fe2c59e510f79b23d09154a73d6949cc5 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.2 1999-10-30 23:45:51 itojun Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.3 1999-11-17 04:14:50 assar Exp $";
 #endif
 
 #include <sys/types.h>
@@ -44,7 +44,7 @@ static char tstr[] = " [|l2tp]";
 #define FALSE 0
 #endif
 
-static u_char *l2tp_message_type_string[] = {
+static char *l2tp_message_type_string[] = {
        "RESERVED_0",           /* 0  Reserved */
        "SCCRQ",                /* 1  Start-Control-Connection-Request */
        "SCCRP",                /* 2  Start-Control-Connection-Reply */
@@ -683,7 +683,7 @@ l2tp_print(const u_char *dat, u_int length)
 
        if (flag_o) {
                pad =  ntohs(*ptr++);
-               (u_char *)ptr += pad;
+               ptr += pad / sizeof(*ptr);
                cnt += (2 + pad);
        }
 
index 29b32dfebb2e4226c966eaffe95ccda55ccd14a0..10a030ebd2284b15c827b896089b31e05bb03704 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.10 1999-10-30 07:36:38 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.11 1999-11-17 04:14:50 assar Exp $ (LBL)";
 #endif
 
 #include <sys/param.h>
@@ -45,14 +45,14 @@ static const char rcsid[] =
 #else
 struct pim {
 #if defined(WORDS_BIGENDIAN) || (defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN))
-       u_char  pim_type:4, /* the PIM message type, currently they are:
+       u_int   pim_type:4, /* the PIM message type, currently they are:
                            * Hello, Register, Register-Stop, Join/Prune,
                            * Bootstrap, Assert, Graft (PIM-DM only),
                            * Graft-Ack (PIM-DM only), C-RP-Adv
                            */
                pim_ver:4;  /* PIM version number; 2 for PIMv2 */
 #else
-       u_char  pim_ver:4,      /* PIM version */
+       u_int   pim_ver:4,      /* PIM version */
                pim_type:4;     /* PIM type    */
 #endif
        u_char  pim_rsv;        /* Reserved */