mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Now for some clang compile fixes...
This commit is contained in:
parent
babf3787c6
commit
8730d30575
2 changed files with 14 additions and 14 deletions
|
@ -154,16 +154,16 @@ void NodeControlService::_doCommand(IpcConnection *ipcc,const char *commandLine)
|
||||||
default:
|
default:
|
||||||
ipcc->printf("unknown;");
|
ipcc->printf("unknown;");
|
||||||
break;
|
break;
|
||||||
case ZT1_Node_PhysicalPathType::ZT1_Node_PhysicalPath_TYPE_UDP:
|
case ZT1_Node_PhysicalPath_TYPE_UDP:
|
||||||
ipcc->printf("udp;");
|
ipcc->printf("udp;");
|
||||||
break;
|
break;
|
||||||
case ZT1_Node_PhysicalPathType::ZT1_Node_PhysicalPath_TYPE_TCP_OUT:
|
case ZT1_Node_PhysicalPath_TYPE_TCP_OUT:
|
||||||
ipcc->printf("tcp_out;");
|
ipcc->printf("tcp_out;");
|
||||||
break;
|
break;
|
||||||
case ZT1_Node_PhysicalPathType::ZT1_Node_PhysicalPath_TYPE_TCP_IN:
|
case ZT1_Node_PhysicalPath_TYPE_TCP_IN:
|
||||||
ipcc->printf("tcp_in;");
|
ipcc->printf("tcp_in;");
|
||||||
break;
|
break;
|
||||||
case ZT1_Node_PhysicalPathType::ZT1_Node_PhysicalPath_TYPE_ETHERNET:
|
case ZT1_Node_PhysicalPath_TYPE_ETHERNET:
|
||||||
ipcc->printf("eth;");
|
ipcc->printf("eth;");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -178,9 +178,9 @@ void NodeControlService::_doCommand(IpcConnection *ipcc,const char *commandLine)
|
||||||
}
|
}
|
||||||
const char *rolestr;
|
const char *rolestr;
|
||||||
switch(pl->peers[i].role) {
|
switch(pl->peers[i].role) {
|
||||||
case ZT1_Node_PeerRole::ZT1_Node_Peer_SUPERNODE: rolestr = "SUPERNODE"; break;
|
case ZT1_Node_Peer_SUPERNODE: rolestr = "SUPERNODE"; break;
|
||||||
case ZT1_Node_PeerRole::ZT1_Node_Peer_HUB: rolestr = "HUB"; break;
|
case ZT1_Node_Peer_HUB: rolestr = "HUB"; break;
|
||||||
case ZT1_Node_PeerRole::ZT1_Node_Peer_NODE: rolestr = "NODE"; break;
|
case ZT1_Node_Peer_NODE: rolestr = "NODE"; break;
|
||||||
default: rolestr = "?"; break;
|
default: rolestr = "?"; break;
|
||||||
}
|
}
|
||||||
ipcc->printf(" %u %s %s"ZT_EOL_S,
|
ipcc->printf(" %u %s %s"ZT_EOL_S,
|
||||||
|
|
|
@ -859,7 +859,7 @@ ZT1_Node_PeerList *Node::listPeers()
|
||||||
p->first->address().toString(prec->address,sizeof(prec->address));
|
p->first->address().toString(prec->address,sizeof(prec->address));
|
||||||
prec->rawAddress = p->first->address().toInt();
|
prec->rawAddress = p->first->address().toInt();
|
||||||
prec->latency = p->first->latency();
|
prec->latency = p->first->latency();
|
||||||
prec->role = RR->topology->isSupernode(p->first->address()) ? ZT1_Node_PeerRole::ZT1_Node_Peer_SUPERNODE : ZT1_Node_PeerRole::ZT1_Node_Peer_NODE;
|
prec->role = RR->topology->isSupernode(p->first->address()) ? ZT1_Node_Peer_SUPERNODE : ZT1_Node_Peer_NODE;
|
||||||
|
|
||||||
prec->paths = (ZT1_Node_PhysicalPath *)buf;
|
prec->paths = (ZT1_Node_PhysicalPath *)buf;
|
||||||
buf += sizeof(ZT1_Node_PhysicalPath) * p->second.size();
|
buf += sizeof(ZT1_Node_PhysicalPath) * p->second.size();
|
||||||
|
@ -869,11 +869,11 @@ ZT1_Node_PeerList *Node::listPeers()
|
||||||
ZT1_Node_PhysicalPath *path = &(prec->paths[prec->numPaths++]);
|
ZT1_Node_PhysicalPath *path = &(prec->paths[prec->numPaths++]);
|
||||||
path->type = (ZT1_Node_PhysicalPathType)pi->type();
|
path->type = (ZT1_Node_PhysicalPathType)pi->type();
|
||||||
if (pi->address().isV6()) {
|
if (pi->address().isV6()) {
|
||||||
path->address.type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV6;
|
path->address.type = ZT1_Node_PhysicalAddress_TYPE_IPV6;
|
||||||
memcpy(path->address.bits,pi->address().rawIpData(),16);
|
memcpy(path->address.bits,pi->address().rawIpData(),16);
|
||||||
// TODO: zoneIndex not supported yet, but should be once echo-location works w/V6
|
// TODO: zoneIndex not supported yet, but should be once echo-location works w/V6
|
||||||
} else {
|
} else {
|
||||||
path->address.type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV4;
|
path->address.type = ZT1_Node_PhysicalAddress_TYPE_IPV4;
|
||||||
memcpy(path->address.bits,pi->address().rawIpData(),4);
|
memcpy(path->address.bits,pi->address().rawIpData(),4);
|
||||||
}
|
}
|
||||||
path->address.port = pi->address().port();
|
path->address.port = pi->address().port();
|
||||||
|
@ -938,10 +938,10 @@ ZT1_Node_Network *Node::getNetworkStatus(uint64_t nwid)
|
||||||
for(std::set<InetAddress>::iterator ip(ips.begin());ip!=ips.end();++ip) {
|
for(std::set<InetAddress>::iterator ip(ips.begin());ip!=ips.end();++ip) {
|
||||||
ZT1_Node_PhysicalAddress *ipb = &(nbuf->ips[nbuf->numIps++]);
|
ZT1_Node_PhysicalAddress *ipb = &(nbuf->ips[nbuf->numIps++]);
|
||||||
if (ip->isV6()) {
|
if (ip->isV6()) {
|
||||||
ipb->type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV6;
|
ipb->type = ZT1_Node_PhysicalAddress_TYPE_IPV6;
|
||||||
memcpy(ipb->bits,ip->rawIpData(),16);
|
memcpy(ipb->bits,ip->rawIpData(),16);
|
||||||
} else {
|
} else {
|
||||||
ipb->type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV4;
|
ipb->type = ZT1_Node_PhysicalAddress_TYPE_IPV4;
|
||||||
memcpy(ipb->bits,ip->rawIpData(),4);
|
memcpy(ipb->bits,ip->rawIpData(),4);
|
||||||
}
|
}
|
||||||
ipb->port = ip->port();
|
ipb->port = ip->port();
|
||||||
|
@ -991,10 +991,10 @@ ZT1_Node_NetworkList *Node::listNetworks()
|
||||||
for(std::set<InetAddress>::iterator ip(ipsv[i].begin());ip!=ipsv[i].end();++ip) {
|
for(std::set<InetAddress>::iterator ip(ipsv[i].begin());ip!=ipsv[i].end();++ip) {
|
||||||
ZT1_Node_PhysicalAddress *ipb = &(nbuf->ips[nbuf->numIps++]);
|
ZT1_Node_PhysicalAddress *ipb = &(nbuf->ips[nbuf->numIps++]);
|
||||||
if (ip->isV6()) {
|
if (ip->isV6()) {
|
||||||
ipb->type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV6;
|
ipb->type = ZT1_Node_PhysicalAddress_TYPE_IPV6;
|
||||||
memcpy(ipb->bits,ip->rawIpData(),16);
|
memcpy(ipb->bits,ip->rawIpData(),16);
|
||||||
} else {
|
} else {
|
||||||
ipb->type = ZT1_Node_PhysicalAddressType::ZT1_Node_PhysicalAddress_TYPE_IPV4;
|
ipb->type = ZT1_Node_PhysicalAddress_TYPE_IPV4;
|
||||||
memcpy(ipb->bits,ip->rawIpData(),4);
|
memcpy(ipb->bits,ip->rawIpData(),4);
|
||||||
}
|
}
|
||||||
ipb->port = ip->port();
|
ipb->port = ip->port();
|
||||||
|
|
Loading…
Add table
Reference in a new issue