Chroma/chroma/lainlib/ethernet/ethernet.h
Curle 2c95714d2f
Working on ethernet.
Includes a prototype E1000 driver.
2021-03-19 02:18:39 +00:00

23 lines
397 B
C

/************************
*** Team Kitty, 2021 ***
*** Chroma ***
***********************/
#include <stdint.h>
struct mac_address {
uint8_t MAC[6];
} __attribute__((packed));
enum packet_types {
ET_ARP = 0x0806,
ET_IP4 = 0x0800,
ET_IP6 = 0x86DD,
};
struct ethernet_packet {
mac_address Dest;
mac_address Source;
uint16_t Type;
uint8_t Payload[];
};