Modules/IPStack - Add structure for propagating ICMP errors
[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 #include "include/buffer.h"
10
11 typedef struct sIPv6Header      tIPv6Header;
12
13 struct sIPv6Header
14 {
15         #if 0
16         // High 4: Version
17         // Next 8: Traffic Class
18         // Low 20: Flow Label
19         Uint32  Head;
20         #else
21         union {
22                 Uint32  Head;   // Allow a ntohl to happen
23                 struct {
24                         unsigned Version:       4;
25                         unsigned TrafficClass:  8;
26                         unsigned FlowLabel:     20;
27                 } PACKED;
28         } PACKED;
29         #endif
30         Uint16  PayloadLength;
31         Uint8   NextHeader;     // Type of payload data
32         Uint8   HopLimit;
33         tIPv6   Source;
34         tIPv6   Destination;
35         char    Data[0];
36 };
37
38 #define IPV6_ETHERNET_ID        0x86DD
39
40 extern int      IPv6_RegisterCallback(int ID, tIPRxCallback* Callback);
41 extern int      IPv6_SendPacket(tInterface *Iface, tIPv6 Destination, int Protocol, tIPStackBuffer *Buffer);
42
43 #endif

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