X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FIPStack%2Fipv6.h;h=d2e4f28dd70d22ae920004f2d89139248d6f3197;hb=2f9415b7b804073b0365781ad4f05a7306b6c890;hp=c2810a38d27487c3952da058f756a50d3448284d;hpb=07173b260d76a7e6482838c02d5deb2ead2afbb2;p=tpg%2Facess2.git diff --git a/Modules/IPStack/ipv6.h b/Modules/IPStack/ipv6.h index c2810a38..d2e4f28d 100644 --- a/Modules/IPStack/ipv6.h +++ b/Modules/IPStack/ipv6.h @@ -11,25 +11,32 @@ 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; - }; + 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 +extern int IPv6_RegisterCallback(int ID, tIPCallback Callback); +extern int IPv6_SendPacket(tInterface *Iface, tIPv6 Destination, int Protocol, size_t Length, const void *Data); + #endif