summaryrefslogtreecommitdiff
path: root/net/eth.h
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-25 12:43:03 +0200
committerMiguel <m.i@gmx.at>2018-09-25 12:43:03 +0200
commit112ca29a3bb2ab38693943ed33ee51f4fd7d2d81 (patch)
treec843051f9291ebe2de6e603c45d924d843d35ea4 /net/eth.h
parent2ba77c01a33c3454aeed42d5394dd5ccede10851 (diff)
arp replies working!
Diffstat (limited to 'net/eth.h')
-rw-r--r--net/eth.h16
1 files changed, 16 insertions, 0 deletions
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 <stdint.h>
+
+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