summaryrefslogtreecommitdiffstats
path: root/nexus/NetworkManager.cpp
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2009-05-22 13:58:06 -0700
committerSan Mehat <san@google.com>2009-05-29 15:26:00 -0700
commit192331d9060763b92f7989124bedbd136689d735 (patch)
tree308fb209da08727edf3f25c52fb0c599d756272e /nexus/NetworkManager.cpp
parent03f0d27f6c49530a91402ed42f8ca4b2fda04b9f (diff)
downloadcore-192331d9060763b92f7989124bedbd136689d735.tar.gz
core-192331d9060763b92f7989124bedbd136689d735.tar.bz2
core-192331d9060763b92f7989124bedbd136689d735.zip
nexus: Add ListCmd to CommandListener
Signed-off-by: San Mehat <san@google.com> nexus: Add InterfaceConfig and flesh out some more flow Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'nexus/NetworkManager.cpp')
-rw-r--r--nexus/NetworkManager.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/nexus/NetworkManager.cpp b/nexus/NetworkManager.cpp
index 022d7f88a..49b0210a8 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;
}