git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AcessNative - Now can use the `dir` CLIShell builtin
[tpg/acess2.git]
/
Modules
/
IPStack
/
ipv6.h
diff --git
a/Modules/IPStack/ipv6.h
b/Modules/IPStack/ipv6.h
index
f2f14f4
..
d2e4f28
100644
(file)
--- a/
Modules/IPStack/ipv6.h
+++ b/
Modules/IPStack/ipv6.h
@@
-11,25
+11,32
@@
typedef struct sIPv6Header tIPv6Header;
struct sIPv6Header
{
struct sIPv6Header
{
- #if
1
+ #if
0
// High 4: Version
// High 4: Version
- // Next: Traffic Class
+ // Next
8
: Traffic Class
// Low 20: Flow Label
Uint32 Head;
#else
// 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
Uint8 HopLimit;
tIPv6 Source;
tIPv6 Destination;
#endif
Uint16 PayloadLength;
Uint8 NextHeader; // Type of payload data
Uint8 HopLimit;
tIPv6 Source;
tIPv6 Destination;
+ char Data[];
};
#define IPV6_ETHERNET_ID 0x86DD
};
#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
#endif
UCC
git Repository :: git.ucc.asn.au