diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-09-23 13:49:56 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-09-23 13:49:56 -0700 |
| commit | 367ffde00cf6eecbca0f9fff391dcaf7faf72c6e (patch) | |
| tree | a3e345de1a0a5998ca7eec6fe9e2ff2283da6c80 /node/Node.hpp | |
| parent | 4464fa5d392dd930bf847c2dc1c5886398e5d8dd (diff) | |
| download | infinitytier-367ffde00cf6eecbca0f9fff391dcaf7faf72c6e.tar.gz infinitytier-367ffde00cf6eecbca0f9fff391dcaf7faf72c6e.zip | |
Plumb through localInterfaceId to track local interfaces corresponding with remote addresses.
Diffstat (limited to 'node/Node.hpp')
| -rw-r--r-- | node/Node.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/node/Node.hpp b/node/Node.hpp index 2a283eab..0e614e5a 100644 --- a/node/Node.hpp +++ b/node/Node.hpp @@ -80,6 +80,7 @@ public: ZT1_ResultCode processWirePacket( uint64_t now, + int localInterfaceId, const struct sockaddr_storage *remoteAddress, const void *packetData, unsigned int packetLength, @@ -119,16 +120,18 @@ public: /** * Enqueue a ZeroTier message to be sent * + * @param localInterfaceId Local interface ID, -1 for unspecified/random * @param addr Destination address * @param data Packet data * @param len Packet length * @return True if packet appears to have been sent */ - inline bool putPacket(const InetAddress &addr,const void *data,unsigned int len) + inline bool putPacket(int localInterfaceId,const InetAddress &addr,const void *data,unsigned int len) { return (_wirePacketSendFunction( reinterpret_cast<ZT1_Node *>(this), _uPtr, + localInterfaceId, reinterpret_cast<const struct sockaddr_storage *>(&addr), data, len) == 0); |
