More work on IPv4/IPv6 firewalling support
[tpg/acess2.git] / Modules / IPStack / ipv6.h
index f2f14f4..7df0d0f 100644 (file)
@@ -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

UCC git Repository :: git.ucc.asn.au