Changeset 933


Ignore:
Timestamp:
08/21/06 23:23:57 (7 years ago)
Author:
perry
Message:

Endianness fixes to 802.11 structures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/libtrace.h.in

    r925 r933  
    430430/** 802.11 header */ 
    431431typedef struct libtrace_80211_t { 
     432#ifdef BYTE_ORDER == LITTLE_ENDIAN 
    432433        LT_BITFIELD32      protocol:2; 
    433434        LT_BITFIELD32      type:2; 
    434435        LT_BITFIELD32      subtype:4; 
    435         LT_BITFIELD32      to_ds:1;             /**< Packet to Distribution Service */ 
     436#else 
     437        LT_BITFIELD32      subtype:4; 
     438        LT_BITFIELD32      type:2; 
     439        LT_BITFIELD32      protocol:2; 
     440#endif 
     441        LT_BITFIELD32      to_ds:1;     /**< Packet to Distribution Service */ 
    436442        LT_BITFIELD32      from_ds:1;   /**< Packet from Distribution Service */ 
    437443        LT_BITFIELD32      more_frag:1; /**< Packet has more fragments */ 
    438         LT_BITFIELD32      retry:1;             /**< Packet is a retry */ 
     444        LT_BITFIELD32      retry:1;     /**< Packet is a retry */ 
    439445        LT_BITFIELD32      power:1; 
    440446        LT_BITFIELD32      more_data:1; 
    441447        LT_BITFIELD32      wep:1; 
    442448        LT_BITFIELD32      order:1; 
     449#else 
     450        LT_BITFIELD32      order:1; 
     451        LT_BITFIELD32      wep:1; 
     452        LT_BITFIELD32      more_data:1; 
     453        LT_BITFIELD32      power:1; 
     454        LT_BITFIELD32      retry:1;     /**< Packet is a retry */ 
     455        LT_BITFIELD32      more_frag:1; /**< Packet has more fragments */ 
     456        LT_BITFIELD32      from_ds:1;   /**< Packet from Distribution Service */ 
     457        LT_BITFIELD32      to_ds:1;     /**< Packet to Distribution Service */ 
     458#endif 
    443459        uint16_t     duration; 
    444460        uint8_t      mac1[6]; 
Note: See TracChangeset for help on using the changeset viewer.