Modules/VIARhineII - Fiddling
[tpg/acess2.git] / KernelLand / Modules / IPStack / ipv6.h
1 /*
2  * Acess2 IP Stack
3  * - IPv6 Definitions
4  */
5 #ifndef _IPV6_H_
6 #define _IPV6_H_
7
8 #include "ipstack.h"
9
10 typedef struct sIPv6Header      tIPv6Header;
11
12 struct sIPv6Header
13 {
14         #if 0
15         // High 4: Version
16         // Next 8: Traffic Class
17         // Low 20: Flow Label
18         Uint32  Head;
19         #else
20         union {
21                 Uint32  Head;   // Allow a ntohl to happen
22                 struct {
23                         unsigned Version:       4;
24                         unsigned TrafficClass:  8;
25                         unsigned FlowLabel:     20;
26                 } PACKED;
27         } PACKED;
28         #endif
29         Uint16  PayloadLength;
30         Uint8   NextHeader;     // Type of payload data
31         Uint8   HopLimit;
32         tIPv6   Source;
33         tIPv6   Destination;
34         char    Data[];
35 };
36
37 #define IPV6_ETHERNET_ID        0x86DD
38
39 extern int      IPv6_RegisterCallback(int ID, tIPCallback Callback);
40 extern int      IPv6_SendPacket(tInterface *Iface, tIPv6 Destination, int Protocol, size_t Length, const void *Data);
41
42 #endif

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