#include <net/if.h>
#include "netlink.h"
+#include "netlink-notifier.h"
#include "ofpbuf.h"
-#include "rtnetlink.h"
static struct rtnetlink *rtn = NULL;
static struct rtnetlink_link_change rtn_change;
return parsed;
}
+static bool
+rtnetlink_link_parse_cb(struct ofpbuf *buf, void *change)
+{
+ return rtnetlink_link_parse(buf, change);
+}
+
/* Registers 'cb' to be called with auxiliary data 'aux' with network device
* change notifications. The notifier is stored in 'notifier', which the
* caller must not modify or free.
rtnetlink_link_notifier_register(struct rtnetlink_notifier *notifier,
rtnetlink_link_notify_func *cb, void *aux)
{
- rtnetlink_parse_func *pf = (rtnetlink_parse_func *) rtnetlink_link_parse;
rtnetlink_notify_func *nf = (rtnetlink_notify_func *) cb;
if (!rtn) {
- rtn = rtnetlink_create(RTNLGRP_LINK, pf, &rtn_change);
+ rtn = rtnetlink_create(RTNLGRP_LINK, rtnetlink_link_parse_cb,
+ &rtn_change);
}
return rtnetlink_notifier_register(rtn, notifier, nf, aux);