refactored the IP address handling code
It is now split up much more cleanly, has less stuff running on the
cRIO, and doesn't do as much of the stuff with string manipulation.
Before, it was kind of ridicilous how many times the code converted IP
addresses back and forth between 32-bit ints and strings to do various
manipulations and pass them around. Also, there was various junk that
the cRIO code did that it did not need to be doing.
diff --git a/aos/atom_code/configuration.h b/aos/atom_code/configuration.h
new file mode 100644
index 0000000..a3917cc
--- /dev/null
+++ b/aos/atom_code/configuration.h
@@ -0,0 +1,31 @@
+#ifndef AOS_ATOM_CODE_CONFIGURATION_H_
+#define AOS_ATOM_CODE_CONFIGURATION_H_
+
+#include <stdint.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+namespace aos {
+
+// Holds global configuration data. All of the functions are safe to call
+// from wherever.
+namespace configuration {
+
+// Returns "our" IP address.
+const in_addr &GetOwnIPAddress();
+
+// Returns the "root directory" for this run. Under linux, this is the
+// directory where the executable is located (from /proc/self/exe)
+// The return value will always be to a static string, so no freeing is
+// necessary.
+const char *GetRootDirectory();
+// Returns the directory where logs get written. Relative to GetRootDirectory().
+// The return value will always be to a static string, so no freeing is
+// necessary.
+const char *GetLoggingDirectory();
+
+} // namespace configuration
+} // namespace aos
+
+#endif // AOS_ATOM_CODE_CONFIGURATION_H_