diff options
Diffstat (limited to 'nexus/NetworkManager.cpp')
| -rw-r--r-- | nexus/NetworkManager.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/nexus/NetworkManager.cpp b/nexus/NetworkManager.cpp index 022d7f8..49b0210 100644 --- a/nexus/NetworkManager.cpp +++ b/nexus/NetworkManager.cpp @@ -21,6 +21,7 @@ #include <cutils/log.h> #include "NetworkManager.h" +#include "InterfaceConfig.h" NetworkManager *NetworkManager::sInstance = NULL; @@ -150,12 +151,23 @@ const PropertyCollection &NetworkManager::getProperties() { return *mProperties; } -int NetworkManager::onInterfaceCreated(Controller *c, char *name) { - LOGD("Interface %s created by controller %s", name, c->getName()); +int NetworkManager::onInterfaceStart(Controller *c, const InterfaceConfig *cfg) { + LOGD("Interface %s started by controller %s", cfg->getName(), c->getName()); + + // Look up the interface + + if (0) { // already started? + errno = EADDRINUSE; + return -1; + } + + if (cfg->getUseDhcp()) { + } else { + } return 0; } -int NetworkManager::onInterfaceDestroyed(Controller *c, char *name) { - LOGD("Interface %s destroyed by controller %s", name, c->getName()); +int NetworkManager::onInterfaceStop(Controller *c, const char *name) { + LOGD("Interface %s stopped by controller %s", name, c->getName()); return 0; } |
