MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


LDAP Library Functions                        ldapcharset(3LDAP)



NAME
     ldapcharset, ldapsetstringtranslators, ldapt61to8859,
     ldap8859tot61,                   ldaptranslatefromt61,
     ldaptranslatetot61, ldapenabletranslation - LDAP  char-
     acter set translation functions

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

     void ldapsetstringtranslators(LDAP *ld,
          BERTranslateProc encodeproc, BERTranslateProc decodeproc);


     typedef int(*BERTranslateProc)(char **bufp, unsigned long *buflenp,
          int freeinput);


     int ldapt61to8859(char **bufp, unsigned long *buflenp,
          int freeinput);


     int ldap8859tot61(char **bufp, unsigned long *buflenp,
          int freeinput);


     int ldaptranslatefromt61(LDAP *ld, char **bufp,
          unsigned long *lenp, int freeinput);


     int ldaptranslatetot61(LDAP *ld, char **bufp, unsigned long *lenp,
          int freeinput);


     void ldapenabletranslation(LDAP *ld, LDAPMessage *entry, int enable);


DESCRIPTION
     These functions are used to used to enable  translation   of
     character  strings used in the LDAP library to and from  the
     T.61 character set used in the LDAP protocol.  These   func-
     tions are only available if the LDAP and LBER libraries  are
     compiled with  STRTRANSLATION defined. It is also  possible
     to turn on character translation by default so that all LDAP
     library callers will experience translation;  see  the  LDAP
     Make-common source file for details.


     ldapsetstringtranslators() sets the translation functions
     that  will  be used by the LDAP library.  They are not actu-
     ally  used  until  the  ldlberoptions  field  of  the  LDAP



SunOS 5.11          Last change: 27 Jan 2002                    1






LDAP Library Functions                        ldapcharset(3LDAP)



     structure  is  set  to  include  the  LBERTRANSLATESTRINGS
     option.


     ldapt61to8859() and  ldap8859tot61()  are  translation
     functions  for  converting  between T.61 characters and ISO-
     8859 characters.  The specific 8859 character  set  used  is
     determined at compile time.


     ldaptranslatefromt61() is used to translate a  string  of
     characters  from the T.61 character set to a different char-
     acter  set.   The  actual  translation  is  done  using  the
     decodeproc   that   was   passed  to  a  previous  call  to
     ldapsetstringtranslators(). On entry, *bufp should  point
     to  the  start  of  the T.61 characters to be translated and
     *lenp should contain the number of bytes to  translate.   If
     freeinput  is  non-zero,  the input buffer will be freed if
     translation is a success.  If the translation is a  success,
     LDAPSUCES  will  be returned, *bufp will point to a newly
     malloc'd buffer that contains the translated characters, and
     *lenp  will contain the length of the result. If translation
     fails, an LDAP error code will be returned.


     ldaptranslatetot61() is used to  translate  a  string  of
     characters  to the T.61 character set from a different char-
     acter  set.   The  actual  translation  is  done  using  the
     encodeproc   that   was   passed  to  a  previous  call  to
     ldapsetstringtranslators(). This function is called  just
     like ldaptranslatefromt61().


     ldapenabletranslation() is used to turn on or  off  string
     translation  for the LDAP entry entry (typically obtained by
     calling ldapfirstentry() or ldapnextentry() after a suc-
     cessful  LDAP search operation). If enable is zero, transla-
     tion is disabled; if non-zero, translation is enabled.  This
     function  is  useful if you need to ensure that a particular
     attribute is not  translated  when  it  is  extracted  using
     ldapgetvalues() or ldapgetvalueslen(). For example, you
     would not want to translate  a  binary  attributes  such  as
     jpegPhoto.

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








SunOS 5.11          Last change: 27 Jan 2002                    2






LDAP Library Functions                        ldapcharset(3LDAP)



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


SEE ALSO
     ldap(3LDAP), attributes(5)













































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 ™