diff options
Diffstat (limited to 'net/inet.h')
| -rw-r--r-- | net/inet.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/net/inet.h b/net/inet.h new file mode 100644 index 0000000..a2e8dd8 --- /dev/null +++ b/net/inet.h @@ -0,0 +1,20 @@ +/* + * @file + * https://en.wikipedia.org/wiki/OSI_model + */ +#include <stdint.h> + +#define ARP_ETHERNET 1 +#define ARP_IPV4 0x800 +#define ARP_REPLY 2 +#define ARP_REQUEST 1 +#define ETH_P_ARP 0x0806 + +static uint16_t ntohs(uint16_t val) +{ + return val<<8|val>>8; +} +static uint16_t htons(uint16_t val) +{ + return val<<8|val>>8; +} |
