summaryrefslogtreecommitdiff
path: root/net/inet.h
diff options
context:
space:
mode:
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);