//http://www.saminiir.com/lets-code-tcp-ip-stack-1-ethernet-arp/ //https://tools.ietf.org/html/rfc7414 #ifndef FOOLOS_ETH_H #define FOOLOS_ETH_H #include struct eth_hdr { unsigned char dmac[6]; // destination mac unsigned char smac[6]; // source mac uint16_t ethertype; // length or type unsigned char payload[]; // payload } __attribute__((packed)); struct netdev; uint32_t eth_generic(struct netdev *dev, uint32_t ip, uint16_t type, uint8_t* pos,uint32_t *end); #endif