summaryrefslogtreecommitdiff
path: root/node/Switch.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-09-04 14:56:39 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-09-04 14:56:39 -0700
commitdb0369e9b8e6bf49ce8ec8f7fe706004314d4548 (patch)
tree4618a44ebc1afa33f41303ba608cae9ba4a9d9c7 /node/Switch.hpp
parent0ab3e49be91ed7a8723c8b58750aef77c01e8d08 (diff)
downloadinfinitytier-db0369e9b8e6bf49ce8ec8f7fe706004314d4548.tar.gz
infinitytier-db0369e9b8e6bf49ce8ec8f7fe706004314d4548.zip
Remove way-overkill multimap from Switch.
Diffstat (limited to 'node/Switch.hpp')
-rw-r--r--node/Switch.hpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/node/Switch.hpp b/node/Switch.hpp
index a1b36014..0791681f 100644
--- a/node/Switch.hpp
+++ b/node/Switch.hpp
@@ -214,22 +214,24 @@ private:
std::list< SharedPtr<IncomingPacket> > _rxQueue;
Mutex _rxQueue_m;
- // ZeroTier-layer TX queue by destination ZeroTier address
+ // ZeroTier-layer TX queue entry
struct TXQueueEntry
{
TXQueueEntry() {}
- TXQueueEntry(uint64_t ct,const Packet &p,bool enc,uint64_t nw) :
+ TXQueueEntry(Address d,uint64_t ct,const Packet &p,bool enc,uint64_t nw) :
+ dest(d),
creationTime(ct),
nwid(nw),
packet(p),
encrypt(enc) {}
+ Address dest;
uint64_t creationTime;
uint64_t nwid;
Packet packet; // unencrypted/unMAC'd packet -- this is done at send time
bool encrypt;
};
- std::multimap< Address,TXQueueEntry > _txQueue;
+ std::list< TXQueueEntry > _txQueue;
Mutex _txQueue_m;
// Tracks sending of VERB_RENDEZVOUS to relaying peers