From 112ca29a3bb2ab38693943ed33ee51f4fd7d2d81 Mon Sep 17 00:00:00 2001 From: Miguel Date: Tue, 25 Sep 2018 12:43:03 +0200 Subject: arp replies working! --- net/eth.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 net/eth.h (limited to 'net/eth.h') diff --git a/net/eth.h b/net/eth.h new file mode 100644 index 0000000..f90e615 --- /dev/null +++ b/net/eth.h @@ -0,0 +1,16 @@ +//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)); + +#endif -- cgit v1.2.3