|
|
|
|
@ -35,7 +35,10 @@
|
|
|
|
|
|
|
|
|
|
#include "ZeroTierConstants.h" |
|
|
|
|
|
|
|
|
|
#include <stdint.h> |
|
|
|
|
#if defined(_MSC_VER) |
|
|
|
|
#include <BaseTsd.h> |
|
|
|
|
typedef int ssize_t; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#ifdef _WIN32 |
|
|
|
|
#ifdef ADD_EXPORTS |
|
|
|
|
@ -92,7 +95,11 @@ typedef uint16_t zts_in_port_t;
|
|
|
|
|
typedef uint8_t zts_sa_family_t; |
|
|
|
|
|
|
|
|
|
struct zts_in_addr { |
|
|
|
|
#if defined(_WIN32) |
|
|
|
|
zts_in_addr_t S_addr; |
|
|
|
|
#else |
|
|
|
|
zts_in_addr_t s_addr; |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct zts_in6_addr { |
|
|
|
|
@ -113,12 +120,12 @@ struct zts_sockaddr_in {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct zts_sockaddr_in6 { |
|
|
|
|
uint8_t sin6_len; /* length of this structure */ |
|
|
|
|
zts_sa_family_t sin6_family; /* AF_INET6 */ |
|
|
|
|
zts_in_port_t sin6_port; /* Transport layer port # */ |
|
|
|
|
uint32_t sin6_flowinfo; /* IPv6 flow information */ |
|
|
|
|
struct zts_in6_addr sin6_addr; /* IPv6 address */ |
|
|
|
|
uint32_t sin6_scope_id; /* Set of interfaces for scope */ |
|
|
|
|
uint8_t sin6_len; // length of this structure
|
|
|
|
|
zts_sa_family_t sin6_family; // AF_INET6
|
|
|
|
|
zts_in_port_t sin6_port; // Transport layer port #
|
|
|
|
|
uint32_t sin6_flowinfo; // IPv6 flow information
|
|
|
|
|
struct zts_in6_addr sin6_addr; // IPv6 address
|
|
|
|
|
uint32_t sin6_scope_id; // Set of interfaces for scope
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct zts_sockaddr { |
|
|
|
|
@ -156,16 +163,14 @@ struct zts_msghdr {
|
|
|
|
|
* Structure used for manipulating linger option. |
|
|
|
|
*/ |
|
|
|
|
struct zts_linger { |
|
|
|
|
int l_onoff; /* option on/off */ |
|
|
|
|
int l_linger; /* linger time in seconds */ |
|
|
|
|
int l_onoff; // option on/off
|
|
|
|
|
int l_linger; // linger time in seconds
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
typedef struct fd_set |
|
|
|
|
typedef struct zts_fd_set |
|
|
|
|
{ |
|
|
|
|
unsigned char fd_bits [(FD_SETSIZE+7)/8]; |
|
|
|
|
} fd_set; |
|
|
|
|
*/ |
|
|
|
|
} zts_fd_set; |
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus |
|
|
|
|
} |
|
|
|
|
|