X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=doc%2Fman%2Fman3%2Fldap_error.3;h=b3ff7637cbc138329659a9417c66fb4f438ba520;hb=c3932ca2c0a741cd2e693bcf5a044747a732757e;hp=8d3b9b68d86423d0f92007c2c744f690b7a5e970;hpb=2a869f5a99f537b246ba8640502e2a86117cb6e8;p=openldap diff --git a/doc/man/man3/ldap_error.3 b/doc/man/man3/ldap_error.3 index 8d3b9b68d8..b3ff7637cb 100644 --- a/doc/man/man3/ldap_error.3 +++ b/doc/man/man3/ldap_error.3 @@ -1,80 +1,47 @@ -.TH LDAP_ERROR 3 "22 September 1998" "OpenLDAP LDVERSION" +.TH LDAP_ERROR 3 "RELEASEDATE" "OpenLDAP LDVERSION" +.\" $OpenLDAP$ +.\" Copyright 1998-2006 The OpenLDAP Foundation All Rights Reserved. +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. .SH NAME ldap_perror, ld_errno, ldap_result2error, ldap_errlist, ldap_err2string \- LDAP protocol error handling routines +.SH LIBRARY +OpenLDAP LDAP (libldap, -lldap) .SH SYNOPSIS .nf .ft B -#include #include .LP .ft B -struct ldaperror { - int e_code; - char *e_reason; -}; -.LP -.ft B -struct ldaperror ldap_errlist[]; -.LP -.ft B -char *ldap_err2string(err) -.ft -int err; -.LP -.ft B -void ldap_perror(ld, s) -.ft -LDAP *ld; -char *s; -.LP -.ft B -int ldap_result2error(ld, res, freeit) -.ft -LDAP *ld; -LDAPMessage *res; -int freeit; +char *ldap_err2string( int \fIerr\fB ); .SH DESCRIPTION -These routines provide interpretation of the various error codes -returned by the LDAP protocol and LDAP library routines, and assigned -to the -.I ld_errno -field in the \fIld\fP structure. -.LP The -.B ldap_result2error() -routine takes \fIres\fP, a result as produced by -.BR ldap_result (3) -or -.BR ldap_search_s (3), -and returns -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() -or looked up in -.B ldap_errlist[] -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. The last element in the -.B ldap_errlist[] -array is signaled by an error code of -1. -.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: +routine provides short description of the various codes returned by +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) +and +.BR ldap_set_option (3) +with the +.B LDAP_OPT_RESULT_CODE +option (previously called +.BR LDAP_OPT_ERROR_NUMBER ). + +.SH PROTOCOL RESULT CODES + +This section provides a partial list of protocol codes recognized +by the library. As LDAP is extensible, additional values may be +returned. A complete listing of \fIregistered\fP LDAP result codes +can be obtained from the \fIInternet Assigned Numbers Authority\fP +. + .LP .TP 20 .SM LDAP_SUCCESS @@ -184,12 +151,22 @@ Object class modifications are not allowed. .TP .SM LDAP_OTHER 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 The LDAP library can't contact the LDAP server. .TP .SM LDAP_LOCAL_ERROR -Some local error occurred. This is usually a failed malloc. +Some local error occurred. This is usually a failed dynamic memory allocation. .TP .SM LDAP_ENCODING_ERROR An error was encountered encoding parameters to send to the LDAP server. @@ -208,17 +185,40 @@ An invalid filter was supplied to ldap_search() (e.g., unbalanced parentheses). .TP .SM LDAP_PARAM_ERROR -An ldap routine was called with a bad parameter (e.g., a NULL ld -pointer, etc.). +An ldap routine was called with a bad parameter. .TP .SM LDAP_NO_MEMORY -An memory allocation (e.g., malloc(3)) call failed in an ldap -library routine. +An memory allocation (e.g., malloc(3) or other dynamic memory +allocator) call failed in an ldap 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 -.BR ldap(3), -.BR perror(3) +.BR ldap (3), .SH ACKNOWLEDGEMENTS -.B OpenLDAP -is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). -.B OpenLDAP -is derived from University of Michigan LDAP 3.3 Release. +.so ../Project