diff options
Diffstat (limited to 'node/Peer.hpp')
| -rw-r--r-- | node/Peer.hpp | 40 | 
1 files changed, 40 insertions, 0 deletions
| diff --git a/node/Peer.hpp b/node/Peer.hpp index 5da19468..ef33d519 100644 --- a/node/Peer.hpp +++ b/node/Peer.hpp @@ -233,6 +233,46 @@ public:  	}  	/** +	 * @return IPv4 direct address or null InetAddress if none +	 */ +	inline InetAddress ipv4Path() const +		throw() +	{ +		return _ipv4p.addr; +	} + +	/** +	 * @return IPv6 direct address or null InetAddress if none +	 */ +	inline InetAddress ipv6Path() const +		throw() +	{ +		return _ipv4p.addr; +	} + +	/** +	 * @return IPv4 direct address or null InetAddress if none +	 */ +	inline InetAddress ipv4ActivePath(uint64_t now) const +		throw() +	{ +		if (_ipv4p.isActive(now)) +			return _ipv4p.addr; +		return InetAddress(); +	} + +	/** +	 * @return IPv6 direct address or null InetAddress if none +	 */ +	inline InetAddress ipv6ActivePath(uint64_t now) const +		throw() +	{ +		if (_ipv6p.isActive(now)) +			return _ipv6p.addr; +		return InetAddress(); +	} + +	/**  	 * @return 256-bit encryption key  	 */  	inline const unsigned char *cryptKey() const | 
