diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-03 13:14:37 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-03 13:14:37 -0700 |
commit | ee0f56355bd7b1d2798a750fb02a975b526dd9cf (patch) | |
tree | 4fd593ed94b68cf79996246d1410d89bda9c7aa3 /node/Switch.hpp | |
parent | a69e1876f10266e5578be0a469ae7498f705fe96 (diff) | |
download | infinitytier-ee0f56355bd7b1d2798a750fb02a975b526dd9cf.tar.gz infinitytier-ee0f56355bd7b1d2798a750fb02a975b526dd9cf.zip |
Send path simplification.
Diffstat (limited to 'node/Switch.hpp')
-rw-r--r-- | node/Switch.hpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/node/Switch.hpp b/node/Switch.hpp index b5da54a0..d5d1335f 100644 --- a/node/Switch.hpp +++ b/node/Switch.hpp @@ -45,7 +45,6 @@ #include "Network.hpp" #include "SharedPtr.hpp" #include "IncomingPacket.hpp" -#include "Socket.hpp" /* Ethernet frame types that might be relevant to us */ #define ZT_ETHERTYPE_IPV4 0x0800 @@ -60,9 +59,7 @@ namespace ZeroTier { class RuntimeEnvironment; -class EthernetTap; class Logger; -class Node; class Peer; /** @@ -82,11 +79,11 @@ public: /** * Called when a packet is received from the real network * - * @param fromSock Originating socket * @param fromAddr Internet IP address of origin + * @param linkDesperation Link desperation of path over which packet was received * @param data Packet data */ - void onRemotePacket(const SharedPtr<Socket> &fromSock,const InetAddress &fromAddr,Buffer<ZT_SOCKET_MAX_MESSAGE_LEN> &data); + void onRemotePacket(const InetAddress &fromAddr,int linkDesperation,const Buffer<4096> &data); /** * Called when a packet comes from a local Ethernet tap @@ -178,9 +175,9 @@ public: throw(); private: - void _handleRemotePacketFragment(const SharedPtr<Socket> &fromSock,const InetAddress &fromAddr,const Buffer<4096> &data); - void _handleRemotePacketHead(const SharedPtr<Socket> &fromSock,const InetAddress &fromAddr,const Buffer<4096> &data); - void _handleBeacon(const SharedPtr<Socket> &fromSock,const InetAddress &fromAddr,const Buffer<4096> &data); + void _handleRemotePacketFragment(const InetAddress &fromAddr,int linkDesperation,const Buffer<4096> &data); + void _handleRemotePacketHead(const InetAddress &fromAddr,int linkDesperation,const Buffer<4096> &data); + void _handleBeacon(const InetAddress &fromAddr,int linkDesperation,const Buffer<4096> &data); Address _sendWhoisRequest( const Address &addr, |