Lines Matching refs:tpc

194 tpc_free(tsol_tpc_t *tpc)  in tpc_free()  argument
196 DTRACE_PROBE1(tx__tndb__l3__tpcfree, tsol_tpc_t *, tpc); in tpc_free()
197 ASSERT(tpc->tpc_invalid); in tpc_free()
198 mutex_exit(&tpc->tpc_lock); in tpc_free()
199 mutex_destroy(&tpc->tpc_lock); in tpc_free()
200 kmem_free(tpc, sizeof (*tpc)); in tpc_free()
211 tsol_tpc_t *tpc = NULL; in tnrhtp_find() local
215 tpc = (tsol_tpc_t *)hv; in tnrhtp_find()
216 if (tpc->tpc_invalid) in tnrhtp_find()
217 tpc = NULL; in tnrhtp_find()
219 TPC_HOLD(tpc); in tnrhtp_find()
222 return (tpc); in tnrhtp_find()
414 tsol_tpc_t *tpc; in tnrh_load() local
418 if ((tpc = tnrhtp_find(rhent->rh_template, tpc_name_hash)) == NULL) { in tnrh_load()
421 ASSERT(tpc->tpc_tp.host_type == UNLABELED || in tnrh_load()
422 tpc->tpc_tp.host_type == SUN_CIPSO); in tnrh_load()
425 TPC_RELE(tpc); in tnrh_load()
434 new->rhc_tpc = tpc; in tnrh_load()
452 tsol_tpc_t *tpc; in tnrh_get() local
456 tpc = find_tpc(&rhent->rh_address.ta_addr_v4, IPV4_VERSION, in tnrh_get()
461 tpc = find_tpc(&rhent->rh_address.ta_addr_v6, IPV6_VERSION, in tnrh_get()
468 if (tpc == NULL) in tnrh_get()
472 rhent, tsol_tpc_t *, tpc); in tnrh_get()
473 bcopy(tpc->tpc_tp.name, rhent->rh_template, in tnrh_get()
475 TPC_RELE(tpc); in tnrh_get()
569 tsol_tpc_t *tpc; in tnrhtp_create() local
576 if ((tpc = kmem_zalloc(sizeof (*tpc), kmflags)) == NULL) in tnrhtp_create()
590 mutex_init(&tpc->tpc_lock, NULL, MUTEX_DEFAULT, NULL); in tnrhtp_create()
592 bcopy(tpent, &tpc->tpc_tp, sizeof (tpc->tpc_tp)); in tnrhtp_create()
593 (void) mod_hash_insert(tpc_name_hash, (mod_hash_key_t)tpc->tpc_tp.name, in tnrhtp_create()
594 (mod_hash_val_t)tpc); in tnrhtp_create()
595 TPC_HOLD(tpc); in tnrhtp_create()
598 return (tpc); in tnrhtp_create()
604 tsol_tpc_t *tpc; in tnrhtp_delete() local
610 tpc = (tsol_tpc_t *)hv; in tnrhtp_delete()
611 ASSERT(!tpc->tpc_invalid); in tnrhtp_delete()
612 tpc->tpc_invalid = 1; in tnrhtp_delete()
614 (mod_hash_key_t)tpc->tpc_tp.name); in tnrhtp_delete()
615 TPC_RELE(tpc); in tnrhtp_delete()
626 tsol_tpc_t *tpc = (tsol_tpc_t *)val; in tpc_delete() local
628 ASSERT(!tpc->tpc_invalid); in tpc_delete()
629 tpc->tpc_invalid = 1; in tpc_delete()
630 TPC_RELE(tpc); in tpc_delete()
649 tsol_tpc_t *tpc; in tnrhtp() local
693 tpc = tnrhtp_find(rhtpent.name, tpc_name_hash); in tnrhtp()
694 if (tpc == NULL) { in tnrhtp()
700 if (copyout(&tpc->tpc_tp, buf, sizeof (tpc->tpc_tp)) != 0) { in tnrhtp()
706 TPC_RELE(tpc); in tnrhtp()
1045 tsol_tpc_t *tpc; in find_rhc() local
1137 tpc = tnrhtp_find(rh->rhc_tpc->tpc_tp.name, tpc_name_hash); in find_rhc()
1138 if (tpc == NULL) { in find_rhc()
1147 ASSERT(tpc->tpc_tp.host_type == UNLABELED || in find_rhc()
1148 tpc->tpc_tp.host_type == SUN_CIPSO); in find_rhc()
1154 TPC_RELE(tpc); in find_rhc()
1160 new->rhc_tpc = tpc; in find_rhc()
1185 tsol_tpc_t *tpc; in find_tpc() local
1191 tpc = rhc->rhc_tpc; in find_tpc()
1192 TPC_HOLD(tpc); in find_tpc()
1194 return (tpc); in find_tpc()