Merge "Remove remaining big-endian cruft."
This commit is contained in:
commit
53ad33b993
7 changed files with 1 additions and 117 deletions
|
@ -3,11 +3,7 @@
|
|||
#ifndef _ARM_ELF_MACHDEP_H_
|
||||
#define _ARM_ELF_MACHDEP_H_
|
||||
|
||||
#if defined(__ARMEB__)
|
||||
#define ELF32_MACHDEP_ENDIANNESS ELFDATA2MSB
|
||||
#else
|
||||
#define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB
|
||||
#endif
|
||||
|
||||
#define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */
|
||||
#define ELF64_MACHDEP_ID_CASES \
|
||||
|
|
|
@ -53,13 +53,9 @@
|
|||
ABICALLS
|
||||
#endif
|
||||
|
||||
#if !defined(__MIPSEL__) && !defined(__MIPSEB__)
|
||||
#error "__MIPSEL__ or __MIPSEB__ must be defined"
|
||||
#endif
|
||||
/*
|
||||
* Define how to access unaligned data word
|
||||
*/
|
||||
#if defined(__MIPSEL__)
|
||||
#define LWLO lwl
|
||||
#define LWHI lwr
|
||||
#define SWLO swl
|
||||
|
@ -68,17 +64,6 @@
|
|||
#define LDHI ldr
|
||||
#define SDLO sdl
|
||||
#define SDHI sdr
|
||||
#endif
|
||||
#if defined(__MIPSEB__)
|
||||
#define LWLO lwr
|
||||
#define LWHI lwl
|
||||
#define SWLO swr
|
||||
#define SWHI swl
|
||||
#define LDLO ldr
|
||||
#define LDHI ldl
|
||||
#define SDLO sdr
|
||||
#define SDHI sdl
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define programming environment for ABI.
|
||||
|
|
|
@ -151,14 +151,7 @@
|
|||
#define EF_MIPS_ABI_EABI32 0x00003000
|
||||
#define EF_MIPS_ABI_EABI64 0x00004000
|
||||
|
||||
#if defined(__MIPSEB__)
|
||||
#define ELF32_MACHDEP_ENDIANNESS ELFDATA2MSB
|
||||
#define ELF64_MACHDEP_ENDIANNESS ELFDATA2MSB
|
||||
#elif defined(__MIPSEL__)
|
||||
#define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB
|
||||
#define ELF64_MACHDEP_ENDIANNESS ELFDATA2LSB
|
||||
#elif !defined(HAVE_NBTOOL_CONFIG_H)
|
||||
#error neither __MIPSEL__ nor __MIPSEB__ are defined.
|
||||
#endif
|
||||
|
||||
#endif /* _MIPS_ELF_MACHDEP_H_ */
|
||||
|
|
|
@ -54,21 +54,6 @@
|
|||
|
||||
typedef struct {
|
||||
unsigned id :16; /* query identification number */
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
/* fields in third byte */
|
||||
unsigned qr: 1; /* response flag */
|
||||
unsigned opcode: 4; /* purpose of message */
|
||||
unsigned aa: 1; /* authoritive answer */
|
||||
unsigned tc: 1; /* truncated message */
|
||||
unsigned rd: 1; /* recursion desired */
|
||||
/* fields in fourth byte */
|
||||
unsigned ra: 1; /* recursion available */
|
||||
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
|
||||
unsigned ad: 1; /* authentic data from named */
|
||||
unsigned cd: 1; /* checking disabled by resolver */
|
||||
unsigned rcode :4; /* response code */
|
||||
#endif
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
|
||||
/* fields in third byte */
|
||||
unsigned rd :1; /* recursion desired */
|
||||
unsigned tc :1; /* truncated message */
|
||||
|
@ -81,7 +66,6 @@ typedef struct {
|
|||
unsigned ad: 1; /* authentic data from named */
|
||||
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
|
||||
unsigned ra :1; /* recursion available */
|
||||
#endif
|
||||
/* remaining bytes */
|
||||
unsigned qdcount :16; /* number of question entries */
|
||||
unsigned ancount :16; /* number of answer entries */
|
||||
|
|
|
@ -245,17 +245,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
|
||||
#else
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define ND_NA_FLAG_ROUTER 0x80
|
||||
#define ND_NA_FLAG_SOLICITED 0x40
|
||||
#define ND_NA_FLAG_OVERRIDE 0x20
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct nd_redirect { /* redirect */
|
||||
struct icmp6_hdr nd_rd_hdr;
|
||||
|
@ -384,40 +376,17 @@ 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
|
||||
|
||||
#ifdef NAME_LOOKUPS_04
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define NI_NODEADDR_FLAG_LINKLOCAL 0x1
|
||||
#define NI_NODEADDR_FLAG_SITELOCAL 0x2
|
||||
#define NI_NODEADDR_FLAG_GLOBAL 0x4
|
||||
#define NI_NODEADDR_FLAG_ALL 0x8
|
||||
#define NI_NODEADDR_FLAG_TRUNCATE 0x10
|
||||
#define NI_NODEADDR_FLAG_ANYCAST 0x20 /* just experimental. not in spec */
|
||||
#elif BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define NI_NODEADDR_FLAG_LINKLOCAL 0x0100
|
||||
#define NI_NODEADDR_FLAG_SITELOCAL 0x0200
|
||||
#define NI_NODEADDR_FLAG_GLOBAL 0x0400
|
||||
#define NI_NODEADDR_FLAG_ALL 0x0800
|
||||
#define NI_NODEADDR_FLAG_TRUNCATE 0x1000
|
||||
#define NI_NODEADDR_FLAG_ANYCAST 0x2000 /* just experimental. not in spec */
|
||||
#endif
|
||||
#else /* draft-ietf-ipngwg-icmp-name-lookups-05 (and later?) */
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define NI_NODEADDR_FLAG_TRUNCATE 0x1
|
||||
#define NI_NODEADDR_FLAG_ALL 0x2
|
||||
#define NI_NODEADDR_FLAG_COMPAT 0x4
|
||||
#define NI_NODEADDR_FLAG_LINKLOCAL 0x8
|
||||
#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
|
||||
|
@ -426,7 +395,6 @@ struct icmp6_nodeinfo {
|
|||
#define NI_NODEADDR_FLAG_GLOBAL 0x2000
|
||||
#define NI_NODEADDR_FLAG_ANYCAST 0x4000 /* just experimental. not in spec */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct ni_reply_fqdn {
|
||||
u_int32_t ni_fqdn_ttl; /* TTL */
|
||||
|
@ -485,13 +453,8 @@ struct rr_pco_use { /* use prefix part */
|
|||
#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x80
|
||||
#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x40
|
||||
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000
|
||||
#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000
|
||||
#elif BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80
|
||||
#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40
|
||||
#endif
|
||||
|
||||
struct rr_result { /* router renumbering result message */
|
||||
u_int16_t rrr_flags;
|
||||
|
@ -500,13 +463,8 @@ struct rr_result { /* router renumbering result message */
|
|||
u_int32_t rrr_ifid;
|
||||
struct in6_addr rrr_prefix;
|
||||
} __packed;
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define ICMP6_RR_RESULT_FLAGS_OOB 0x0002
|
||||
#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001
|
||||
#elif BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define ICMP6_RR_RESULT_FLAGS_OOB 0x0200
|
||||
#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100
|
||||
#endif
|
||||
|
||||
/*
|
||||
* icmp6 filter structures.
|
||||
|
|
|
@ -53,14 +53,8 @@ __BEGIN_DECLS
|
|||
* Structure of an internet header, naked of options.
|
||||
*/
|
||||
struct ip {
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
u_int32_t ip_hl:4, /* header length */
|
||||
ip_v:4; /* version */
|
||||
#endif
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
u_int32_t ip_v:4, /* version */
|
||||
ip_hl:4; /* header length */
|
||||
#endif
|
||||
u_int8_t ip_tos; /* type of service */
|
||||
u_int16_t ip_len; /* total length */
|
||||
u_int16_t ip_id; /* identification */
|
||||
|
@ -149,14 +143,8 @@ struct ip_timestamp {
|
|||
u_int8_t ipt_code; /* IPOPT_TS */
|
||||
u_int8_t ipt_len; /* size of structure (variable) */
|
||||
u_int8_t ipt_ptr; /* index of current entry */
|
||||
#if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
u_int32_t ipt_flg:4, /* flags, see below */
|
||||
ipt_oflw:4; /* overflow counter */
|
||||
#endif
|
||||
#if _BYTE_ORDER == _BIG_ENDIAN
|
||||
u_int32_t ipt_oflw:4, /* overflow counter */
|
||||
ipt_flg:4; /* flags, see below */
|
||||
#endif
|
||||
union ipt_timestamp {
|
||||
n_time ipt_time[1];
|
||||
struct ipt_ta {
|
||||
|
|
|
@ -99,15 +99,9 @@ struct ip6_hdr {
|
|||
#define IPV6_VERSION 0x60
|
||||
#define IPV6_VERSION_MASK 0xf0
|
||||
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define IPV6_FLOWINFO_MASK 0x0fffffff /* flow info (28 bits) */
|
||||
#define IPV6_FLOWLABEL_MASK 0x000fffff /* flow label (20 bits) */
|
||||
#else
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define IPV6_FLOWINFO_MASK 0xffffff0f /* flow info (28 bits) */
|
||||
#define IPV6_FLOWLABEL_MASK 0xffff0f00 /* flow label (20 bits) */
|
||||
#endif /* LITTLE_ENDIAN */
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
/* ECN bits proposed by Sally Floyd */
|
||||
#define IP6TOS_CE 0x01 /* congestion experienced */
|
||||
|
@ -200,17 +194,9 @@ struct ip6_opt_router {
|
|||
u_int8_t ip6or_value[2];
|
||||
} __packed;
|
||||
/* Router alert values (in network byte order) */
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define IP6_ALERT_MLD 0x0000
|
||||
#define IP6_ALERT_RSVP 0x0001
|
||||
#define IP6_ALERT_AN 0x0002
|
||||
#else
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
#define IP6_ALERT_MLD 0x0000
|
||||
#define IP6_ALERT_RSVP 0x0100
|
||||
#define IP6_ALERT_AN 0x0200
|
||||
#endif /* LITTLE_ENDIAN */
|
||||
#endif
|
||||
|
||||
/* Routing header */
|
||||
struct ip6_rthdr {
|
||||
|
@ -238,15 +224,9 @@ struct ip6_frag {
|
|||
u_int32_t ip6f_ident; /* identification */
|
||||
} __packed;
|
||||
|
||||
#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 */
|
||||
|
||||
/*
|
||||
* Internet implementation parameters.
|
||||
|
|
Loading…
Reference in a new issue