ldap_parse_result?
http://www.openldap.org/lists/openldap-software/200505/msg00093.html
Unfortunately, the variable 'LDAPMessage *result' which contains the message to parse is local to the function ldap_sasl_bind_s(), so I cannot access it either.
Thanks, Laurent Birtz