XenevaOS
Loading...
Searching...
No Matches
ethernet.h
Go to the documentation of this file.
1
30#ifndef __ETHERNET_H__
31#define __ETHERNET_H__
32
33#include <stdint.h>
34#include <aurora.h>
35#include <fs\vfs.h>
36
37
38#define ETHERNET_TYPE_IPV4 0x0800
39#define ETHERNET_TYPE_ARP 0x0806
40#define ETHERNET_TYPE_WAKE_ON_LAN 0x0842
41#define ETHERNET_TYPE_AVTP 0x22F0
42#define ETHERNET_TYPE_IETF_TRILL_PROTOCOL 0x22F3
43#define ETHERNET_TYPE_STREAM_RESV_PROTOCOL 0x22EA
44#define ETHERNET_TYPE_IPV6 0x86DD
45
46
47/*
48* AuEthernetSend -- sends a packet to ethernet layer
49* @param data -- data to send
50* @param len -- length of the data
51* @param type -- type
52* @param dest -- destination mac address
53*/
54extern void AuEthernetSend(AuVFSNode* nic,void* data, size_t len, uint16_t type, uint8_t* dest);
55
56AU_EXTERN AU_EXPORT void AuEthernetHandle(void *frame, int size, AuVFSNode* nic);
57
58
59#endif
#define AU_EXTERN
Definition aurora.h:50
#define AU_EXPORT
Definition aurora.h:38
unsigned char uint8_t
Definition acefiex.h:161
unsigned short int uint16_t
Definition acefiex.h:162
AuVFSNode * nic
Definition e1000.cpp:67
void AuEthernetSend(AuVFSNode *nic, void *data, size_t len, uint16_t type, uint8_t *dest)
Definition ethernet.cpp:102
AU_EXTERN AU_EXPORT void AuEthernetHandle(void *frame, int size, AuVFSNode *nic)
Definition ethernet.cpp:53
Definition vfs.h:89