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
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>

_______________________________________________
freebsd-net@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to