summaryrefslogtreecommitdiff
path: root/node/IncomingPacket.hpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-03 16:52:53 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-04-03 16:52:53 -0700
commit6eb9289367a1c8661d38895558b0f01eac0ddd5e (patch)
tree32b239f50c446a52ab97de32f60708819f6078bc /node/IncomingPacket.hpp
parentee0f56355bd7b1d2798a750fb02a975b526dd9cf (diff)
downloadinfinitytier-6eb9289367a1c8661d38895558b0f01eac0ddd5e.tar.gz
infinitytier-6eb9289367a1c8661d38895558b0f01eac0ddd5e.zip
Bunch more cleanup, improvements to NAT traversal logic, finished updating Switch.
Diffstat (limited to 'node/IncomingPacket.hpp')
-rw-r--r--node/IncomingPacket.hpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/node/IncomingPacket.hpp b/node/IncomingPacket.hpp
index a6d2f4cd..ef25fbc4 100644
--- a/node/IncomingPacket.hpp
+++ b/node/IncomingPacket.hpp
@@ -31,14 +31,12 @@
#include <stdexcept>
#include "Packet.hpp"
-#include "SocketManager.hpp"
#include "InetAddress.hpp"
#include "Utils.hpp"
#include "SharedPtr.hpp"
#include "AtomicCounter.hpp"
#include "MulticastGroup.hpp"
#include "Peer.hpp"
-#include "Socket.hpp"
/*
* The big picture:
@@ -73,17 +71,17 @@ public:
* Create a new packet-in-decode
*
* @param b Source buffer with raw packet data
- * @param fromSock Socket on which packet was received
* @param remoteAddress Address from which packet came
+ * @param linkDesperation Link desperation for link over which packet was received
* @throws std::out_of_range Range error processing packet
*/
template<unsigned int C2>
- IncomingPacket(const Buffer<C2> &b,const SharedPtr<Socket> &fromSock,const InetAddress &remoteAddress)
+ IncomingPacket(const Buffer<C2> &b,const InetAddress &remoteAddress,unsigned int linkDesperation)
throw(std::out_of_range) :
Packet(b),
_receiveTime(Utils::now()),
- _fromSock(fromSock),
_remoteAddress(remoteAddress),
+ _linkDesperation(linkDesperation),
__refCount()
{
}
@@ -130,8 +128,8 @@ private:
void _sendErrorNeedCertificate(const RuntimeEnvironment *RR,const SharedPtr<Peer> &peer,uint64_t nwid);
uint64_t _receiveTime;
- SharedPtr<Socket> _fromSock;
InetAddress _remoteAddress;
+ unsigned int _linkDesperation;
AtomicCounter __refCount;
};