Added basic DNS functionality, fixed stack smashing bug, organizational improvements

This commit is contained in:
Joseph Henry
2017-08-30 14:13:13 -07:00
parent be1d7082e9
commit ec323c9842
11 changed files with 599 additions and 396 deletions

View File

@@ -180,12 +180,25 @@ namespace ZeroTier {
*/
void removeVirtualSocket(VirtualSocket *vs);
/****************************************************************************/
/* DNS */
/****************************************************************************/
/*
* Registers a DNS nameserver with the network stack
*/
int add_DNS_Nameserver(struct sockaddr *addr);
/*
* Un-registers a DNS nameserver from the network stack
*/
int del_DNS_Nameserver(struct sockaddr *addr);
/****************************************************************************/
/* Vars */
/****************************************************************************/
#if defined(STACK_PICO)
bool should_start_stack = false;
struct pico_device *picodev = NULL;
@@ -206,6 +219,9 @@ namespace ZeroTier {
std::vector<std::pair<ZeroTier::InetAddress, ZeroTier::InetAddress>> routes;
void *zt1ServiceRef = NULL;
char vtap_full_name[64];
char vtap_abbr_name[16];
static int devno;
int ifindex = 0;