gcontini
2020-10-14 f778490d8e2d4089ae3acd06064ffea01fffe682
src/library/os/network.hpp
@@ -10,6 +10,18 @@
#include <stdlib.h>
#include <vector>
#ifdef __unix__
#include <netdb.h>
#define LCC_ADAPTER_DESCRIPTION_LEN NI_MAXHOST
#else
//mingw cross compile for Windows
#ifdef _MSC_VER
#include <Windows.h>
#endif
#include <iphlpapi.h>
#define LCC_ADAPTER_DESCRIPTION_LEN MAX_ADAPTER_DESCRIPTION_LENGTH
#endif
#include "../base/base.h"
namespace license {
@@ -17,9 +29,10 @@
typedef enum { IFACE_TYPE_ETHERNET, IFACE_TYPE_WIRELESS } IFACE_TYPE;
typedef struct {
   int id;
   char description[1024];
   char description[LCC_ADAPTER_DESCRIPTION_LEN + 1];
   unsigned char mac_address[8];
   unsigned char ipv4_address[4];
   IFACE_TYPE type;