Changeset 568dc0e


Ignore:
Timestamp:
08/11/04 16:04:51 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
Children:
5c5b47b
Parents:
ac50951
Message:

changed test for endianness/ not sure if this is right yet?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/libtrace.h

    r1f3696b r568dc0e  
    9090struct libtrace_ip
    9191  {
    92 #if BYTE_ORDER == __LITTLE_ENDIAN
     92#if BYTE_ORDER == LITTLE_ENDIAN
    9393    unsigned int ip_hl:4;               /**< header length */
    9494    unsigned int ip_v:4;                /**< version */
    95 #endif
    96 #if BYTE_ORDER == __BIG_ENDIAN
     95#elif BYTE_ORDER == BIG_ENDIAN
    9796    unsigned int ip_v:4;                /**< version */
    9897    unsigned int ip_hl:4;               /**< header length */
     98#else
     99#   error "Adjust your <bits/endian.h> defines"
    99100#endif
    100101    u_int8_t ip_tos;                    /**< type of service */
     
    119120    u_int32_t seq;              /**< Sequence number */
    120121    u_int32_t ack_seq;          /**< Acknowledgement Number */
    121 #  if BYTE_ORDER == __LITTLE_ENDIAN
     122#  if BYTE_ORDER == LITTLE_ENDIAN
    122123    u_int16_t res1:4;           /**< Reserved bits */
    123124    u_int16_t doff:4;           
     
    129130    u_int16_t urg:1;            /**< URG flag */
    130131    u_int16_t res2:2;           /**< Reserved */
    131 #  elif BYTE_ORDER == __BIG_ENDIAN
     132#  elif BYTE_ORDER == BIG_ENDIAN
    132133    u_int16_t doff:4;           
    133134    u_int16_t res1:4;
Note: See TracChangeset for help on using the changeset viewer.