Lines Matching refs:rhent

224 tnrh_delete(const tsol_rhent_t *rhent)  in tnrh_delete()  argument
232 if (rhent->rh_address.ta_family == AF_INET) { in tnrh_delete()
233 if (rhent->rh_prefix < 0 || rhent->rh_prefix > IP_ABITS) in tnrh_delete()
235 if (tnrhc_table[rhent->rh_prefix] == NULL) in tnrh_delete()
237 tmpmask = tsol_plen_to_mask(rhent->rh_prefix); in tnrh_delete()
238 tnrhc_hash = &tnrhc_table[rhent->rh_prefix][ in tnrh_delete()
239 TSOL_ADDR_HASH(rhent->rh_address.ta_addr_v4.s_addr & in tnrh_delete()
241 } else if (rhent->rh_address.ta_family == AF_INET6) { in tnrh_delete()
242 if (rhent->rh_prefix < 0 || rhent->rh_prefix > IPV6_ABITS) in tnrh_delete()
244 if (tnrhc_table_v6[rhent->rh_prefix] == NULL) in tnrh_delete()
246 tsol_plen_to_mask_v6(rhent->rh_prefix, &tmpmask_v6); in tnrh_delete()
247 tnrhc_hash = &tnrhc_table_v6[rhent->rh_prefix][ in tnrh_delete()
248 TSOL_ADDR_MASK_HASH_V6(rhent->rh_address.ta_addr_v6, in tnrh_delete()
258 if (TNADDR_EQ(&rhent->rh_address, &current->rhc_host)) in tnrh_delete()
409 tnrh_load(const tsol_rhent_t *rhent) in tnrh_load() argument
416 if ((tpc = tnrhtp_find(rhent->rh_template, tpc_name_hash)) == NULL) { in tnrh_load()
429 new->rhc_host = rhent->rh_address; in tnrh_load()
441 status = tnrh_hash_add(new, rhent->rh_prefix); in tnrh_load()
448 tnrh_get(tsol_rhent_t *rhent) in tnrh_get() argument
452 switch (rhent->rh_address.ta_family) { in tnrh_get()
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()
470 rhent, tsol_tpc_t *, tpc); in tnrh_get()
471 bcopy(tpc->tpc_tp.name, rhent->rh_template, in tnrh_get()
472 sizeof (rhent->rh_template)); in tnrh_get()
494 tsol_rhent_t rhent; in tnrh() local
505 copyin(buf, &rhent, sizeof (rhent)) != 0) { in tnrh()
513 if (!template_name_ok(rhent.rh_template)) { in tnrh()
516 retv = tnrh_load(&rhent); in tnrh()
522 retv = tnrh_delete(&rhent); in tnrh()
527 if (!template_name_ok(rhent.rh_template)) { in tnrh()
532 retv = tnrh_get(&rhent); in tnrh()
539 if (copyout(&rhent, buf, sizeof (rhent)) != 0) { in tnrh()