summaryrefslogtreecommitdiff
path: root/net/inet.h
blob: a2e8dd879929b663ee94bfae887dc6353bae9c2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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;
}