diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-08 10:41:17 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-08 10:41:17 -0400 |
| commit | 5cabb60a6f82b8a00b157fde3655356835285d82 (patch) | |
| tree | ac19c54637a8dbeef7b62cecc43f141d2c3f37ba /node/Network.hpp | |
| parent | 86056fdbd923fbf55f85b3db704bba021ea90c4f (diff) | |
| download | infinitytier-5cabb60a6f82b8a00b157fde3655356835285d82.tar.gz infinitytier-5cabb60a6f82b8a00b157fde3655356835285d82.zip | |
Actually report a meaningful network status instead of always OK
Diffstat (limited to 'node/Network.hpp')
| -rw-r--r-- | node/Network.hpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/node/Network.hpp b/node/Network.hpp index 6d35b961..b42e09c1 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -265,6 +265,23 @@ public: } }; + /** + * Status for networks + */ + enum Status + { + NETWORK_WAITING_FOR_FIRST_AUTOCONF, + NETWORK_OK, + NETWORK_ACCESS_DENIED + }; + + /** + * @param s Status + * @return String description + */ + static const char *statusString(const Status s) + throw(); + private: // Only NodeConfig can create, only SharedPtr can delete @@ -404,6 +421,11 @@ public: return _lastConfigUpdate; } + /** + * @return Status of this network + */ + Status status() const; + private: static void _CBhandleTapData(void *arg,const MAC &from,const MAC &to,unsigned int etherType,const Buffer<4096> &data); void _restoreState(); |
