X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Frtnetlink.c;h=54340e5c034cc47cd841b9c45491d2aac6eb9613;hb=e0ce13c4dc34f44d81e0001882a0be88321b5c87;hp=f5a6df8a1e5b6f05ba0148210d90395af21deca5;hpb=5136ce492c414f377f7be9ae32b259abb9f76580;p=openvswitch diff --git a/lib/rtnetlink.c b/lib/rtnetlink.c index f5a6df8a..54340e5c 100644 --- a/lib/rtnetlink.c +++ b/lib/rtnetlink.c @@ -26,10 +26,13 @@ #include "coverage.h" #include "netlink.h" +#include "netlink-socket.h" #include "ofpbuf.h" #include "vlog.h" -VLOG_DEFINE_THIS_MODULE(rtnetlink) +VLOG_DEFINE_THIS_MODULE(rtnetlink); + +COVERAGE_DEFINE(rtnetlink_changed); /* rtnetlink socket. */ static struct nl_sock *notify_sock; @@ -166,8 +169,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 +179,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); } }