diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-02 17:54:56 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-02 17:54:56 -0700 |
| commit | a69e1876f10266e5578be0a469ae7498f705fe96 (patch) | |
| tree | 0a1e7e3a0b88ce21ca12ea2f0ccd1ebbfacdab51 /node/Switch.cpp | |
| parent | 5f51653f9c1f0de3091cb2df0ed25fc28e865aa4 (diff) | |
| download | infinitytier-a69e1876f10266e5578be0a469ae7498f705fe96.tar.gz infinitytier-a69e1876f10266e5578be0a469ae7498f705fe96.zip | |
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.
Diffstat (limited to 'node/Switch.cpp')
| -rw-r--r-- | node/Switch.cpp | 32 |
1 files changed, 2 insertions, 30 deletions
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<Peer> &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<Peer> &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) { |
