2 * Copyright 2001-2002 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 #pragma ident "%Z%%M% %I% %E% SMI"
10 * The contents of this file are subject to the Netscape Public
11 * License Version 1.1 (the "License"); you may not use this file
12 * except in compliance with the License. You may obtain a copy of
13 * the License at http://www.mozilla.org/NPL/
15 * Software distributed under the License is distributed on an "AS
16 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
17 * implied. See the License for the specific language governing
18 * rights and limitations under the License.
20 * The Original Code is Mozilla Communicator client code, released
23 * The Initial Developer of the Original Code is Netscape
24 * Communications Corporation. Portions created by Netscape are
25 * Copyright (C) 1998-1999 Netscape Communications Corporation. All
32 * Internal header for libprldap -- glue NSPR (Netscape Portable Runtime)
45 #include "solaris-int.h"
49 * All of the sockets we use are IPv6 capable.
50 * Change the following #define to PR_AF_INET to support IPv4 only.
52 #define PRLDAP_DEFAULT_ADDRESS_FAMILY PR_AF_INET6
58 /* data structure that populates the I/O callback session arg. */
59 typedef struct lextiof_session_private
{
60 PRPollDesc
*prsess_pollds
; /* for poll callback */
61 int prsess_pollds_count
; /* # of elements in pollds */
62 int prsess_io_max_timeout
; /* in milliseconds */
63 void *prsess_appdata
; /* application specific data */
66 /* data structure that populates the I/O callback socket-specific arg. */
67 typedef struct lextiof_socket_private
{
68 PRFileDesc
*prsock_prfd
; /* associated NSPR file desc. */
69 int prsock_io_max_timeout
; /* in milliseconds */
70 void *prsock_appdata
; /* application specific data */
75 * Function prototypes:
81 int prldap_install_io_functions( LDAP
*ld
, int shared
);
82 int prldap_session_arg_from_ld( LDAP
*ld
, PRLDAPIOSessionArg
**sessargpp
);
83 int prldap_set_io_max_timeout( PRLDAPIOSessionArg
*prsessp
,
85 int prldap_get_io_max_timeout( PRLDAPIOSessionArg
*prsessp
,
86 int *io_max_timeoutp
);
87 int prldap_socket_arg_from_ld( LDAP
*ld
, PRLDAPIOSocketArg
**sockargpp
);
91 * From ldapprthreads.c:
93 int prldap_install_thread_functions( LDAP
*ld
, int shared
);
94 int prldap_thread_new_handle( LDAP
*ld
, void *sessionarg
);
95 void prldap_thread_dispose_handle( LDAP
*ld
, void *sessionarg
);
101 int prldap_install_dns_functions( LDAP
*ld
);
103 int prldap_x_install_dns_skipdb( LDAP
*ld
, const char *skip
);
109 * From ldapprerror.c:
111 void prldap_set_system_errno( int e
);
112 int prldap_get_system_errno( void );
113 int prldap_prerr2errno( void );