diff options
author | Angelo Mantellini <angelo.mantellini@cisco.com> | 2020-03-26 12:02:23 +0100 |
---|---|---|
committer | Angelo Mantellini <angelo.mantellini@cisco.com> | 2020-03-31 11:35:33 +0200 |
commit | 3718e549ee31ac764b327bbf3d6e51dd7e224b46 (patch) | |
tree | 5bfc2147e348a5fd4b0291ad458dacf3feececc0 /lib/includes/hicn/util/ip_address.h | |
parent | 4b36dc3d5dd3ec206aa24d49557c61ae5886be2b (diff) |
[HICN-581] update hicn stack to support windows, again
Signed-off-by: Angelo Mantellini <angelo.mantellini@cisco.com>
Change-Id: Ic5cfeae600fde8140a076807fa1e411da1933a02
Diffstat (limited to 'lib/includes/hicn/util/ip_address.h')
-rw-r--r-- | lib/includes/hicn/util/ip_address.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/includes/hicn/util/ip_address.h b/lib/includes/hicn/util/ip_address.h index d9dea8faa..4facd9ad0 100644 --- a/lib/includes/hicn/util/ip_address.h +++ b/lib/includes/hicn/util/ip_address.h @@ -20,22 +20,23 @@ #ifndef UTIL_IP_ADDRESS_H #define UTIL_IP_ADDRESS_H -#include <arpa/inet.h> // inet_ntop + #ifdef __APPLE__ #include <libkern/OSByteOrder.h> #define __bswap_constant_32(x) OSSwapInt32(x) #include <machine/endian.h> #else -#include <endian.h> #ifdef __ANDROID__ #include <byteswap.h> #endif -#include <endian.h> + #endif #include <errno.h> -#include <netdb.h> // struct addrinfo + #ifndef _WIN32 -#include <netinet/in.h> // struct sockadd +#include <netinet/in.h> // struct sockadd +#include <arpa/inet.h> // inet_ntop +#include <netdb.h> // struct addrinfo #endif #include <stdbool.h> #include <stdlib.h> @@ -45,8 +46,8 @@ #include "types.h" #define bytes_to_bits(x) (x * 8) -#define IPV6_ADDR_LEN 16 /* bytes */ -#define IPV4_ADDR_LEN 4 /* bytes */ +#define IPV6_ADDR_LEN 16 /* bytes */ +#define IPV4_ADDR_LEN 4 /* bytes */ #define IPV6_ADDR_LEN_BITS bytes_to_bits(IPV6_ADDR_LEN) #define IPV4_ADDR_LEN_BITS bytes_to_bits(IPV4_ADDR_LEN) |