aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ipv6.h
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-11-11 10:23:43 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2000-11-11 10:23:43 +0000
commit9d65132b24f5f175f1c7b0d098c8fbe7246ad765 (patch)
tree5e3f87a953c1fb032efce2a0f753ec213b17b05a /packet-ipv6.h
parent56faf3afd37c6fd7d35a3ef96c04e27068a594f6 (diff)
Get rid of the definitions of LITTLE_ENDIAN and BIG_ENDIAN in
"epan/pint.h" - they caused GCC to whine about them being redefined when I compiled on FreeBSD 3.4. Get rid of the stuff in "packet-ipv6.h" that defines various bit vectors differently depending on the byte order of the machine; instead, define them so that they work with items in host byte order. This lets us use a number of them rather than using hardwired hex values. Put "frag.ip6f_offlg" in host byte order before using it; this means that IP6F_MORE_FRAG can still be used even though it now works only on items in host byte order. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2610 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-ipv6.h')
-rw-r--r--packet-ipv6.h34
1 files changed, 1 insertions, 33 deletions
diff --git a/packet-ipv6.h b/packet-ipv6.h
index 52814e0da5..d778405fea 100644
--- a/packet-ipv6.h
+++ b/packet-ipv6.h
@@ -1,7 +1,7 @@
/* packet-ipv6.h
* Definitions for IPv6 packet disassembly
*
- * $Id: packet-ipv6.h,v 1.15 2000/11/09 16:39:59 itojun Exp $
+ * $Id: packet-ipv6.h,v 1.16 2000/11/11 10:23:41 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -94,13 +94,8 @@ struct ip6_hdr {
#define IP6H_SRC 8
#define IP6H_DST 24
-#ifdef WORDS_BIGENDIAN
#define IPV6_FLOWINFO_MASK 0x0fffffff /* flow info (28 bits) */
#define IPV6_FLOWLABEL_MASK 0x000fffff /* flow label (20 bits) */
-#else
-#define IPV6_FLOWINFO_MASK 0xffffff0f /* flow info (28 bits) */
-#define IPV6_FLOWLABEL_MASK 0xffff0f00 /* flow label (20 bits) */
-#endif
/*
* Extension Headers
@@ -174,15 +169,9 @@ struct ip6_frag {
guint32 ip6f_ident; /* identification */
};
-#if BYTE_ORDER == BIG_ENDIAN
#define IP6F_OFF_MASK 0xfff8 /* mask out offset from _offlg */
#define IP6F_RESERVED_MASK 0x0006 /* reserved bits in ip6f_offlg */
#define IP6F_MORE_FRAG 0x0001 /* more-fragments flag */
-#else /* BYTE_ORDER == LITTLE_ENDIAN */
-#define IP6F_OFF_MASK 0xf8ff /* mask out offset from _offlg */
-#define IP6F_RESERVED_MASK 0x0600 /* reserved bits in ip6f_offlg */
-#define IP6F_MORE_FRAG 0x0100 /* more-fragments flag */
-#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/*
* Definition for ICMPv6.
@@ -340,15 +329,9 @@ struct nd_neighbor_advert { /* neighbor advertisement */
#define nd_na_code nd_na_hdr.icmp6_code
#define nd_na_cksum nd_na_hdr.icmp6_cksum
#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0]
-#if BYTE_ORDER == BIG_ENDIAN
#define ND_NA_FLAG_ROUTER 0x80000000
#define ND_NA_FLAG_SOLICITED 0x40000000
#define ND_NA_FLAG_OVERRIDE 0x20000000
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define ND_NA_FLAG_ROUTER 0x80
-#define ND_NA_FLAG_SOLICITED 0x40
-#define ND_NA_FLAG_OVERRIDE 0x20
-#endif
struct nd_redirect { /* redirect */
struct icmp6_hdr nd_rd_hdr;
@@ -425,15 +408,9 @@ struct icmp6_nodeinfo {
#define NI_QTYPE_NODEADDR 3 /* Node Addresses */
#define NI_QTYPE_IPV4ADDR 4 /* IPv4 Addresses */
-#if BYTE_ORDER == BIG_ENDIAN
#define NI_SUPTYPE_FLAG_COMPRESS 0x1
#define NI_FQDN_FLAG_VALIDTTL 0x1
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define NI_SUPTYPE_FLAG_COMPRESS 0x0100
-#define NI_FQDN_FLAG_VALIDTTL 0x0100
-#endif
-#if BYTE_ORDER == BIG_ENDIAN
#define NI_NODEADDR_FLAG_TRUNCATE 0x1
#define NI_NODEADDR_FLAG_ALL 0x2
#define NI_NODEADDR_FLAG_COMPAT 0x4
@@ -441,15 +418,6 @@ struct icmp6_nodeinfo {
#define NI_NODEADDR_FLAG_SITELOCAL 0x10
#define NI_NODEADDR_FLAG_GLOBAL 0x20
#define NI_NODEADDR_FLAG_ANYCAST 0x40 /* just experimental. not in spec */
-#elif BYTE_ORDER == LITTLE_ENDIAN
-#define NI_NODEADDR_FLAG_TRUNCATE 0x0100
-#define NI_NODEADDR_FLAG_ALL 0x0200
-#define NI_NODEADDR_FLAG_COMPAT 0x0400
-#define NI_NODEADDR_FLAG_LINKLOCAL 0x0800
-#define NI_NODEADDR_FLAG_SITELOCAL 0x1000
-#define NI_NODEADDR_FLAG_GLOBAL 0x2000
-#define NI_NODEADDR_FLAG_ANYCAST 0x4000 /* just experimental. not in spec */
-#endif
struct ni_reply_fqdn {
guint32 ni_fqdn_ttl; /* TTL */