/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef _LDAPTOOL_H
#define _LDAPTOOL_H
/* XXX:mhein The following is a workaround for the redefinition of */
/* const problem on OSF. Fix to be provided by NSS */
/* This is a pretty benign workaround for us which */
/* should not cause problems in the future even if */
/* we forget to take it out :-) */
#ifdef OSF1V4D
#ifndef __STDC__
# define __STDC__
#endif /* __STDC__ */
#endif /* OSF1V4D */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#ifdef AIX
#include <strings.h>
#endif
#ifdef SCOOS
#endif
#ifdef _WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <io.h> /* for _mktemp() */
#else
#include <unistd.h>
#endif
#ifdef LINUX
#endif
#include <ctype.h>
#ifndef SCOOS
#endif
#include <fcntl.h>
#ifndef SOLARIS_LDAP_CMD
#if defined(NET_SSL)
#include <ssl.h>
#endif
#if defined(NET_SSL)
#include <ldap_ssl.h>
#endif
#ifndef NO_LIBLCACHE
#include <lcache.h>
#endif
#include <ldappr.h>
#include <portable.h>
#endif /* SOLARIS_LDAP_CMD */
#include <ldap.h>
#include <ldaplog.h>
#include <ldif.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* shared macros, structures, etc.
*/
&& (rc) != LDAP_COMPARE_FALSE )
#ifdef SOLARIS_LDAP_CMD
#else
#endif /* SOLARIS_LDAP_CMD */
/* this defines the max number of control requests for the tools */
/*
* globals (defined in common.c)
*/
extern char *ldaptool_host;
extern char *ldaptool_host2;
extern int ldaptool_port;
extern int ldaptool_port2;
extern int ldaptool_verbose;
extern int ldaptool_not;
#ifdef SOLARIS_LDAP_CMD
extern int ldaptool_require_binddn;
#endif /* SOLARIS_LDAP_CMD */
extern char *ldaptool_progname;
extern FILE *ldaptool_fp;
extern char *ldaptool_charset;
extern char *ldaptool_convdir;
extern LDAPControl *ldaptool_request_ctrls[];
/*
* function prototypes
*/
void ldaptool_common_usage( int two_hosts );
#define LDAPTOOL_CHECK4SSL_NEVER 0
void ldaptool_print_referrals( char **refs );
const char *authzid,
const char **attrlist );
char *ldaptool_get_tmp_dir( void );
char *ldaptool_local2UTF8( const char * );
#ifdef SOLARIS_LDAP_CMD
char *ldaptool_UTF82local( const char * );
#endif /* SOLARIS_LDAP_CMD */
int ldaptool_boolean_str2value ( const char *s, int strict );
/* Definition for list in ldapdelete.c */
char *data;
} Element;
typedef struct { /* generic double-linked list head */
long count;
} Head;
#ifdef __cplusplus
}
#endif
#endif /* LDAPTOOL_H */