LDAP_PARSE_SORT-CONTROL(3)
π LDAP_PARSE_SORT-CONTROL(3) π
okay bestie, buckle up β this one's from the Library Functions Manual, and it's literally the glow-up your sort control results have been waiting for β¨
πΈ NAME πΈ
ldap_parse_sort_control β the icon that decodes the info your search operation got back when it used a server-side sort control π
π¦ LIBRARY π¦
OpenLDAP LDAP (libldap, -lldap) β that's the fam, no cap π
β¨ SYNOPSIS β¨
#include <ldap.h>
int ldap_parse_sort_control(ld, ctrls, returnCode, attribute)
LDAP *ld;
LDAPControl **ctrls;
unsigned long *returnCode;
char **attribute;
like, four arguments, all main character energy π
π₯ DESCRIPTION π₯
So this function? It's the one you call to parse the results that come back from a search operation using a server-side sort control. Periodt π
It takes a null terminated array of LDAPControl structures β usually you got those by calling the ldap_parse_result function, iykyk π«Ά
Then there's a returncode that points to the sort control result code, plus an array of LDAPControl structures that list the client controls to use with the search. All very demure, all very mindful β¨
The function also takes an out parameter, attribute, and ngl this is the spicy part πΆοΈ β if the sort operation fails, the server may return a string that indicates the first attribute in the sortKey list that caused the failure. the way that's so helpful of it π
π if this parameter is NULL, no string gets returned. nothing. zero. zilch. π
β οΈ and if a string does get returned, bestie you gotta free that memory by calling the ldap_memfree function. no leaks allowed, we don't do that here π§
π NOTES π
(nothing here, it's giving minimalist π but we respect it)
π SEE ALSO π
go read those too, they're lowkey important π
π 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. absolute legends, fr fr π«‘
and that's the whole vibe, bestie π¦ this page is from OpenLDAP 2.6.16, dated 2026/10/21, and it's the LDAP_PARSE_SORT-CONTROL(3) page β slay, go parse those sort controls, ily πβ¨
π¦ where this page comes from
- fedora 44: openldap-devel 2.6.16-1.fc44 Β· OLDAP-2.8
- fedora 44: openldap-devel 2.6.16-1.fc44 Β· OLDAP-2.8
- Copyright 1998-2026 The OpenLDAP Foundation All Rights Reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms