summaryrefslogtreecommitdiff
path: root/plugins/ethernet.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-10-14 14:18:13 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-10-14 14:18:13 +0200
commit773ce270c27a7b9b14c93e19b7f261c12e6126ef (patch)
treee5e4dc76c503114b0c5ddb70613681edf9cf9c88 /plugins/ethernet.c
parent6d8e8898bd6b68dc07305b0e2b1d3e007fa37dfd (diff)
downloadconnman-773ce270c27a7b9b14c93e19b7f261c12e6126ef.tar.gz
connman-773ce270c27a7b9b14c93e19b7f261c12e6126ef.tar.bz2
connman-773ce270c27a7b9b14c93e19b7f261c12e6126ef.zip
Use RTNL newlink callback for link changes
Diffstat (limited to 'plugins/ethernet.c')
-rw-r--r--plugins/ethernet.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/ethernet.c b/plugins/ethernet.c
index f171348b..d50f7191 100644
--- a/plugins/ethernet.c
+++ b/plugins/ethernet.c
@@ -33,17 +33,19 @@
#include <connman/plugin.h>
#include <connman/driver.h>
+#include <connman/rtnl.h>
#include <connman/log.h>
struct ethernet_data {
int index;
- short flags;
+ unsigned flags;
};
static GStaticMutex ethernet_mutex = G_STATIC_MUTEX_INIT;
static GSList *ethernet_list = NULL;
-static void ethernet_link_flags(int index, short flags)
+static void ethernet_newlink(unsigned short type, int index,
+ unsigned flags, unsigned change)
{
GSList *list;
@@ -89,7 +91,7 @@ static void ethernet_link_flags(int index, short flags)
static struct connman_rtnl ethernet_rtnl = {
.name = "ethernet",
- .link_flags = ethernet_link_flags,
+ .newlink = ethernet_newlink,
};
static int iface_up(struct ethernet_data *ethernet)
@@ -238,7 +240,7 @@ static int ethernet_init(void)
err = connman_driver_register(&ethernet_driver);
if (err < 0) {
- connman_rtnl_unregister(&ethernet_rtnl):
+ connman_rtnl_unregister(&ethernet_rtnl);
return err;
}