diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-06 16:52:52 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-04-06 16:52:52 -0700 |
| commit | 8001b2c0cb6d35bfbc7b7be78d1a8b6d0fafbd53 (patch) | |
| tree | 2491d429727fb9d732d86bfae778068a889d363e /node/Network.hpp | |
| parent | a86300c58fe29e9a8626f935f0b3ed25e844b0aa (diff) | |
| download | infinitytier-8001b2c0cb6d35bfbc7b7be78d1a8b6d0fafbd53.tar.gz infinitytier-8001b2c0cb6d35bfbc7b7be78d1a8b6d0fafbd53.zip | |
Network now calls port config function as per new API.
Diffstat (limited to 'node/Network.hpp')
| -rw-r--r-- | node/Network.hpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/node/Network.hpp b/node/Network.hpp index 5693ff49..b51164a3 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -192,7 +192,20 @@ public: /** * @return Status of this network */ - ZT1_VirtualNetworkStatus status() const; + inline ZT1_VirtualNetworkStatus status() const + { + Mutex::Lock _l(_lock); + return _status(); + } + + /** + * @param ec Buffer to fill with externally-visible network configuration + */ + inline void externalConfig(ZT1_VirtualNetworkConfig *ec) const + { + Mutex::Lock _l(_lock); + _externalConfig(ec); + } /** * Update and check multicast rate balance for a multicast group @@ -321,6 +334,9 @@ public: void destroy(); private: + ZT1_VirtualNetworkStatus _status() const; + void _externalConfig(ZT1_VirtualNetworkConfig *ec) const; // assumes _lock is locked + const RuntimeEnvironment *RR; uint64_t _id; MAC _mac; // local MAC address @@ -340,12 +356,13 @@ private: volatile bool _destroyed; - volatile enum { + enum { NETCONF_FAILURE_NONE, NETCONF_FAILURE_ACCESS_DENIED, NETCONF_FAILURE_NOT_FOUND, NETCONF_FAILURE_INIT_FAILED } _netconfFailure; + int _portError; // return value from port config callback Mutex _lock; |
