shill: Add DeviceInfo routines for assigning IP address

Accept an IPConfig instance and assign IP address parameters
to device index.  Add code to device superclass to apply any
successful ipconfig (petkov should change this as necessary).

BUG=chromium-os:16846
TEST=Manual -- ran on a cr48 with ethernet attached.  Added throw-away
code to remove the address, and this worked correctly.  Also re-ran
unit tests.

Change-Id: Ib491de2e9f6d4a4317fc305978351e5812514e0f
Reviewed-on: http://gerrit.chromium.org/gerrit/3018
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/ipconfig.h b/ipconfig.h
index 1a10083..6708b12 100644
--- a/ipconfig.h
+++ b/ipconfig.h
@@ -23,9 +23,18 @@
 // class.
 class IPConfig : public base::RefCounted<IPConfig> {
  public:
-  struct Properties {
-    Properties() : subnet_cidr(0), mtu(0) {}
+  enum AddressFamily {
+    kAddressFamilyUnknown,
+    kAddressFamilyIPv4,
+    kAddressFamilyIPv6
+  };
 
+  struct Properties {
+    Properties() : address_family(kAddressFamilyUnknown),
+                   subnet_cidr(0),
+                   mtu(0) {}
+
+    AddressFamily address_family;
     std::string address;
     int subnet_cidr;
     std::string broadcast_address;