From a69968d931fee36826442a5af7e8286f3287133c Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 14 Oct 2008 14:20:40 +0200 Subject: [PATCH] Add skeleton for RTNL framework callbacks --- plugins/rtnllink.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/plugins/rtnllink.c b/plugins/rtnllink.c index 07f969e..3d81428 100644 --- a/plugins/rtnllink.c +++ b/plugins/rtnllink.c @@ -25,15 +25,35 @@ #include #include +#include #include +static void rtnllink_newlink(unsigned short type, int index, + unsigned flags, unsigned change) +{ + DBG("index %d", index); +} + +static void rtnllink_dellink(unsigned short type, int index, + unsigned flags, unsigned change) +{ + DBG("index %d", index); +} + +static struct connman_rtnl rtnllink_rtnl = { + .name = "rtnllink", + .newlink = rtnllink_newlink, + .dellink = rtnllink_dellink, +}; + static int rtnllink_init(void) { - return 0; + return connman_rtnl_register(&rtnllink_rtnl); } static void rtnllink_exit(void) { + connman_rtnl_unregister(&rtnllink_rtnl); } CONNMAN_PLUGIN_DEFINE("rtnllink", "RTNL link detection plugin", VERSION, -- 2.7.4