Lines Matching full:ch

93 nat64clat_export_config(struct ip_fw_chain *ch, struct nat64clat_cfg *cfg,  in nat64clat_export_config()  argument
106 struct ip_fw_chain *ch; member
118 nat64clat_export_config(da->ch, (struct nat64clat_cfg *)no, uc); in export_config_cb()
141 nat64clat_create(struct ip_fw_chain *ch, ip_fw3_opheader *op3, in nat64clat_create() argument
163 ni = CHAIN_TO_SRV(ch); in nat64clat_create()
165 IPFW_UH_RLOCK(ch); in nat64clat_create()
167 IPFW_UH_RUNLOCK(ch); in nat64clat_create()
170 IPFW_UH_RUNLOCK(ch); in nat64clat_create()
182 IPFW_UH_WLOCK(ch); in nat64clat_create()
185 IPFW_UH_WUNLOCK(ch); in nat64clat_create()
191 IPFW_UH_WUNLOCK(ch); in nat64clat_create()
195 ipfw_objhash_add(CHAIN_TO_SRV(ch), &cfg->no); in nat64clat_create()
197 SRV_OBJECT(ch, cfg->no.kidx) = cfg; in nat64clat_create()
198 IPFW_UH_WUNLOCK(ch); in nat64clat_create()
212 nat64clat_config(struct ip_fw_chain *ch, ip_fw3_opheader *op, in nat64clat_config() argument
232 ni = CHAIN_TO_SRV(ch); in nat64clat_config()
234 IPFW_UH_RLOCK(ch); in nat64clat_config()
237 IPFW_UH_RUNLOCK(ch); in nat64clat_config()
240 nat64clat_export_config(ch, cfg, uc); in nat64clat_config()
241 IPFW_UH_RUNLOCK(ch); in nat64clat_config()
245 IPFW_UH_WLOCK(ch); in nat64clat_config()
248 IPFW_UH_WUNLOCK(ch); in nat64clat_config()
260 IPFW_UH_WUNLOCK(ch); in nat64clat_config()
269 IPFW_UH_WUNLOCK(ch); in nat64clat_config()
276 IPFW_WLOCK(ch); in nat64clat_config()
285 IPFW_WUNLOCK(ch); in nat64clat_config()
291 IPFW_UH_WUNLOCK(ch); in nat64clat_config()
296 nat64clat_detach_config(struct ip_fw_chain *ch, struct nat64clat_cfg *cfg) in nat64clat_detach_config() argument
299 IPFW_UH_WLOCK_ASSERT(ch); in nat64clat_detach_config()
301 ipfw_objhash_del(CHAIN_TO_SRV(ch), &cfg->no); in nat64clat_detach_config()
302 ipfw_objhash_free_idx(CHAIN_TO_SRV(ch), cfg->no.kidx); in nat64clat_detach_config()
313 nat64clat_destroy(struct ip_fw_chain *ch, ip_fw3_opheader *op3, in nat64clat_destroy() argument
326 IPFW_UH_WLOCK(ch); in nat64clat_destroy()
327 cfg = nat64clat_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set); in nat64clat_destroy()
329 IPFW_UH_WUNLOCK(ch); in nat64clat_destroy()
333 IPFW_UH_WUNLOCK(ch); in nat64clat_destroy()
337 ipfw_reset_eaction_instance(ch, V_nat64clat_eid, cfg->no.kidx); in nat64clat_destroy()
338 SRV_OBJECT(ch, cfg->no.kidx) = NULL; in nat64clat_destroy()
339 nat64clat_detach_config(ch, cfg); in nat64clat_destroy()
340 IPFW_UH_WUNLOCK(ch); in nat64clat_destroy()
355 nat64clat_list(struct ip_fw_chain *ch, ip_fw3_opheader *op3, in nat64clat_list() argument
367 IPFW_UH_RLOCK(ch); in nat64clat_list()
368 olh->count = ipfw_objhash_count_type(CHAIN_TO_SRV(ch), in nat64clat_list()
374 IPFW_UH_RUNLOCK(ch); in nat64clat_list()
378 da.ch = ch; in nat64clat_list()
380 ipfw_objhash_foreach_type(CHAIN_TO_SRV(ch), export_config_cb, in nat64clat_list()
382 IPFW_UH_RUNLOCK(ch); in nat64clat_list()
390 export_stats(struct ip_fw_chain *ch, struct nat64clat_cfg *cfg, in export_stats() argument
415 nat64clat_stats(struct ip_fw_chain *ch, ip_fw3_opheader *op, in nat64clat_stats() argument
434 IPFW_UH_RLOCK(ch); in nat64clat_stats()
435 cfg = nat64clat_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set); in nat64clat_stats()
437 IPFW_UH_RUNLOCK(ch); in nat64clat_stats()
440 export_stats(ch, cfg, &stats); in nat64clat_stats()
441 IPFW_UH_RUNLOCK(ch); in nat64clat_stats()
462 nat64clat_reset_stats(struct ip_fw_chain *ch, ip_fw3_opheader *op, in nat64clat_reset_stats() argument
475 IPFW_UH_WLOCK(ch); in nat64clat_reset_stats()
476 cfg = nat64clat_find(CHAIN_TO_SRV(ch), oh->ntlv.name, oh->ntlv.set); in nat64clat_reset_stats()
478 IPFW_UH_WUNLOCK(ch); in nat64clat_reset_stats()
482 IPFW_UH_WUNLOCK(ch); in nat64clat_reset_stats()
518 nat64clat_findbyname(struct ip_fw_chain *ch, struct tid_info *ti, in nat64clat_findbyname() argument
523 err = ipfw_objhash_find_type(CHAIN_TO_SRV(ch), ti, in nat64clat_findbyname()
529 nat64clat_findbykidx(struct ip_fw_chain *ch, uint16_t idx) in nat64clat_findbykidx() argument
534 IPFW_UH_WLOCK_ASSERT(ch); in nat64clat_findbykidx()
535 ni = CHAIN_TO_SRV(ch); in nat64clat_findbykidx()
543 nat64clat_manage_sets(struct ip_fw_chain *ch, uint16_t set, uint8_t new_set, in nat64clat_manage_sets() argument
547 return (ipfw_obj_manage_sets(CHAIN_TO_SRV(ch), IPFW_TLV_NAT64CLAT_NAME, in nat64clat_manage_sets()
568 struct ip_fw_chain *ch; in destroy_config_cb() local
570 ch = (struct ip_fw_chain *)arg; in destroy_config_cb()
571 cfg = (struct nat64clat_cfg *)SRV_OBJECT(ch, no->kidx); in destroy_config_cb()
572 SRV_OBJECT(ch, no->kidx) = NULL; in destroy_config_cb()
573 nat64clat_detach_config(ch, cfg); in destroy_config_cb()
579 nat64clat_init(struct ip_fw_chain *ch, int first) in nat64clat_init() argument
582 V_nat64clat_eid = ipfw_add_eaction(ch, ipfw_nat64clat, "nat64clat"); in nat64clat_init()
591 nat64clat_uninit(struct ip_fw_chain *ch, int last) in nat64clat_uninit() argument
596 ipfw_del_eaction(ch, V_nat64clat_eid); in nat64clat_uninit()
604 IPFW_UH_WLOCK(ch); in nat64clat_uninit()
605 ipfw_objhash_foreach_type(CHAIN_TO_SRV(ch), destroy_config_cb, ch, in nat64clat_uninit()
608 IPFW_UH_WUNLOCK(ch); in nat64clat_uninit()