X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Fipv6.h;h=07428078395093342ed7e4a5d4634e7fdf4d52b9;hb=c48c61d08d12594cff1102db2d9f3dae64dbc0f0;hp=a98561db42f51e8526a09cd64c1736ebe6d13b4c;hpb=6c5a509b5e14e097ca537c539bc9babe3b8f0c4c;p=tpg%2Facess2.git diff --git a/Modules/IPStack/ipv6.h b/Modules/IPStack/ipv6.h index a98561db..07428078 100644 --- a/Modules/IPStack/ipv6.h +++ b/Modules/IPStack/ipv6.h @@ -11,16 +11,27 @@ typedef struct sIPv6Header tIPv6Header; struct sIPv6Header { - struct { - unsigned Version: 4; - unsigned TrafficClass: 8; - unsigned FlowLabel: 20; - }; + #if 0 + // High 4: Version + // Next 8: Traffic Class + // Low 20: Flow Label + Uint32 Head; + #else + 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 Uint8 HopLimit; tIPv6 Source; tIPv6 Destination; + char Data[]; }; #define IPV6_ETHERNET_ID 0x86DD