X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Fipv6.h;h=7df0d0fed817e45f468891b3797229717e1189a5;hb=6a945643557084578509e149c84cf5dde3c59c3c;hp=f2f14f44ee5b8e0b46d9541dba386835e6641d3f;hpb=e939fc0ced4d445c24696636fe660dddbe035b1c;p=tpg%2Facess2.git diff --git a/Modules/IPStack/ipv6.h b/Modules/IPStack/ipv6.h index f2f14f44..7df0d0fe 100644 --- a/Modules/IPStack/ipv6.h +++ b/Modules/IPStack/ipv6.h @@ -11,17 +11,20 @@ typedef struct sIPv6Header tIPv6Header; struct sIPv6Header { - #if 1 + #if 0 // High 4: Version - // Next: Traffic Class + // Next 8: Traffic Class // Low 20: Flow Label Uint32 Head; #else - struct { - unsigned Version: 4; - unsigned TrafficClass: 8; - unsigned FlowLabel: 20; - } __attribute__((packed)); + union { + Uint32 Head; // Allow a ntohl to happen + struct { + unsigned Version: 4; + unsigned TrafficClass: 8; + unsigned FlowLabel: 20; + } PACKED; + } PACKED; #endif Uint16 PayloadLength; Uint8 NextHeader; // Type of payload data