bootloader: Add the network endianness macros to NetDefs.h.

This file contains all the protocol- and interface-related
definitions, so this seems to be where they belong.

Required following previous commits.
This commit is contained in:
Augustin Cavalier 2019-03-26 21:50:11 -04:00
parent fb52ab82d2
commit fcf0b31fb9
1 changed files with 9 additions and 0 deletions

View File

@ -15,6 +15,15 @@
#include <util/kernel_cpp.h>
// Network endianness
#ifndef htonl
# define htonl(x) B_HOST_TO_BENDIAN_INT32(x)
# define ntohl(x) B_BENDIAN_TO_HOST_INT32(x)
# define htons(x) B_HOST_TO_BENDIAN_INT16(x)
# define ntohs(x) B_BENDIAN_TO_HOST_INT16(x)
#endif
// Ethernet
#define ETH_ALEN 6