LDAP_EXTENDED_OPERATION(3)

🌸 NAME 🌸

okay so this is LDAP_EXTENDED_OPERATION(3) from the Library Functions Manual, and it's literally the page for ldap_extended_operation and ldap_extended_operation_s β€” both of them extend the LDAP operations to the LDAP server. periodt ✨

πŸ“š LIBRARY πŸ“š

OpenLDAP LDAP (libldap, -lldap) β€” yes bestie, that's the one 🫢

✨ SYNOPSIS ✨

       #include <ldap.h>

       int ldap_extended_operation(
              LDAP *ld,
              const char *requestoid,
              const struct berval *requestdata,
              LDAPControl **sctrls,
              LDAPControl **cctrls,
              int *msgidp );

       int ldap_extended_operation_s(
              LDAP *ld,
              const char *requestoid,
              const struct berval *requestdata,
              LDAPControl **sctrls,
              LDAPControl **cctrls,
              char **retoidp,
              struct berval **retdatap );

πŸ’… DESCRIPTION πŸ’…

okay bestie, let's get into it πŸ’–. ldap_extended_operation_s() is the synchronous girlie used to perform an LDAP extended operation. She takes requestoid, which points to a dotted-decimal OID string identifying the extended operation to perform. requestdata is the data required for the request. sctrls is an array of LDAPControl structures to use with this extended operation. cctrls is an array of LDAPControl structures that list the client controls to use with this extended operation.

then there's the output side, and it's giving very important πŸ‘‘:

  • retoidp β€” points to a dotted-decimal OID string returned by the LDAP server. the memory used by that string should be freed with ldap_memfree(3), no cap 🧚
  • retdatap β€” points to a pointer to a berval structure that contains the returned data. if the server returns no data, the pointer is set to NULL β€” yes, NULL, bestie πŸ’€. the memory used by this structure should be freed with ber_bvfree(3).

and ldap_extended_operation()? she works just like ldap_extended_operation_s(), except the operation is asynchronous 🌈. she provides the message id of the request she initiated in the integer pointed to by msgidp. you can get the result of this operation by calling ldap_result(3) β€” iconic behavior, honestly πŸ”₯.

πŸ‘€ SEE ALSO πŸ‘€

go read up, bestie: ber_bvfree(3), ldap_memfree(3), ldap_parse_extended_result(3), ldap_result(3) 🌟

🫢 ACKNOWLEDGEMENTS 🫢

OpenLDAP Software is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. OpenLDAP Software is derived from the University of Michigan LDAP 3.3 Release. slay πŸ’…


mwah πŸ’‹ β€” this page is OpenLDAP 2.6.16, dated 2026/10/21. bye bestie, stay iconic! πŸ¦‹

πŸ“¦ where this page comes from