version 1.1, 2022/06/22 13:01:55
|
version 1.5, 2022/08/03 17:10:59
|
Line 1
|
Line 1
|
diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h |
diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h |
index 56624209e4c..2074d3f8d35 100644 | index 1440b1a40ee..61bf5115fdd 100644 |
--- a/sys/netpfil/ipfw/ip_fw_private.h |
--- a/sys/netpfil/ipfw/ip_fw_private.h |
+++ b/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); | @@ -251,6 +251,28 @@ VNET_DECLARE(unsigned int, fw_tables_sets); |
|
|
struct tables_config; |
struct tables_config; |
|
|
+typedef int (*ipfw_hook_t)(const void *arg); | +#ifndef V_hook_state |
| +typedef int (*ipfw_hook_t)(const void *arg, const void *extdata); |
+/* callback hooks for notify on update of internal states and aliases */ |
+/* callback hooks for notify on update of internal states and aliases */ |
+VNET_DECLARE(ipfw_hook_t, hook_state); |
+VNET_DECLARE(ipfw_hook_t, hook_state); |
+#define V_hook_state VNET(hook_state) |
+#define V_hook_state VNET(hook_state) |
+VNET_DECLARE(ipfw_hook_t, hook_alias); |
+VNET_DECLARE(ipfw_hook_t, hook_alias); |
+#define V_hook_alias VNET(hook_alias) |
+#define V_hook_alias VNET(hook_alias) |
|
+#endif |
|
+ |
|
+struct ipfw_dyn_hook_extdata { |
|
+ unsigned int ruleid; |
|
+ unsigned short rulenum; |
|
+ unsigned short fibnum; |
|
+}; |
|
+ |
|
+int ipfw_dyn_install_sync_state(const struct ipfw_flow_id *pkt, void *rule, uint32_t ruleid, uint16_t rulenum); |
+ |
+ |
+#define ipfw_unregister_state_hook() V_hook_state = NULL |
+#define ipfw_unregister_state_hook() V_hook_state = NULL |
+#define ipfw_unregister_alias_hook() V_hook_alias = NULL |
+#define ipfw_unregister_alias_hook() V_hook_alias = NULL |