Actually report a meaningful network status instead of always OK

This commit is contained in:
Adam Ierymenko 2013-08-08 10:41:17 -04:00
parent 86056fdbd9
commit 5cabb60a6f
3 changed files with 46 additions and 3 deletions

View file

@ -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();