Lines Matching refs:tpc

192 tpc_free(tsol_tpc_t *tpc)  in tpc_free()  argument
194 DTRACE_PROBE1(tx__tndb__l3__tpcfree, tsol_tpc_t *, tpc); in tpc_free()
195 ASSERT(tpc->tpc_invalid); in tpc_free()
196 mutex_exit(&tpc->tpc_lock); in tpc_free()
197 mutex_destroy(&tpc->tpc_lock); in tpc_free()
198 kmem_free(tpc, sizeof (*tpc)); in tpc_free()
209 tsol_tpc_t *tpc = NULL; in tnrhtp_find() local
213 tpc = (tsol_tpc_t *)hv; in tnrhtp_find()
214 if (tpc->tpc_invalid) in tnrhtp_find()
215 tpc = NULL; in tnrhtp_find()
217 TPC_HOLD(tpc); in tnrhtp_find()
220 return (tpc); in tnrhtp_find()
412 tsol_tpc_t *tpc; in tnrh_load() local
416 if ((tpc = tnrhtp_find(rhent->rh_template, tpc_name_hash)) == NULL) { in tnrh_load()
419 ASSERT(tpc->tpc_tp.host_type == UNLABELED || in tnrh_load()
420 tpc->tpc_tp.host_type == SUN_CIPSO); in tnrh_load()
423 TPC_RELE(tpc); in tnrh_load()
432 new->rhc_tpc = tpc; in tnrh_load()
450 tsol_tpc_t *tpc; in tnrh_get() local
454 tpc = find_tpc(&rhent->rh_address.ta_addr_v4, IPV4_VERSION, in tnrh_get()
459 tpc = find_tpc(&rhent->rh_address.ta_addr_v6, IPV6_VERSION, in tnrh_get()
466 if (tpc == NULL) in tnrh_get()
470 rhent, tsol_tpc_t *, tpc); in tnrh_get()
471 bcopy(tpc->tpc_tp.name, rhent->rh_template, in tnrh_get()
473 TPC_RELE(tpc); in tnrh_get()
567 tsol_tpc_t *tpc; in tnrhtp_create() local
574 if ((tpc = kmem_zalloc(sizeof (*tpc), kmflags)) == NULL) in tnrhtp_create()
588 mutex_init(&tpc->tpc_lock, NULL, MUTEX_DEFAULT, NULL); in tnrhtp_create()
590 bcopy(tpent, &tpc->tpc_tp, sizeof (tpc->tpc_tp)); in tnrhtp_create()
591 (void) mod_hash_insert(tpc_name_hash, (mod_hash_key_t)tpc->tpc_tp.name, in tnrhtp_create()
592 (mod_hash_val_t)tpc); in tnrhtp_create()
593 TPC_HOLD(tpc); in tnrhtp_create()
596 return (tpc); in tnrhtp_create()
602 tsol_tpc_t *tpc; in tnrhtp_delete() local
608 tpc = (tsol_tpc_t *)hv; in tnrhtp_delete()
609 ASSERT(!tpc->tpc_invalid); in tnrhtp_delete()
610 tpc->tpc_invalid = 1; in tnrhtp_delete()
612 (mod_hash_key_t)tpc->tpc_tp.name); in tnrhtp_delete()
613 TPC_RELE(tpc); in tnrhtp_delete()
624 tsol_tpc_t *tpc = (tsol_tpc_t *)val; in tpc_delete() local
626 ASSERT(!tpc->tpc_invalid); in tpc_delete()
627 tpc->tpc_invalid = 1; in tpc_delete()
628 TPC_RELE(tpc); in tpc_delete()
647 tsol_tpc_t *tpc; in tnrhtp() local
691 tpc = tnrhtp_find(rhtpent.name, tpc_name_hash); in tnrhtp()
692 if (tpc == NULL) { in tnrhtp()
698 if (copyout(&tpc->tpc_tp, buf, sizeof (tpc->tpc_tp)) != 0) { in tnrhtp()
704 TPC_RELE(tpc); in tnrhtp()
1043 tsol_tpc_t *tpc; in find_rhc() local
1135 tpc = tnrhtp_find(rh->rhc_tpc->tpc_tp.name, tpc_name_hash); in find_rhc()
1136 if (tpc == NULL) { in find_rhc()
1145 ASSERT(tpc->tpc_tp.host_type == UNLABELED || in find_rhc()
1146 tpc->tpc_tp.host_type == SUN_CIPSO); in find_rhc()
1152 TPC_RELE(tpc); in find_rhc()
1158 new->rhc_tpc = tpc; in find_rhc()
1183 tsol_tpc_t *tpc; in find_tpc() local
1189 tpc = rhc->rhc_tpc; in find_tpc()
1190 TPC_HOLD(tpc); in find_tpc()
1192 return (tpc); in find_tpc()