Lines Matching refs:rhent
226 tnrh_delete(const tsol_rhent_t *rhent) in tnrh_delete() argument
234 if (rhent->rh_address.ta_family == AF_INET) { in tnrh_delete()
235 if (rhent->rh_prefix < 0 || rhent->rh_prefix > IP_ABITS) in tnrh_delete()
237 if (tnrhc_table[rhent->rh_prefix] == NULL) in tnrh_delete()
239 tmpmask = tsol_plen_to_mask(rhent->rh_prefix); in tnrh_delete()
240 tnrhc_hash = &tnrhc_table[rhent->rh_prefix][ in tnrh_delete()
241 TSOL_ADDR_HASH(rhent->rh_address.ta_addr_v4.s_addr & in tnrh_delete()
243 } else if (rhent->rh_address.ta_family == AF_INET6) { in tnrh_delete()
244 if (rhent->rh_prefix < 0 || rhent->rh_prefix > IPV6_ABITS) in tnrh_delete()
246 if (tnrhc_table_v6[rhent->rh_prefix] == NULL) in tnrh_delete()
248 tsol_plen_to_mask_v6(rhent->rh_prefix, &tmpmask_v6); in tnrh_delete()
249 tnrhc_hash = &tnrhc_table_v6[rhent->rh_prefix][ in tnrh_delete()
250 TSOL_ADDR_MASK_HASH_V6(rhent->rh_address.ta_addr_v6, in tnrh_delete()
260 if (TNADDR_EQ(&rhent->rh_address, ¤t->rhc_host)) in tnrh_delete()
411 tnrh_load(const tsol_rhent_t *rhent) in tnrh_load() argument
418 if ((tpc = tnrhtp_find(rhent->rh_template, tpc_name_hash)) == NULL) { in tnrh_load()
431 new->rhc_host = rhent->rh_address; in tnrh_load()
443 status = tnrh_hash_add(new, rhent->rh_prefix); in tnrh_load()
450 tnrh_get(tsol_rhent_t *rhent) in tnrh_get() argument
454 switch (rhent->rh_address.ta_family) { in tnrh_get()
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()
472 rhent, tsol_tpc_t *, tpc); in tnrh_get()
473 bcopy(tpc->tpc_tp.name, rhent->rh_template, in tnrh_get()
474 sizeof (rhent->rh_template)); in tnrh_get()
496 tsol_rhent_t rhent; in tnrh() local
507 copyin(buf, &rhent, sizeof (rhent)) != 0) { in tnrh()
515 if (!template_name_ok(rhent.rh_template)) { in tnrh()
518 retv = tnrh_load(&rhent); in tnrh()
524 retv = tnrh_delete(&rhent); in tnrh()
529 if (!template_name_ok(rhent.rh_template)) { in tnrh()
534 retv = tnrh_get(&rhent); in tnrh()
541 if (copyout(&rhent, buf, sizeof (rhent)) != 0) { in tnrh()