From a69e1876f10266e5578be0a469ae7498f705fe96 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 2 Apr 2015 17:54:56 -0700 Subject: The concept of link desperation (escalating to less desirable transports) simplifies a ton of stuff. Loads of spaghetti logic can die since we no longer have to make these decisions down in the core. --- node/Switch.cpp | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'node/Switch.cpp') diff --git a/node/Switch.cpp b/node/Switch.cpp index 0c6d5224..ec66586d 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -270,6 +270,7 @@ void Switch::send(const Packet &packet,bool encrypt) } } +#if 0 void Switch::sendHELLO(const Address &dest) { Packet outp(dest,RR->identity.address(),Packet::VERB_HELLO); @@ -281,36 +282,7 @@ void Switch::sendHELLO(const Address &dest) RR->identity.serialize(outp,false); send(outp,false); } - -bool Switch::sendHELLO(const SharedPtr &dest,const Path &path) -{ - uint64_t now = Utils::now(); - Packet outp(dest->address(),RR->identity.address(),Packet::VERB_HELLO); - outp.append((unsigned char)ZT_PROTO_VERSION); - outp.append((unsigned char)ZEROTIER_ONE_VERSION_MAJOR); - outp.append((unsigned char)ZEROTIER_ONE_VERSION_MINOR); - outp.append((uint16_t)ZEROTIER_ONE_VERSION_REVISION); - outp.append(now); - RR->identity.serialize(outp,false); - outp.armor(dest->key(),false); - RR->antiRec->logOutgoingZT(outp.data(),outp.size()); - return RR->sm->send(path.address(),path.tcp(),path.type() == Path::PATH_TYPE_TCP_OUT,outp.data(),outp.size()); -} - -bool Switch::sendHELLO(const SharedPtr &dest,const InetAddress &destUdp) -{ - uint64_t now = Utils::now(); - Packet outp(dest->address(),RR->identity.address(),Packet::VERB_HELLO); - outp.append((unsigned char)ZT_PROTO_VERSION); - outp.append((unsigned char)ZEROTIER_ONE_VERSION_MAJOR); - outp.append((unsigned char)ZEROTIER_ONE_VERSION_MINOR); - outp.append((uint16_t)ZEROTIER_ONE_VERSION_REVISION); - outp.append(now); - RR->identity.serialize(outp,false); - outp.armor(dest->key(),false); - RR->antiRec->logOutgoingZT(outp.data(),outp.size()); - return RR->sm->send(destUdp,false,false,outp.data(),outp.size()); -} +#endif bool Switch::unite(const Address &p1,const Address &p2,bool force) { -- cgit v1.2.3