int error_number()
Returns the error number from the last transaction. If the error is LDAP_SERVER_DOWN then there was a socket error, and the I/O error number can be retrieved using ldapfd ->errno().
ldapfd ->errno()
error_string , server_error_string