diff options
Diffstat (limited to 'net/inet.h')
| -rw-r--r-- | net/inet.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |
