Lines Matching defs:rhent

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