Skip to content

Commit

Permalink
add ZTS_IN6ADDR_ANY_INIT and zts_in6addr_any
Browse files Browse the repository at this point in the history
These mimic IN6ADDR_ANY_INIT and in6addr_any

For setting sin6_addr in zts_sockaddr_in6:
```
struct zts_sockaddr_in6 addr6;
addr6.sin6_addr = zts_in6addr_any;
```
  • Loading branch information
bostick committed Aug 18, 2023
1 parent 624038d commit 9ca6873
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/ZeroTierSockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,12 @@ typedef void (*CppCallback)(void* msg);
/** 255.255.255.255 */
#define ZTS_INADDR_BROADCAST ZTS_IPADDR_BROADCAST


#define ZTS_IN6ADDR_ANY_INIT {{{0,0,0,0}}}




// Socket protocol types
#define ZTS_SOCK_STREAM 0x0001
#define ZTS_SOCK_DGRAM 0x0002
Expand Down Expand Up @@ -503,6 +509,8 @@ struct zts_in6_addr {
//#define s6_addr un.u8_addr
};

const struct zts_in6_addr zts_in6addr_any = ZTS_IN6ADDR_ANY_INIT;

/**
* Address structure to specify an IPv4 endpoint
*/
Expand Down

0 comments on commit 9ca6873

Please sign in to comment.