Itojun did part of the BSD zlib fix.
[obnox/wireshark/wip.git] / packet-ipv6.h
index 70ae4ecb8127768c37c0ef347117f09453670a74..424c61eb5ab766d06d95c95042979ad3ceb7394e 100644 (file)
@@ -1,7 +1,7 @@
 /* packet-ipv6.h
  * Definitions for IPv6 packet disassembly 
  *
- * $Id: packet-ipv6.h,v 1.7 1999/10/22 07:17:33 guy Exp $
+ * $Id: packet-ipv6.h,v 1.11 1999/12/06 20:20:35 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
 #ifndef __PACKET_IPV6_H_DEFINED__
 #define __PACKET_IPV6_H_DEFINED__
 
-#ifndef __GLOBALS_H__
-#include "globals.h"
-#endif
-
 struct e_in6_addr {
        union {
                guint32  u6_addr32[4];
@@ -96,17 +92,13 @@ struct ip6_hdr {
 #define        IP6H_SRC        8
 #define        IP6H_DST        24
 
-#define IPV6_VERSION           0x60
-#define IPV6_VERSION_MASK      0xf0
-
-#if BYTE_ORDER == BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
 #define IPV6_FLOWINFO_MASK     0x0fffffff      /* flow info (28 bits) */
 #define IPV6_FLOWLABEL_MASK    0x000fffff      /* flow label (20 bits) */
-#endif /* BIG_ENDIAN */
-#if BYTE_ORDER == LITTLE_ENDIAN
+#else
 #define IPV6_FLOWINFO_MASK     0xffffff0f      /* flow info (28 bits) */
 #define IPV6_FLOWLABEL_MASK    0xffff0f00      /* flow label (20 bits) */
-#endif /* LITTLE_ENDIAN */
+#endif
 
 /*
  * Extension Headers
@@ -420,12 +412,12 @@ struct icmp6_namelookup {
 struct icmp6_router_renum {    /* router renumbering header */
        struct icmp6_hdr        rr_hdr;
        guint8          rr_segnum;
-       guint         rr_test : 1;
-       guint         rr_reqresult : 1;
-       guint         rr_forceapply : 1;
-       guint         rr_specsite : 1;
-       guint         rr_prevdone : 1;
-       guint         rr_flags_reserved : 3;
+       guint32         rr_test : 1;
+       guint32         rr_reqresult : 1;
+       guint32         rr_forceapply : 1;
+       guint32         rr_specsite : 1;
+       guint32         rr_prevdone : 1;
+       guint32         rr_flags_reserved : 3;
        guint16         rr_maxdelay;
        guint32         rr_reserved;
 };
@@ -433,12 +425,12 @@ struct icmp6_router_renum {       /* router renumbering header */
 struct icmp6_router_renum {    /* router renumbering header */
        struct icmp6_hdr        rr_hdr;
        guint8          rr_segnum;
-       guint         rr_flags_reserved : 3;
-       guint         rr_prevdone : 1;
-       guint         rr_specsite : 1;
-       guint         rr_forceapply : 1;
-       guint         rr_reqresult : 1;
-       guint         rr_test : 1;
+       guint32         rr_flags_reserved : 3;
+       guint32         rr_prevdone : 1;
+       guint32         rr_specsite : 1;
+       guint32         rr_forceapply : 1;
+       guint32         rr_reqresult : 1;
+       guint32         rr_test : 1;
        guint16         rr_maxdelay;
        guint32         rr_reserved;
 };
@@ -469,12 +461,12 @@ struct rr_pco_match {             /* match prefix part */
 struct rr_pco_use {            /* use prefix part */
        guint8  rpu_uselen;
        guint8  rpu_keeplen;
-       guint rpu_mask_onlink : 1;
-       guint rpu_mask_autonomous : 1;
-       guint rpu_mask_reserved : 6;
-       guint rpu_onlink : 1;
-       guint rpu_autonomous : 1;
-       guint rpu_raflags_reserved : 6;
+       guint32 rpu_mask_onlink : 1;
+       guint32 rpu_mask_autonomous : 1;
+       guint32 rpu_mask_reserved : 6;
+       guint32 rpu_onlink : 1;
+       guint32 rpu_autonomous : 1;
+       guint32 rpu_raflags_reserved : 6;
        guint32 rpu_vltime;
        guint32 rpu_pltime;
        guint32 rpu_decr_vltime : 1;
@@ -487,12 +479,12 @@ struct rr_pco_use {               /* use prefix part */
 struct rr_pco_use {            /* use prefix part */
        guint8  rpu_uselen;
        guint8  rpu_keeplen;
-       guint rpu_mask_reserved : 6;
-       guint rpu_mask_autonomous : 1;
-       guint rpu_mask_onlink : 1;
-       guint rpu_raflags_reserved : 6;
-       guint rpu_autonomous : 1;
-       guint rpu_onlink : 1;
+       guint32 rpu_mask_reserved : 6;
+       guint32 rpu_mask_autonomous : 1;
+       guint32 rpu_mask_onlink : 1;
+       guint32 rpu_raflags_reserved : 6;
+       guint32 rpu_autonomous : 1;
+       guint32 rpu_onlink : 1;
        guint32 rpu_vltime;
        guint32 rpu_pltime;
        guint32 rpu_flags_reserved : 6;
@@ -506,9 +498,9 @@ struct rr_pco_use {         /* use prefix part */
 #if BYTE_ORDER == BIG_ENDIAN /* net byte order */
 struct rr_result {             /* router renumbering result message */
        guint8  rrr_reserved;
-       guint rrr_flags_reserved : 6;
-       guint rrr_outofbound : 1;
-       guint rrr_forbidden : 1;
+       guint32 rrr_flags_reserved : 6;
+       guint32 rrr_outofbound : 1;
+       guint32 rrr_forbidden : 1;
        guint8  rrr_ordinal;
        guint8  rrr_matchedlen;
        guint32 rrr_ifid;
@@ -517,9 +509,9 @@ struct rr_result {          /* router renumbering result message */
 #elif BYTE_ORDER == LITTLE_ENDIAN
 struct rr_result {             /* router renumbering result message */
        guint8  rrr_reserved;
-       guint rrr_forbidden : 1;
-       guint rrr_outofbound : 1;
-       guint rrr_flags_reserved : 6;
+       guint32 rrr_forbidden : 1;
+       guint32 rrr_outofbound : 1;
+       guint32 rrr_flags_reserved : 6;
        guint8  rrr_ordinal;
        guint8  rrr_matchedlen;
        guint32 rrr_ifid;