X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Frtnetlink.c;h=bce95ce508ba02ab6825b172447f563f7d294d75;hb=d98e60075528c3065ad453f7add4b30f22edcde3;hp=29e02f61496d5db19a21b0b3a225495165552281;hpb=e8b52a913a8fc3d2ef0dae82eda5905668ebfae1;p=sliver-openvswitch.git diff --git a/lib/rtnetlink.c b/lib/rtnetlink.c index 29e02f614..bce95ce50 100644 --- a/lib/rtnetlink.c +++ b/lib/rtnetlink.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Nicira Networks. + * Copyright (c) 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,10 +27,10 @@ #include "coverage.h" #include "netlink.h" #include "ofpbuf.h" - -#define THIS_MODULE VLM_rtnetlink #include "vlog.h" +VLOG_DEFINE_THIS_MODULE(rtnetlink); + /* rtnetlink socket. */ static struct nl_sock *notify_sock; @@ -76,7 +76,7 @@ rtnetlink_notifier_register(struct rtnetlink_notifier *notifier, } /* Cancels notification on 'notifier', which must have previously been - * registered with lxnetdev_notifier_register(). */ + * registered with rtnetlink_notifier_register(). */ void rtnetlink_notifier_unregister(struct rtnetlink_notifier *notifier) { @@ -166,8 +166,7 @@ rtnetlink_report_change(const struct nlmsghdr *nlmsg, change.master_ifindex = (attrs[IFLA_MASTER] ? nl_attr_get_u32(attrs[IFLA_MASTER]) : 0); - LIST_FOR_EACH (notifier, struct rtnetlink_notifier, node, - &all_notifiers) { + LIST_FOR_EACH (notifier, node, &all_notifiers) { notifier->cb(&change, notifier->aux); } } @@ -177,8 +176,7 @@ rtnetlink_report_notify_error(void) { struct rtnetlink_notifier *notifier; - LIST_FOR_EACH (notifier, struct rtnetlink_notifier, node, - &all_notifiers) { + LIST_FOR_EACH (notifier, node, &all_notifiers) { notifier->cb(NULL, notifier->aux); } }