ldap_msgtype()--Retrieve the Type of an LDAP Message



  Syntax
 #include <ldap.h>
 

 int ldap_msgtype(
       LDAPMessage       *msg)

  Default Public Authority: *USE

  Library Name/Service Program: QSYS/QGLDCLNT

  Threadsafe: Yes

The ldap_msgtype() API returns the type of an LDAP message.


Authorities and Locks

No IBM® i authority is required.


Parameters

msg
(Input) Specifies a pointer to a result, as returned from ldap_first_message(), ldap_next_message, ldap_first_entry(), ldap_next_entry(), ldap_first_reference(), or ldap_next_reference().

Return Value

Message Type
if the call was successful. Message types are as follows:
LDAP_RES_BIND (0x61) Result of an LDAP bind operation.
LDAP_RES_SEARCH_ENTRY (0x64) An entry.
LDAP_RES_SEARCH_RESULT (0x65) Result of an LDAP search operation (LDAP v3).
LDAP_RES_MODIFY (0x67) Result of an LDAP modify operation.
LDAP_RES_ADD (0x69) Result of an LDAP add operation.
LDAP_RES_DELETE (0x6b) Result of an LDAP delete operation.
LDAP_RES_MODRDN (0x6d) Result of an LDAP modrdn operation.
LDAP_RES_COMPARE (0x6f) Result of an LDAP compare operation.
LDAP_RES_SEARCH_REFERENCE (0x73) A search reference.
LDAP_RES_EXTENDED (0x78) Result of an LDAP extended operation (LDAP v3).
LDAP_RES_REFERRAL (0xa3) A referral.

ZERO
if the input pointer to LDAPMessage structure is NULL.

Error Conditions

The ldap_msgtype() API returns ZERO if the input pointer to LDAPMessage structure is NULL.


Error Messages

The following message may be sent from this function.

Message ID Error Message Text
CPF3CF2 E Error(s) occurred during running of ldap_msgtype API.


Related Information


API introduced: V4R5

[ Back to top | LDAP APIs | APIs by category ]