finished up a nice netconsole reader that only listens on 1 interface
diff --git a/aos/common/Configuration.cpp b/aos/common/Configuration.cpp
index 90de05d..ddd7300 100644
--- a/aos/common/Configuration.cpp
+++ b/aos/common/Configuration.cpp
@@ -142,6 +142,10 @@
return RawIPAddress(179);
case NetworkDevice::kCRIO:
return RawIPAddress(2);
+ case NetworkDevice::kSelf:
+ char *ret = static_cast<char *>(malloc(kMaxAddrLength));
+ if (!GetOwnIPAddress(ret, kMaxAddrLength)) return NULL;
+ return ret;
}
LOG(FATAL, "Unknown network device.");
return NULL;
diff --git a/aos/common/Configuration.h b/aos/common/Configuration.h
index 2f7e777..e1b7ef5 100644
--- a/aos/common/Configuration.h
+++ b/aos/common/Configuration.h
@@ -31,6 +31,8 @@
// The computer that the cRIO talks to.
kAtom,
kCRIO,
+ // Whatever device this is being run on.
+ kSelf,
};
// Returns the IP address to get to the specified machine.
// The return value should be passed to free(3) if it is no longer needed.