17c478bdstevel@tonic-gate/*
27c478bdstevel@tonic-gate * CDDL HEADER START
37c478bdstevel@tonic-gate *
47c478bdstevel@tonic-gate * The contents of this file are subject to the terms of the
57c478bdstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
67c478bdstevel@tonic-gate * (the "License").  You may not use this file except in compliance
77c478bdstevel@tonic-gate * with the License.
87c478bdstevel@tonic-gate *
97c478bdstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bdstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
117c478bdstevel@tonic-gate * See the License for the specific language governing permissions
127c478bdstevel@tonic-gate * and limitations under the License.
137c478bdstevel@tonic-gate *
147c478bdstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
157c478bdstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bdstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
177c478bdstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
187c478bdstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
197c478bdstevel@tonic-gate *
207c478bdstevel@tonic-gate * CDDL HEADER END
217c478bdstevel@tonic-gate */
227c478bdstevel@tonic-gate/*
23a506a34th * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
247c478bdstevel@tonic-gate * Use is subject to license terms.
257c478bdstevel@tonic-gate */
267c478bdstevel@tonic-gate
277c478bdstevel@tonic-gate#ifndef	_LDAP_OP_H
287c478bdstevel@tonic-gate#define	_LDAP_OP_H
297c478bdstevel@tonic-gate
307c478bdstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
317c478bdstevel@tonic-gate
327c478bdstevel@tonic-gate#ifdef	__cplusplus
337c478bdstevel@tonic-gateextern "C" {
347c478bdstevel@tonic-gate#endif
357c478bdstevel@tonic-gate
367c478bdstevel@tonic-gate#include <sys/types.h>
377c478bdstevel@tonic-gate
387c478bdstevel@tonic-gate/*
397c478bdstevel@tonic-gate * Need _SOLARIS_SDK in order to get LDAP_CONTROL_SIMPLE_PAGE from new <ldap.h>
407c478bdstevel@tonic-gate */
417c478bdstevel@tonic-gate#ifndef	_SOLARIS_SDK
427c478bdstevel@tonic-gate#define	_SOLARIS_SDK
437c478bdstevel@tonic-gate#endif
447c478bdstevel@tonic-gate
457c478bdstevel@tonic-gate#include <lber.h>
467c478bdstevel@tonic-gate#include <ldap.h>
477c478bdstevel@tonic-gate#include <rpcsvc/nis.h>
487c478bdstevel@tonic-gate
497c478bdstevel@tonic-gate#include "ldap_parse.h"
507c478bdstevel@tonic-gate#include "ldap_structs.h"
517c478bdstevel@tonic-gate#include "ldap_ruleval.h"
527c478bdstevel@tonic-gate#include "nis_parse_ldap_conf.h"
537c478bdstevel@tonic-gate
547c478bdstevel@tonic-gate/* Exported functions */
557c478bdstevel@tonic-gate__nis_ldap_search_t	*buildLdapSearch(char *base, int scope,
567c478bdstevel@tonic-gate				int numFilterComps, char **filterComp,
577c478bdstevel@tonic-gate				char *filter, char **attrs, int attrsonly,
587c478bdstevel@tonic-gate				int isDN);
597c478bdstevel@tonic-gatevoid			freeLdapSearch(__nis_ldap_search_t *ls);
607c478bdstevel@tonic-gate__nis_ldap_search_t	*createLdapRequest(__nis_table_mapping_t *t,
617c478bdstevel@tonic-gate				__nis_rule_value_t *rv, char **dn,
627c478bdstevel@tonic-gate				int fromLDAP, int *res,
637c478bdstevel@tonic-gate				__nis_object_dn_t *objectDN);
647c478bdstevel@tonic-gateint			ldapDestroy(void);
657c478bdstevel@tonic-gateint			string2method(char *method);
667c478bdstevel@tonic-gateint			ldapConnect(void);
677c478bdstevel@tonic-gate__nis_rule_value_t	*ldapSearch(__nis_ldap_search_t *ls, int *numValues,
687c478bdstevel@tonic-gate				__nis_rule_value_t *rvIn, int *ldapStat);
697c478bdstevel@tonic-gateLDAPMod			**search2LdapMod(__nis_rule_value_t *rv, int add,
707c478bdstevel@tonic-gate				int oc);
717c478bdstevel@tonic-gateint			ldapModify(char *dn, __nis_rule_value_t *rv,
727c478bdstevel@tonic-gate				char *objClassAttrs, int addFirst);
737c478bdstevel@tonic-gateint			ldapAdd(char *dn, __nis_rule_value_t *rv,
747c478bdstevel@tonic-gate				char *objClassAttrs, void *lcv);
757c478bdstevel@tonic-gateint			ldapChangeDN(char *oldDn, char *dn);
767c478bdstevel@tonic-gate
777c478bdstevel@tonic-gate#ifdef	__cplusplus
787c478bdstevel@tonic-gate}
797c478bdstevel@tonic-gate#endif
807c478bdstevel@tonic-gate
817c478bdstevel@tonic-gate#endif	/* _LDAP_OP_H */
82