Lines Matching defs:tpc

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