shill: Add IP Address tracking to DeviceInfo
Subscribe to IP Address messages in DeviceInfo, and create a
per-device list of assigned IP Addresses. Provide a method
to flush all globally scoped addresses from a device.
As a result, we can now flush assigned IP addresses when a
Connection is terminated. There is also some incidental cleanup
in RTNLHandler to remove some vestiges of hand-baked RTNL
message encoding.
BUG=chromium-os:19744
TEST=Run new unit tests. Test using ethernet on a netbook to make sure
addresses are added and removed correctly.
Change-Id: I63fd09088e71c43cb1f11a89a8ef15e11074976c
Reviewed-on: http://gerrit.chromium.org/gerrit/7180
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/rtnl_handler_unittest.cc b/rtnl_handler_unittest.cc
index a715965..2eb36da 100644
--- a/rtnl_handler_unittest.cc
+++ b/rtnl_handler_unittest.cc
@@ -106,8 +106,8 @@
}
void RTNLHandlerTest::AddLink() {
- RTNLMessage message(RTNLMessage::kMessageTypeLink,
- RTNLMessage::kMessageModeAdd,
+ RTNLMessage message(RTNLMessage::kTypeLink,
+ RTNLMessage::kModeAdd,
0,
0,
0,