Annotation of fwsync/patches/ip_fw_private_h.patch, revision 1.6
1.1 misho 1: diff --git a/sys/netpfil/ipfw/ip_fw_private.h b/sys/netpfil/ipfw/ip_fw_private.h
1.6 ! misho 2: index 1440b1a40ee..7daae3e3ced 100644
1.1 misho 3: --- a/sys/netpfil/ipfw/ip_fw_private.h
4: +++ b/sys/netpfil/ipfw/ip_fw_private.h
1.6 ! misho 5: @@ -251,6 +251,40 @@ VNET_DECLARE(unsigned int, fw_tables_sets);
1.1 misho 6:
7: struct tables_config;
8:
1.4 misho 9: +#ifndef V_hook_state
1.5 misho 10: +typedef int (*ipfw_hook_t)(const void *arg, const void *extdata);
1.1 misho 11: +/* callback hooks for notify on update of internal states and aliases */
12: +VNET_DECLARE(ipfw_hook_t, hook_state);
13: +#define V_hook_state VNET(hook_state)
14: +VNET_DECLARE(ipfw_hook_t, hook_alias);
15: +#define V_hook_alias VNET(hook_alias)
1.6 ! misho 16: +VNET_DECLARE(ipfw_hook_t, sync_state);
! 17: +#define V_sync_state VNET(sync_state)
! 18: +VNET_DECLARE(ipfw_hook_t, sync_alias);
! 19: +#define V_sync_alias VNET(sync_alias)
1.4 misho 20: +#endif
1.1 misho 21: +
1.5 misho 22: +struct ipfw_dyn_hook_extdata {
23: + unsigned int ruleid;
24: + unsigned short rulenum;
25: + unsigned short fibnum;
1.6 ! misho 26: + unsigned short kidx;
! 27: + unsigned char cmdtype;
1.5 misho 28: +};
29: +
1.6 ! misho 30: +int ipfw_dyn_install_sync_state(const struct ipfw_flow_id *pkt, void *rule,
! 31: + uint32_t ruleid, uint16_t rulenum, uint16_t kidx, uint8_t cmdtype);
1.5 misho 32: +
1.1 misho 33: +#define ipfw_unregister_state_hook() V_hook_state = NULL
34: +#define ipfw_unregister_alias_hook() V_hook_alias = NULL
35: +#define ipfw_register_state_hook(_hcb) V_hook_state = (_hcb)
36: +#define ipfw_register_alias_hook(_hcb) V_hook_alias = (_hcb)
37: +
1.6 ! misho 38: +#define ipfw_unregister_state_sync() V_sync_state = NULL
! 39: +#define ipfw_unregister_alias_sync() V_sync_alias = NULL
! 40: +#define ipfw_register_state_sync(_hcb) V_sync_state = (_hcb)
! 41: +#define ipfw_register_alias_sync(_hcb) V_sync_alias = (_hcb)
! 42: +
1.1 misho 43: #ifdef _KERNEL
44: /*
45: * Here we have the structure representing an ipfw rule.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>