MyWebUniversity.com Home Page
 



Darwin Mac OS X man pages main menu
LDAPGETVALUES(3)                                          LDAPGETVALUES(3)



NAME
       ldapgetvalues,    ldapgetvalueslen,   ldapcountvalues   -   LDAP
       attribute value handling routines

LIBRARY
       OpenLDAP LDAP (libldap, -lldap)

SYNOPSIS
       ##include <>


       char ****ldapgetvalues(ld,, entry,, attr)
       LDAP *ld;
       LDAPMessage *entry;
       char *attr

       struct berval ****ldapgetvalueslen(ld,, entry,, attr)
       LDAP *ld;
       LDAPMessage *entry;
       char *attr

       ldapcountvalues(vals)
       char **vals;

       ldapcountvalueslen(vals)
       struct berval **vals;

       ldapvaluefree(vals)
       char **vals;

       ldapvaluefreelen(vals)
       struct berval **vals;

DESCRIPTION
       These routines are used to retrieve  and  manipulate  attribute  values
       from   an   LDAP   entry   as   returned   by   ldapfirstentry(3)  or
       ldapnextentry(3).   ldapgetvalues()  takes  the   entry   and   the
       attribute  attr  whose values are desired and returns a NUL-terminated
       array of the attribute's values.  attr may  be  an  attribute  type  as
       returned  from ldapfirstattribute(3) or ldapnextattribute(3), or if
       the attribute type is known it can simply be given.

       The  number  of  values  in  the  array  can  be  counted  by   calling
       ldapcountvalues().   The  array  of  values  returned can be freed by
       calling ldapvaluefree().

       If the attribute values are binary in nature, and thus not suitable  to
       be  returned as an array of char *'s, the ldapgetvalueslen() routine
       can be used instead.  It takes the  same  parameters  as  ldapgetval-
       ues(), but returns a NUL-terminated array of pointers to berval struc-
       tures, each containing the length of and a pointer to a value.

       The  number  of  values  in  the  array  can  be  counted  by   calling
       ldapcountvalueslen().   The array of values returned can be freed by
       calling ldapvaluefreelen().

ERORS
       If an error occurs in ldapgetvalues() or ldapgetvalueslen(),  NUL
       is  returned and the lderrno field in the ld parameter is set to indi-
       cate the error.  See ldaperror(3) for a description of possible  error
       codes.

NOTES
       These  routines  dynamically allocate memory which the caller must free
       using the supplied routines.

SEE ALSO
       ldap(3), ldapfirstentry(3), ldapfirstattribute(3), ldaperror(3)

ACKNOWLEDGEMENTS
       OpenLDAP  is  developed  and  maintained  by   The   OpenLDAP   Project
       (http:/www.openldap.org/).   OpenLDAP  is  derived  from University of
       Michigan LDAP 3.3 Release.



OpenLDAP 2.2.19                   2004/11/26                LDAPGETVALUES(3)
Darwin Mac OS X man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™