summaryrefslogtreecommitdiff
path: root/net/inet.h
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-09-26 10:22:37 +0200
committerMiguel <m.i@gmx.at>2018-09-26 10:22:37 +0200
commitae33cc6557790a502a01b380b0926944ca2f3cfa (patch)
treee72632052d1c6f6830c40d10d26c04b73aac74c6 /net/inet.h
parentdaf374435560861681c3e4d14a2d44141aa11abc (diff)
ntp and udp
Diffstat (limited to 'net/inet.h')
-rw-r--r--net/inet.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/inet.h b/net/inet.h
index 75ab6db..1d75e03 100644
--- a/net/inet.h
+++ b/net/inet.h
@@ -3,6 +3,8 @@
* https://en.wikipedia.org/wiki/OSI_model
*/
#include <stdint.h>
+#include <stdbool.h>
+#include <netdev.h>
#define ARP_ETHERNET 1
#define ARP_IPV4 0x800
@@ -13,6 +15,8 @@
#define ETH_P_IPV4 0x0800
#define IPV4_P_ICMP 0x1
+#define IPV4_P_TCP 0x6
+#define IPV4_P_UDP 0x11
#define ICMP_ECHO_REPLY 0
#define ICMP_UNREACHABLE 3
@@ -21,3 +25,4 @@
uint16_t checksum(void *addr, int count);
uint16_t ntohs(uint16_t val);
uint16_t htons(uint16_t val);
+bool net_packet(struct netdev *dev);