shill: Add IPAddress class
Add class that holds IP Addresses. Routing will need these.
Move address family constants out of IPConfig to this new class.
BUG=chromium-os:17277
TEST=New unittest
Change-Id: I69d9c4d551061de890ed6919462597a15ae51857
Reviewed-on: http://gerrit.chromium.org/gerrit/4180
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/rtnl_handler.cc b/rtnl_handler.cc
index 8e2af7c..089180e 100644
--- a/rtnl_handler.cc
+++ b/rtnl_handler.cc
@@ -19,6 +19,7 @@
#include <base/logging.h>
#include "shill/io_handler.h"
+#include "shill/ip_address.h"
#include "shill/ipconfig.h"
#include "shill/rtnl_handler.h"
#include "shill/rtnl_listener.h"
@@ -284,10 +285,10 @@
in6_addr in6;
} addr;
- if (properties.address_family == IPConfig::kAddressFamilyIPv4) {
+ if (properties.address_family == IPAddress::kAddressFamilyIPv4) {
address_family = AF_INET;
address_size = sizeof(struct in_addr);
- } else if (properties.address_family == IPConfig::kAddressFamilyIPv6) {
+ } else if (properties.address_family == IPAddress::kAddressFamilyIPv6) {
address_family = AF_INET6;
address_size = sizeof(struct in6_addr);
} else