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_STRUCTS_H
2N/A#define _LDAP_STRUCTS_H
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A#include <sys/time.h>
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * Some functions accept a pointer to either a __nis_mapping_item_t, or
2N/A * a __nis_value_t. This enum tells us which it is.
2N/A */
2N/Atypedef enum {fa_any, fa_item, fa_value} __nis_format_arg_t;
2N/A
2N/A/*
2N/A * A __nis_value_t contains either string (vt_string) or non-string
2N/A * (vt_ber) values.
2N/A */
2N/Atypedef enum {vt_any, vt_string, vt_ber} __nis_value_type_t;
2N/A
2N/A/* A single value. If the value is a (char *), the length includes the NUL */
2N/Atypedef struct {
2N/A int length;
2N/A void *value;
2N/A} __nis_single_value_t;
2N/A
2N/A/*
2N/A * Holds multiple values of the specified type.
2N/A */
2N/Atypedef struct {
2N/A __nis_value_type_t type;
2N/A int repeat; /* Should value be repeated ? */
2N/A int numVals;
2N/A __nis_single_value_t *val;
2N/A} __nis_value_t;
2N/A
2N/A/* Structure used to build rule values */
2N/Atypedef struct {
2N/A int numColumns; /* Number of col names/vals */
2N/A char **colName; /* Column names */
2N/A __nis_value_t *colVal; /* Column values */
2N/A int numAttrs; /* Number of attr names vals */
2N/A char **attrName; /* Attribute names */
2N/A __nis_value_t *attrVal; /* Attribute values */
2N/A} __nis_rule_value_t;
2N/A
2N/A/* Structure containing information that ldap_search_s() wants */
2N/Atypedef struct {
2N/A unsigned char useCon; /* Should we use existing connection ? */
2N/A char *base;
2N/A int scope;
2N/A int numFilterComps;
2N/A char **filterComp;
2N/A char *filter;
2N/A int numAttrs;
2N/A char **attrs;
2N/A int attrsonly;
2N/A int isDN;
2N/A struct timeval timeout;
2N/A} __nis_ldap_search_t;
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _LDAP_STRUCTS_H */