]> git.sur5r.net Git - openldap/blobdiff - doc/man/man3/lber-types.3
spell out CTX -> context
[openldap] / doc / man / man3 / lber-types.3
index be43c963b52baa5f02cd93e1cd355d1583dc182e..fbeeb8fde2e1743d9f17078a493f7ee9b5d22155 100644 (file)
@@ -1,15 +1,11 @@
 .TH LBER_TYPES 3 "RELEASEDATE" "OpenLDAP LDVERSION"
 .\" $OpenLDAP$
-.\" Copyright 1998-2005 The OpenLDAP Foundation All Rights Reserved.
+.\" Copyright 1998-2009 The OpenLDAP Foundation All Rights Reserved.
 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
 .SH NAME
-ber_int_t, ber_uint_t, ber_len_t, ber_slen_t, ber_tag_t,
-struct berval, BerValue, BerVarray, BerElement,
-ber_bvfree, ber_bvecfree, ber_bvecadd, ber_bvarray_free, ber_bvarray_add,
-ber_bvdup, ber_dupbv, ber_bvstr, ber_bvstrdup, ber_str2bv, ber_free
-\- LBER types and allocation functions
+ber_int_t, ber_uint_t, ber_len_t, ber_slen_t, ber_tag_t, struct berval, BerValue, BerVarray, BerElement, ber_bvfree, ber_bvecfree, ber_bvecadd, ber_bvarray_free, ber_bvarray_add, ber_bvdup, ber_dupbv, ber_bvstr, ber_bvstrdup, ber_str2bv, ber_alloc_t, ber_init, ber_init2, ber_free \- OpenLDAP LBER types and allocation functions
 .SH LIBRARY
-OpenLDAP LBER (liblber, -llber)
+OpenLDAP LBER (liblber, \-llber)
 .SH SYNOPSIS
 .B #include <lber.h>
 .LP
@@ -50,6 +46,12 @@ typedef struct berelement BerElement;
 .LP
 .BI "struct berval *ber_str2bv(const char *" str ", ber_len_t " len ", int " dup ", struct berval *" bv ");"
 .LP
+.BI "BerElement *ber_alloc_t(int " options ");"
+.LP
+.BI "BerElement *ber_init(struct berval *" bv ");"
+.LP
+.BI "void ber_init2(BerElement *" ber ", struct berval *" bv ", int " options ");"
+.LP
 .BI "void ber_free(BerElement *" ber ", int " freebuf ");"
 .SH DESCRIPTION
 .LP
@@ -88,7 +90,7 @@ points to
 .B bv_len
 octets.
 .B bv_val
-is not necessarily terminated by a NUL (zero) octet.
+is not necessarily terminated by a NULL (zero) octet.
 .BR ber_bvfree ()
 frees a BerValue, pointed to by \fIbv\fP, returned from this API.  If \fIbv\fP
 is NULL, the routine does nothing.
@@ -151,10 +153,29 @@ in this version of the library.
 .LP
 .B BerElement
 is an opaque structure used to maintain state information used in
-encoding and decoding.  BerElement structures are created using
-.BR ber_alloc_t (3)
-and
-.BR ber_init (3).
+encoding and decoding.
+.BR ber_alloc_t ()
+is used to create an empty BerElement structure. If
+.B LBER_USE_DER
+is specified for the
+.I options
+parameter then data lengths for data written to the BerElement will be
+encoded in the minimal number of octets required, otherwise they will
+always be written as four byte values. 
+.BR ber_init ()
+creates a BerElement structure that is initialized with a copy of the
+data in its
+.I bv
+parameter.
+.BR ber_init2 ()
+initializes an existing BerElement
+.I ber
+using the data in the
+.I bv
+parameter. The data is referenced directly, not copied. The
+.I options
+parameter is the same as for
+.BR ber_alloc_t ().
 .BR ber_free ()
 frees a BerElement pointed to by \fIber\fP.  If \fIber\fP is NULL, the routine
 does nothing.  If \fIfreebuf\fP is zero, the internal buffer is not freed.
@@ -164,7 +185,4 @@ does nothing.  If \fIfreebuf\fP is zero, the internal buffer is not freed.
 .BR lber-memory (3)
 .LP
 .SH ACKNOWLEDGEMENTS
-.B OpenLDAP
-is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
-.B OpenLDAP
-is derived from University of Michigan LDAP 3.3 Release.  
+.so ../Project