Misc updates. Need to add deprecated routines to the

"DEPRECATED INTERFACES" section.
This commit is contained in:
Kurt Zeilenga 2006-06-14 01:25:04 +00:00
parent ca2129bbff
commit ad326a0192

View File

@ -12,18 +12,20 @@ OpenLDAP LDAP (libldap, -lldap)
#include <ldap.h> #include <ldap.h>
.LP .LP
.ft B .ft B
char *ldap_err2string( int err ); char *ldap_err2string( int \fIerr\fB );
.LP
.ft B
void ldap_perror( LDAP *ld, const char *s )
.LP
.ft B
int ldap_result2error( LDAP *ld, LDAPMessage *res, int freeit )
.SH DESCRIPTION .SH DESCRIPTION
These routines provide interpretation of the various error codes The
returned by the LDAP protocol and LDAP library routines or associated .B ldap_err2string()
with an LDAP session. The error code associated with an LDAP session routine provides short description of the various codes returned by
is accessible using routines in this library. The returned string is a pointer to a
static area that should not be modified.
These codes are either negative,
indicating an API error code; positive, indicating an LDAP resultCode
other than \'success' (0), or - zero, indicating both successful use
of the API and the LDAP resultCode \'success' (0).
The code associated with an LDAP session is accessible using
.BR ldap_get_option (3) .BR ldap_get_option (3)
and and
.BR ldap_set_option (3) .BR ldap_set_option (3)
@ -31,38 +33,15 @@ with the
.B LDAP_OPT_RESULT_CODE .B LDAP_OPT_RESULT_CODE
option (previously called option (previously called
.BR LDAP_OPT_ERROR_NUMBER ). .BR LDAP_OPT_ERROR_NUMBER ).
.LP
The .SH PROTOCOL RESULT CODES
.B ldap_result2error()
routine takes \fIres\fP, a result as produced by This section provides a partial list of protocol codes recognized
.BR ldap_result (3) by the library. As LDAP is extensible, additional values may be
or returned. A complete listing of \fIregistered\fP LDAP result codes
.BR ldap_search_s (3), can be obtained from the \fIInternet Assigned Numbers Authority\fP
and returns <http://www.iana.org>.
the corresponding error code. Possible error codes are listed
below. If the \fIfreeit\fP parameter is non zero it indicates that the
\fIres\fP parameter should be freed by a call to
.BR ldap_msgfree (3)
after the error code has been extracted. The
.B ld_errno
field in \fIld\fP is set and returned.
.LP
The returned value can be passed to
.B ldap_err2string()
to get a text description of the message. The string
returned from
.B ldap_err2string()
is a pointer to a static area that
should not be modified.
.LP
The
.B ldap_perror()
routine can be called to print an indication of
the error on standard error, similar to the way
.BR perror (3)
works.
.SH ERRORS
The possible values for an ldap error code are:
.LP .LP
.TP 20 .TP 20
.SM LDAP_SUCCESS .SM LDAP_SUCCESS
@ -172,7 +151,17 @@ Object class modifications are not allowed.
.TP .TP
.SM LDAP_OTHER .SM LDAP_OTHER
An unknown error occurred. An unknown error occurred.
.TP
.SH API ERROR CODES
This section provides a complete list of API error codes recognized
by the library. Note that LDAP_SUCCESS indicates success of an
API call in addition to representing the return of the LDAP
\'success' resultCode.
.LP
.TP 20
.SM LDAP_SERVER_DOWN .SM LDAP_SERVER_DOWN
The LDAP library can't contact the LDAP server. The LDAP library can't contact the LDAP server.
.TP .TP
@ -200,8 +189,35 @@ An ldap routine was called with a bad parameter.
.TP .TP
.SM LDAP_NO_MEMORY .SM LDAP_NO_MEMORY
An memory allocation (e.g., malloc(3) or other dynamic memory An memory allocation (e.g., malloc(3) or other dynamic memory
allocator) call failed in an ldap allocator) call failed in an ldap library routine.
library routine. .TP
.SM LDAP_USER_CANCELED
Indicates the user cancelled the operation.
.TP
.SM LDAP_CONNECT_ERROR
Indicates a connection problem.
.TP
.SM LDAP_NOT_SUPPORTED
Indicates the routine was called in a manner not supported by the library.
.TP
.SM LDAP_CONTROL_NOT_FOUND
Indicates the control provided is unknown to the client library.
.TP
.SM LDAP_NO_RESULTS_RETURNED
Indicates no results returned.
.TP
.SM LDAP_MORE_RESULTS_TO_RETURN
Indicates more results could be returned.
.TP
.SM LDAP_CLIENT_LOOP
Indicates the library has detected a loop in its processing.
.TP
.SM LDAP_REFERRAL_LIMIT_EXCEEDED
Indicates the referral limit has been exceeded.
.SH DEPRECATED
.so Deprecated
.SH SEE ALSO .SH SEE ALSO
.BR ldap (3), .BR ldap (3),
.BR perror (3) .BR perror (3)