2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _LDAP_RULEVAL_H
2N/A#define _LDAP_RULEVAL_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <rpcsvc/nis.h>
2N/A
2N/A#include "ldap_parse.h"
2N/A#include "ldap_nisdbquery.h"
2N/A#include "ldap_structs.h"
2N/A#include "ldap_util.h"
2N/A
2N/A/* Exported functions */
2N/Avoid freeRuleValue(__nis_rule_value_t *rv, int count);
2N/A__nis_rule_value_t *initRuleValue(int count, __nis_rule_value_t *rvIn);
2N/A__nis_rule_value_t *growRuleValue(int oldCount, int newCount,
2N/A __nis_rule_value_t *old,
2N/A __nis_rule_value_t *rvIn);
2N/Aint mergeRuleValue(__nis_rule_value_t *target,
2N/A __nis_rule_value_t *source);
2N/Aint addAttr2RuleValue(__nis_value_type_t type, char *name,
2N/A void *value, int valueLen,
2N/A __nis_rule_value_t *rv);
2N/Aint addSAttr2RuleValue(char *name, char *value,
2N/A __nis_rule_value_t *rv);
2N/Aint addCol2RuleValue(__nis_value_type_t type, char *name,
2N/A void *value, int valueLen,
2N/A __nis_rule_value_t *rv);
2N/Aint addSCol2RuleValue(char *name, char *value,
2N/A __nis_rule_value_t *rv);
2N/Avoid delAttrFromRuleValue(__nis_rule_value_t *rv,
2N/A char *attrName);
2N/Avoid delColFromRuleValue(__nis_rule_value_t *rv,
2N/A char *colName);
2N/A__nis_rule_value_t *buildNisPlusRuleValue(__nis_table_mapping_t *t,
2N/A db_query *q, __nis_rule_value_t *rv);
2N/A__nis_mapping_item_t *buildLvalue(__nis_mapping_rlhs_t *rl,
2N/A __nis_value_t **rval, int *numItems);
2N/A__nis_value_t *buildRvalue(__nis_mapping_rlhs_t *rl,
2N/A __nis_mapping_item_type_t native,
2N/A __nis_rule_value_t *rv, int *stat);
2N/A__nis_rule_value_t *addLdapRuleValue(__nis_table_mapping_t *t,
2N/A __nis_mapping_rule_t *r,
2N/A __nis_mapping_item_type_t lnative,
2N/A __nis_mapping_item_type_t rnative,
2N/A __nis_rule_value_t *rv,
2N/A int doAssign, int *stat);
2N/A__nis_rule_value_t *addObjectClasses(__nis_rule_value_t *rv,
2N/A char *objClassAttrs);
2N/Achar *rvId(__nis_rule_value_t *rv,
2N/A __nis_mapping_item_type_t type);
2N/Achar *findVal(char *name, __nis_rule_value_t *rv,
2N/A __nis_mapping_item_type_t type);
2N/A__nis_rule_value_t *mergeRuleValueWithSameDN(__nis_rule_value_t *rv,
2N/A int *numVals);
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _LDAP_RULEVAL_H */