[shill] Make IPConfig objects have sane DBus Paths

following the following schema: /ipconfig/<devicename>_<per-run serial number>_<config type>

BUG=chromium-os:17744
TEST=unit, run on device and use /usr/local/lib/flimflam/list-devices

Change-Id: Ia88814d46facce525d866c8309556131d8fb6a0d
Reviewed-on: http://gerrit.chromium.org/gerrit/4535
Tested-by: Chris Masone <cmasone@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
diff --git a/ipconfig_dbus_adaptor.cc b/ipconfig_dbus_adaptor.cc
index 3337882..26858e6 100644
--- a/ipconfig_dbus_adaptor.cc
+++ b/ipconfig_dbus_adaptor.cc
@@ -9,11 +9,13 @@
 #include <vector>
 
 #include <base/logging.h>
+#include <base/stringprintf.h>
 #include <dbus-c++/dbus.h>
 
 #include "shill/error.h"
 #include "shill/ipconfig.h"
 
+using base::StringPrintf;
 using std::map;
 using std::string;
 using std::vector;
@@ -23,11 +25,15 @@
 // static
 const char IPConfigDBusAdaptor::kInterfaceName[] = SHILL_INTERFACE;
 // static
-const char IPConfigDBusAdaptor::kPath[] = "/device/";
+const char IPConfigDBusAdaptor::kPath[] = "/ipconfig/";
 
 IPConfigDBusAdaptor::IPConfigDBusAdaptor(DBus::Connection* conn,
                                          IPConfig *config)
-    : DBusAdaptor(conn, kPath + config->device_name() + "_ipconfig"),
+    : DBusAdaptor(conn, StringPrintf("%s%s_%u_%s",
+                                     kPath,
+                                     config->device_name().c_str(),
+                                     config->serial(),
+                                     config->type().c_str())),
       ipconfig_(config) {
 }