Modules/VIARhineII - RX and TX works, but TX is a hack atm
[tpg/acess2.git] / KernelLand / Modules / IPStack / link.h
1 /*
2  * Acess2 IP Stack
3  * - Link/Media Layer Header
4  */
5 #ifndef _LINK_H_
6 #define _LINK_H_
7
8 #include "include/buffer.h"
9
10 // === EXTERNAL ===
11 typedef void (*tPacketCallback)(tAdapter *Interface, tMacAddr From, int Length, void *Buffer);
12
13 extern void     Link_RegisterType(Uint16 Type, tPacketCallback Callback);
14 extern void     Link_SendPacket(tAdapter *Interface, Uint16 Type, tMacAddr To, tIPStackBuffer *Buffer);
15 extern int      Link_HandlePacket(tAdapter *Adapter, tIPStackBuffer *Buffer);
16 extern void     Link_WatchDevice(tAdapter *Adapter);
17
18 // === INTERNAL ===
19 typedef struct sEthernetHeader  tEthernetHeader;
20 typedef struct sEthernetFooter  tEthernetFooter;
21 struct sEthernetHeader {
22         tMacAddr        Dest;
23         tMacAddr        Src;
24         Uint16  Type;
25         Uint8   Data[];
26 };
27
28 struct sEthernetFooter {
29         //Uint32        CRC;
30 };
31
32 #endif

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