|
|
| version 1.2, 2022/06/29 19:44:58 | version 1.5, 2022/08/04 00:24:39 |
|---|---|
| Line 25 struct cfg_sync fws_cfg; | Line 25 struct cfg_sync fws_cfg; |
| struct task fws_sndpkt_task; | struct task fws_sndpkt_task; |
| struct taskqueue *fws_tq; | struct taskqueue *fws_tq; |
| struct callout fws_co; | |
| struct mtx fws_mtx_c, fws_mtx_e; | struct mtx fws_mtx_c, fws_mtx_e; |
| fwsync_sndpkt_t fwsync_sndpkt; | fwsync_sndpkt_t fwsync_sndpkt; |
| Line 60 fws_fini(void *arg) | Line 61 fws_fini(void *arg) |
| } | } |
| mtx_unlock(&fws_mtx_c); | mtx_unlock(&fws_mtx_c); |
| callout_drain(&fws_co); | |
| mtx_destroy(&fws_mtx_c); | mtx_destroy(&fws_mtx_c); |
| mtx_destroy(&fws_mtx_e); | mtx_destroy(&fws_mtx_e); |
| Line 100 fws_init(void *arg) | Line 103 fws_init(void *arg) |
| mtx_init(&fws_mtx_c, "fwsync mtx collector", NULL, MTX_DEF); | mtx_init(&fws_mtx_c, "fwsync mtx collector", NULL, MTX_DEF); |
| /* taskqueue */ | /* taskqueue */ |
| TASK_INIT(&fws_sndpkt_task, 0, fwsync_sndpkt_state, &fwsync_sndpkt); | TASK_INIT(&fws_sndpkt_task, 0, fwsync_sndpkt_handler, &fwsync_sndpkt); |
| fws_tq = taskqueue_create("fwsync_tq", M_NOWAIT, taskqueue_thread_enqueue, &fws_tq); | fws_tq = taskqueue_create("fwsync_tq", M_NOWAIT, taskqueue_thread_enqueue, &fws_tq); |
| if (!fws_tq) { | if (!fws_tq) { |
| Line 111 fws_init(void *arg) | Line 114 fws_init(void *arg) |
| } else | } else |
| taskqueue_start_threads(&fws_tq, 1, PI_NET, "fwsync tq"); | taskqueue_start_threads(&fws_tq, 1, PI_NET, "fwsync tq"); |
| /* callout */ | |
| callout_init_mtx(&fws_co, &fws_mtx_e, 0); | |
| /* sysctl context */ | /* sysctl context */ |
| sysctl_ctx_init(&fwsync_sysctl_ctx); | sysctl_ctx_init(&fwsync_sysctl_ctx); |
| Line 155 static moduledata_t fwsync_mod = { | Line 162 static moduledata_t fwsync_mod = { |
| }; | }; |
| DECLARE_MODULE(ipfw_sync, fwsync_mod, SI_SUB_PROTO_FIREWALL, SI_ORDER_ANY); | DECLARE_MODULE(ipfw_sync, fwsync_mod, SI_SUB_PROTO_FIREWALL, SI_ORDER_ANY); |
| MODULE_DEPEND(ipfw_sync, libalias, 1, 1, 1); | |
| MODULE_DEPEND(ipfw_sync, ipfw, 3, 3, 3); | MODULE_DEPEND(ipfw_sync, ipfw, 3, 3, 3); |
| MODULE_VERSION(ipfw_sync, DRV_VERSION); | MODULE_VERSION(ipfw_sync, DRV_VERSION); |