#include <lber.h> #include <ldap.h>int ldap_modify(LDAP
ld, char
dn, LDAPMod
mods[]);
int ldap_modify_s(LDAP
ld, char
dn, LDAPMod
mods[]);
void ldap_mods_free(LDAPMod
mods, int freemods);
ldap_modify_s returns the LDAP error code resulting from the modify operation. This code can be interpreted by the functions documented on the ldap_perror(3ldap) manual page.
The ldap_modify operation works the same way as ldap_modify_s, except that it is asynchronous, returning the message ID of the request it initiates, or else -1 on error. The result of the operation can be obtained by calling ldap_result(3ldap).
ldap_mods_free can be used to free each element of a NULL-terminated array of LDAPMod structures. If freemods is non-zero, the mods pointer itself is freed as well.
ld_errno
field of ld.