Date: Thu, 26 Jan 2017 05:22:20 +0000 From: "decui_microsoft.com (Dexuan Cui)" <phabric-noreply@FreeBSD.org> To: freebsd-net@freebsd.org Subject: [Differential] D9345: ifnet: move the new ifnet_event EVENTHANDLER_DECLAREs to net/if_var.h Message-ID: <differential-rev-PHID-DREV-ehgwxeotuhsw6eo52uz6-req@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] decui_microsoft.com created this revision. decui_microsoft.com added reviewers: hselasky, sepherosa_gmail.com, cem, np, kmacy, kib, honzhan_microsoft.com, howard0su_gmail.com, jhb, ae, delphij, royger, glebius, gnn, rwatson. decui_microsoft.com added a subscriber: freebsd-net-list. REVISION SUMMARY This is to fix svn commit: r312687 (ifnet: introduce event handlers for ifup/ifdown events) Thank glebius for pointing this out: "The network stuff shall not be added to sys/eventhandler.h" REVISION DETAIL https://reviews.freebsd.org/D9345 AFFECTED FILES sys/net/if.c sys/net/if_var.h sys/sys/eventhandler.h EMAIL PREFERENCES https://reviews.freebsd.org/settings/panel/emailpreferences/ To: decui_microsoft.com, hselasky, sepherosa_gmail.com, cem, np, kmacy, kib, honzhan_microsoft.com, howard0su_gmail.com, jhb, ae, delphij, royger, glebius, gnn, rwatson Cc: freebsd-net-list [-- Attachment #2 --] diff --git a/sys/sys/eventhandler.h b/sys/sys/eventhandler.h --- a/sys/sys/eventhandler.h +++ b/sys/sys/eventhandler.h @@ -284,11 +284,4 @@ EVENTHANDLER_DECLARE(swapon, swapon_fn); EVENTHANDLER_DECLARE(swapoff, swapoff_fn); -/* ifup/ifdown events */ -#define IFNET_EVENT_UP 0 -#define IFNET_EVENT_DOWN 1 -struct ifnet; -typedef void (*ifnet_event_fn)(void *, struct ifnet *ifp, int event); -EVENTHANDLER_DECLARE(ifnet_event, ifnet_event_fn); - #endif /* _SYS_EVENTHANDLER_H_ */ diff --git a/sys/net/if_var.h b/sys/net/if_var.h --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -404,6 +404,11 @@ /* Interface link state change event */ typedef void (*ifnet_link_event_handler_t)(void *, struct ifnet *, int); EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t); +/* Interface up/ifdown event */ +#define IFNET_EVENT_UP 0 +#define IFNET_EVENT_DOWN 1 +typedef void (*ifnet_event_fn)(void *, struct ifnet *ifp, int event); +EVENTHANDLER_DECLARE(ifnet_event, ifnet_event_fn); #endif /* _SYS_EVENTHANDLER_H_ */ /* diff --git a/sys/net/if.c b/sys/net/if.c --- a/sys/net/if.c +++ b/sys/net/if.c @@ -59,7 +59,6 @@ #include <sys/domain.h> #include <sys/jail.h> #include <sys/priv.h> -#include <sys/eventhandler.h> #include <machine/stdarg.h> #include <vm/uma.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?differential-rev-PHID-DREV-ehgwxeotuhsw6eo52uz6-req>
