1N/A/*
1N/A * Copyright 2001-2002 Sun Microsystems, Inc. All rights reserved.
1N/A * Use is subject to license terms.
1N/A */
1N/A
1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A
1N/A/*
1N/A * The contents of this file are subject to the Netscape Public
1N/A * License Version 1.1 (the "License"); you may not use this file
1N/A * except in compliance with the License. You may obtain a copy of
1N/A * the License at http://www.mozilla.org/NPL/
1N/A *
1N/A * Software distributed under the License is distributed on an "AS
1N/A * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
1N/A * implied. See the License for the specific language governing
1N/A * rights and limitations under the License.
1N/A *
1N/A * The Original Code is Mozilla Communicator client code, released
1N/A * March 31, 1998.
1N/A *
1N/A * The Initial Developer of the Original Code is Netscape
1N/A * Communications Corporation. Portions created by Netscape are
1N/A * Copyright (C) 1998-1999 Netscape Communications Corporation. All
1N/A * Rights Reserved.
1N/A *
1N/A * Contributor(s):
1N/A */
1N/A
1N/A/*
1N/A * Internal header for libprldap -- glue NSPR (Netscape Portable Runtime)
1N/A * to libldap.
1N/A *
1N/A */
1N/A
1N/A#include <ldap.h>
1N/A#include <nspr.h>
1N/A#include <ldappr.h>
1N/A
1N/A#include <errno.h>
1N/A#include <string.h>
1N/A
1N/A#ifdef _SOLARIS_SDK
1N/A#include "solaris-int.h"
1N/A#endif
1N/A
1N/A/*
1N/A * All of the sockets we use are IPv6 capable.
1N/A * Change the following #define to PR_AF_INET to support IPv4 only.
1N/A */
1N/A#define PRLDAP_DEFAULT_ADDRESS_FAMILY PR_AF_INET6
1N/A
1N/A/*
1N/A * Data structures:
1N/A */
1N/A
1N/A/* data structure that populates the I/O callback session arg. */
1N/Atypedef struct lextiof_session_private {
1N/A PRPollDesc *prsess_pollds; /* for poll callback */
1N/A int prsess_pollds_count; /* # of elements in pollds */
1N/A int prsess_io_max_timeout; /* in milliseconds */
1N/A void *prsess_appdata; /* application specific data */
1N/A} PRLDAPIOSessionArg;
1N/A
1N/A/* data structure that populates the I/O callback socket-specific arg. */
1N/Atypedef struct lextiof_socket_private {
1N/A PRFileDesc *prsock_prfd; /* associated NSPR file desc. */
1N/A int prsock_io_max_timeout; /* in milliseconds */
1N/A void *prsock_appdata; /* application specific data */
1N/A} PRLDAPIOSocketArg;
1N/A
1N/A
1N/A/*
1N/A * Function prototypes:
1N/A */
1N/A
1N/A/*
1N/A * From ldapprio.c:
1N/A */
1N/Aint prldap_install_io_functions( LDAP *ld, int shared );
1N/Aint prldap_session_arg_from_ld( LDAP *ld, PRLDAPIOSessionArg **sessargpp );
1N/Aint prldap_set_io_max_timeout( PRLDAPIOSessionArg *prsessp,
1N/A int io_max_timeout );
1N/Aint prldap_get_io_max_timeout( PRLDAPIOSessionArg *prsessp,
1N/A int *io_max_timeoutp );
1N/Aint prldap_socket_arg_from_ld( LDAP *ld, PRLDAPIOSocketArg **sockargpp );
1N/A
1N/A
1N/A/*
1N/A * From ldapprthreads.c:
1N/A */
1N/Aint prldap_install_thread_functions( LDAP *ld, int shared );
1N/Aint prldap_thread_new_handle( LDAP *ld, void *sessionarg );
1N/Avoid prldap_thread_dispose_handle( LDAP *ld, void *sessionarg );
1N/A
1N/A
1N/A/*
1N/A * From ldapprdns.c:
1N/A */
1N/Aint prldap_install_dns_functions( LDAP *ld );
1N/A#ifdef _SOLARIS_SDK
1N/Aint prldap_x_install_dns_skipdb( LDAP *ld, const char *skip );
1N/A#endif
1N/A
1N/A
1N/A
1N/A/*
1N/A * From ldapprerror.c:
1N/A */
1N/Avoid prldap_set_system_errno( int e );
1N/Aint prldap_get_system_errno( void );
1N/Aint prldap_prerr2errno( void );