8 #define HOST_IP_STR "10.1.1.2"
9 #define HOST_IP 0x0A,0x01,0x01,0x02
10 #define HOST_MAC 0x54,0x56,0x00,0x12,0x34,0x11
12 #define TEST_IP 0x0A,0x01,0x01,0x01
13 #define TEST_MAC 0x54,0x56,0x00,0x12,0x34,0x56
15 #define BLOB(bytes) (const char[]){bytes}
18 # define htons(x) ((uint16_t)(x))
19 # define htonl(x) ((uint32_t)(x))
21 static inline uint16_t htons(uint16_t x) {
22 return (x >> 8) | (x << 8);
24 static inline uint32_t htonl(uint32_t x) {
25 return ((x >> 24) & 0xFF) << 0
26 |((x >> 16) & 0xFF) << 8
27 |((x >> 8) & 0xFF) << 16
28 |((x >> 0) & 0xFF) << 24;
31 #define ntohs(x) htons(x)
32 #define ntohl(x) htonl(x)