*
* Connection Manager
*
- * Copyright (C) 2007-2008 Intel Corporation. All rights reserved.
+ * Copyright (C) 2007-2009 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
#include <stdio.h>
#include <unistd.h>
+#define CONNMAN_API_SUBJECT_TO_CHANGE
#include <connman/plugin.h>
#include <connman/driver.h>
+#include <connman/inet.h>
#include <connman/dbus.h>
#include <connman/log.h>
-#include "inet.h"
#include "task.h"
-#define UDHCPC_INTF "org.busybox.udhcpc"
-#define UDHCPC_PATH "/org/busybox/udhcpc"
+#define UDHCPC_INTF "net.busybox.udhcpc"
+#define UDHCPC_PATH "/net/busybox/udhcpc"
static int udhcp_probe(struct connman_element *element)
{
if (access(UDHCPC, X_OK) < 0)
return -errno;
- ifname = inet_index2name(element->index);
+ ifname = connman_inet_ifname(element->index);
if (ifname == NULL)
return -ENOMEM;
DBG("%s ==> address %s gateway %s", interface, address, gateway);
- index = inet_name2index(interface);
+ index = connman_inet_ifindex(interface);
if (index < 0)
return;
dbus_connection_unref(connection);
}
-CONNMAN_PLUGIN_DEFINE(dhclient, "uDHCP client plugin", VERSION,
- udhcp_init, udhcp_exit)
+CONNMAN_PLUGIN_DEFINE(udhcp, "uDHCP client plugin", VERSION,
+ CONNMAN_PLUGIN_PRIORITY_DEFAULT, udhcp_init, udhcp_exit)