File:  [ELWIX - Embedded LightWeight unIX -] / fwsync / patches / ip_fw_private_h.patch
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Mon Jul 11 17:03:15 2022 UTC (22 months ago) by misho
Branches: MAIN
CVS tags: HEAD
update system patches

diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h
index 1440b1a40ee..9944edaba3c 100644
--- a/sys/netpfil/ipfw/ip_fw_private.h
+++ b/sys/netpfil/ipfw/ip_fw_private.h
@@ -251,6 +251,18 @@ VNET_DECLARE(unsigned int, fw_tables_sets);
 
 struct tables_config;
 
+typedef int (*ipfw_hook_t)(const void *arg);
+/* callback hooks for notify on update of internal states and aliases */
+VNET_DECLARE(ipfw_hook_t, hook_state);
+#define V_hook_state		VNET(hook_state)
+VNET_DECLARE(ipfw_hook_t, hook_alias);
+#define V_hook_alias		VNET(hook_alias)
+
+#define ipfw_unregister_state_hook()	V_hook_state = NULL
+#define ipfw_unregister_alias_hook()	V_hook_alias = NULL
+#define ipfw_register_state_hook(_hcb)	V_hook_state = (_hcb)
+#define ipfw_register_alias_hook(_hcb)	V_hook_alias = (_hcb)
+
 #ifdef _KERNEL
 /*
  * Here we have the structure representing an ipfw rule.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>