Bigendian/Littleendian confusion
<p>i am working on the legacy code, which is written for ipv4. Now i have added the similar code for ipv6. i have tried and tested on host machine..but i have concern whether it will work on the powerpc , because of endianness...the code is to extract the ip header from the incoming stream and compress it..any comments will be helpful</p>

<pre><code>class st_ipv6
{
  //==================================================================================================
public:
  //==================================================================================================

#ifdef _BIG_ENDIAN
  uint32  version:4;              // version 
  uint32  trafficclass:8;         // header length 
  uint32  flowlabel:20;           // flow label
#else
  uint32  trafficclass_1:4;
  uint32  version:4;              // version 
  uint32  flowlabel_1:4; 
  uint32  trafficclass_2:4;         // traffic class
  uint32  flowlabel_2:4;           // flow label 
  uint32  flowlabel_3:4;           // flow label 
  uint32  flowlabel_4:4;           // flow label 
  uint32  flowlabel_5:4;           // flow label 
#endif
  uint16  payloadlength;          // payload length
  uint8   nextheader;             // next header
  uint8   hoplimit;               // hop limit
  uint32  sourceaddress[4];       // source address 
  uint32  destinationaddress[4];  // destination address 




#ifdef _BIG_ENDIAN
  //**********************************************************************************************
  //* Description:
  /**  Specify/Return IPv6 Version
  */
  //**********************************************************************************************
  inline void setVersion(uint8 ubyVersion)
  {
    version = ubyVersion;
  }
  inline uint8 getVersion()
  {
    return version;
  }
</code></pre>
