Manual Pages for UNIX Darwin command on man ber_bvstr
MyWebUniversity

Manual Pages for UNIX Darwin command on man ber_bvstr

LBERTYPES(3) LBERTYPES(3)

NAME

berintt, beruintt, berlent, berslent, bertagt, struct berval, BerValue, BerVarray, BerElement, berbvfree, berbvecfree, berbvecadd, berbvarrayfree, berbvarrayadd, berbvdup, berdupbv, berbvstr,

berbvstrdup, berstr2bv, berfree - LBER types and allocation func-

tions LLIIBBRRAARRYY

OpenLDAP LBER (liblber, -llber)

SYNOPSIS

##iinncclluuddee <>

ttyyppeeddeeff iimmppllttaaggtt bbeerrttaaggtt;; ttyyppeeddeeff iimmpplliinntttt bbeerriinntttt;; ttyyppeeddeeff iimmpplluuiinntttt bbeerruuiinntttt;; ttyyppeeddeeff iimmpplllleenntt bbeerrlleenntt;; ttyyppeeddeeff iimmppllsslleenntt bbeerrsslleenntt;; ttyyppeeddeeff ssttrruucctt bbeerrvvaall {{ bbeerrlleenntt bbvvlleenn;; cchhaarr **bbvvvvaall;; }} BBeerrVVaalluuee,, **BBeerrVVaarrrraayy;; ttyyppeeddeeff ssttrruucctt bbeerreelleemmeenntt BBeerrEElleemmeenntt;; vvooiidd bbeerrbbvvffrreeee((ssttrruucctt bbeerrvvaall **bv));; vvooiidd bbeerrbbvveeccffrreeee((ssttrruucctt bbeerrvvaall ****bvec));; vvooiidd bbeerrbbvveeccaadddd((ssttrruucctt bbeerrvvaall ******bvec,, ssttrruucctt bbeerrvvaall **bv));; vvooiidd bbeerrbbvvaarrrraayyffrreeee((ssttrruucctt bbeerrvvaall **bvarray));; vvooiidd bbeerrbbvvaarrrraayyaadddd((BBeerrVVaarrrraayy **bvarray,, BBeerrVVaalluuee **bv));; ssttrruucctt bbeerrvvaall **bbeerrbbvvdduupp((ccoonnsstt ssttrruucctt bbeerrvvaall **bv));; ssttrruucctt bbeerrvvaall **bbeerrdduuppbbvv((ccoonnsstt ssttrruucctt bbeerrvvaall **dst,, ssttrruucctt bbeerrvvaall **src));; ssttrruucctt bbeerrvvaall **bbeerrbbvvssttrr((ccoonnsstt cchhaarr **str));; ssttrruucctt bbeerrvvaall **bbeerrbbvvssttrrdduupp((ccoonnsstt cchhaarr **str));; ssttrruucctt bbeerrvvaall **bbeerrssttrr22bbvv((ccoonnsstt cchhaarr **str,, bbeerrlleenntt len,, iinntt dup,, ssttrruucctt bbeerrvvaall **bv));; vvooiidd bbeerrffrreeee((BBeerrEElleemmeenntt **ber,, iinntt freebuf));;

DESCRIPTION

The following are the basic types and structures defined for use with the Lightweight BER library. bbeerriinntttt is a signed integer of at least 32 bits. It is commonly equivalent to iinntt. bbeerruuiinntttt is the unsigned variant of bbeerriinntttt. bbeerrlleenntt is an unsigned integer of at least 32 bits used to represent a length. It is commonly equivalent to a ssiizzeett. bbeerrsslleenntt is the signed variant to bbeerrlleenntt. bbeerrttaaggtt is an unsigned integer of at least 32 bits used to represent a BER tag. It is commonly equivalent to a uunnssiiggnneedd lloonngg. The actual definitions of the integral implTYPEt types are platform specific. BBeerrVVaalluuee, commonly used as ssttrruucctt bbeerrvvaall, is used to hold an arbitrary sequence of octets. bbvvvvaall points to bbvvlleenn octets. bbvvvvaall is not necessarly terminated by a NUL (zero) octet. bbeerrbbvvffrreeee() frees a BerValue, pointed to by bv, returned from this API. If bv is NULL, the routine does nothing. bbeerrbbvveeccffrreeee() frees an array of BerValues (and the array), pointed to by bvec, returned from this API. If bvec is NULL, the routine does nothing. bbeerrbbvveeccaadddd() appends the bv pointer to the bvec array. Space for the array is allocated as needed. The end of the array is marked by a NULL pointer. bbeerrbbvvaarrrraayyffrreeee() frees an array of BerValues (and the array), pointed to by bvarray, returned from this API. If bvarray is NULL, the routine does nothing. bbeerrbbvvaarrrraayyaadddd() appends the contents of the BerValue pointed to by bv to the bvarray array. Space for the new element is allocated as needed. The end of the array is marked by a BerValue with a NULL bvval field. bbeerrbbvvdduupp() returns a copy of a BerValue. The routine returns NULL upon error (e.g. out of memory). The caller should use bbeerrbbvvffrreeee() to deallocate the resulting BerValue. bbeerrdduuppbbvv() copies a BerValue from src to dst. If dst is NULL a new BerValue will be allocated to hold the copy. The routine returns NULL upon error, otherwise it returns a pointer to the copy. If dst is NULL the caller should use bbeerrbbvvffrreeee() to deallocate the resulting BerValue, otherwise bbeerrmmeemmffrreeee() should be

used to deallocate the dst->bvval. (The bbeerrbbvvdduupp() function is

internally implemented as berdupbv(NULL, bv). bbeerrbbvvdduupp() is provided only for compatibility with an expired draft of the LDAP C API; bbeerrdduuppbbvv() is the preferred interface.) bbeerrbbvvssttrr() returns a BerValue containing the string pointed to by str. bbeerrbbvvssttrrdduupp() returns a BerValue containing a copy of the string pointed to by str. bbeerrssttrr22bbvv() returns a BerValue containing the string pointed to by str, whose length may be optionally specified in

len. If dup is non-zero, the BerValue will contain a copy of str. If

len is zero, the number of bytes to copy will be determined by

ssttrrlleenn(3), otherwise len bytes will be copied. If bv is non-NULL, the

result will be stored in the given BerValue, otherwise a new BerValue

will be allocated to store the result. NOTE: Both bbeerrbbvvssttrr() and

bbeerrbbvvssttrrdduupp() are implemented as macros using bbeerrssttrr22bbvv() in this version of the library. BBeerrEElleemmeenntt is an opaque structure used to maintain state information used in encoding and decoding. BerElement structures are created using bbeerraalllloocctt(3) and bbeerriinniitt(3). bbeerrffrreeee() frees a BerElement pointed to by ber. If ber is NULL, the routine does nothing. If freebuf is zero, the internal buffer is not freed.

SEE ALSO

llbbeerr-eennccooddee(3), llbbeerr-ddeeccooddee(3), llbbeerr-mmeemmoorryy(3)

AACCKKNNOOWWLLEEDDGGEEMMEENNTTSS OOppeennLLDDAAPP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OOppeennLLDDAAPP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.2.19 2004/11/26 LBERTYPES(3)




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