MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


LDAP Library Functions                            ldapufn(3LDAP)



NAME
     ldapufn,       ldapufnsearchs,        ldapufnsearchc,
     ldapufnsearchct,  ldapufnsetfilter, ldapufnsetprefix,
     ldapufntimeout - LDAP user friendly search functions

SYNOPSIS
     cc[ flag... ] file... -lldap[ library... ]
     #include 
     #include 

     int ldapufnsearchc(LDAP *ld, char *ufn, char **attrs,
          int attrsonly, LDAPMessage **res, int (*cancelproc)(),
          void *cancelparm);


     int ldapufnsearchct(LDAP *ld, char *ufn, char **attrs,
          int attrsonly, LDAPMessage **res,int (*cancelproc)(),
          void *cancelparm,char *tag1, char *tag2,
          char *tag3);


     int ldapufnsearchs(LDAP *ld, char *ufn, char **attrs,
          int attrsonly, LDAPMessage **res);


     LDAPFiltDesc *ldapufnsetfilter(LDAP *ld, char *fname);


     void ldapufnsetprefix(LDAP *ld, char *prefix);


     int ldapufntimeout(void *tvparam);


DESCRIPTION
     These functions are  used  to  perform  LDAP  user  friendly
     search operations. ldapufnsearchs() is the simplest form.
     It does the search synchronously.  It takes ld  to  identify
     the  the  LDAP  connection.  The  ufn  parameter is the user
     friendly name for which to search. The attrs, attrsonly  and
     res parameters are the same as for ldapsearch(3LDAP).


     The  ldapufnsearchc()  function  functions  the  same  as
     ldapufnsearchs(),  except  that  it  takes  cancelproc, a
     function to call periodicly during the search.  It should be
     a function taking a single void * argument, given by calcel-
     parm.  If cancelproc returns a non-zero result,  the  search
     will  be  abandoned  and no results returned. The purpose of
     this function is to provide a way for the search to be  can-
     celled,  for example, by a user or because some other condi-
     tion occurs.



SunOS 5.11          Last change: 27 Jan 2002                    1






LDAP Library Functions                            ldapufn(3LDAP)



     The     ldapufnsearchct()      function      is      like
     ldapufnsearchc(), except that it takes three extra param-
     eters.  tag1 is  passed  to  the  ldapinitgetfilter(3LDAP)
     function  when  resolving  the  first  component of the UFN.
     tag2 is used when resolving intermediate components. tag3 is
     used when resolving the last component. By default, the tags
     used by the other UFN search functions  during  these  three
     phases  of  the  search are "ufn first", "ufn intermediate",
     and "ufn last".


     The  ldapufnsetfilter()  function  is  used  to  set   the
     ldapfilter.conf(4)     file     for     use     with     the
     ldapinitgetfilter(3LDAP) function to fname.


     The ldapufnsetprefix() function is used to set the default
     prefix  (actually,  it's  a  suffix) appended to UFNs before
     searhing.  UFNs with fewer than three  components  have  the
     prefix appended first, before searching.  If that fails, the
     UFN is tried with progressively shorter versions of the pre-
     fix, stripping off components.  If the UFN has three or more
     components, it is tried by itself first.  If that  fails,  a
     similar process is applied with the prefix appended.


     The ldapufntimeout() function is used to set  the  timeout
     associated  with  ldapufnsearchs() searches.  The timeout
     parameter should actually be a pointer to a struct  timeval.
     This is so ldapufntimeout() can be used as a cancelproc in
     the above functions.

ATRIBUTES
     See attributes(5) for a description of the following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
     Availability                 SUNWcsl (32-bit)            
                                  SUNWcslx (64-bit)           
     Interface Stability          Evolving                    
    


SEE ALSO
     gettimeofday(3C),      ldap(3LDAP),      ldapsearch(3LDAP),
     ldapgetfilter(3LDAP),                   ldapfilter.conf(4),
     ldaperror(3LDAP), attributes(5)





SunOS 5.11          Last change: 27 Jan 2002                    2






LDAP Library Functions                            ldapufn(3LDAP)



NOTES
     These functions may allocates  memory.   Return  values  are
     contained in  .




















































SunOS 5.11          Last change: 27 Jan 2002                    3



OpenSolaris man pages main menu

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