mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#2240 ber_init and friends
This commit is contained in:
parent
6e320f233e
commit
638316f979
@ -6,7 +6,8 @@
|
|||||||
ber_int_t, ber_uint_t, ber_len_t, ber_slen_t, ber_tag_t,
|
ber_int_t, ber_uint_t, ber_len_t, ber_slen_t, ber_tag_t,
|
||||||
struct berval, BerValue, BerVarray, BerElement,
|
struct berval, BerValue, BerVarray, BerElement,
|
||||||
ber_bvfree, ber_bvecfree, ber_bvecadd, ber_bvarray_free, ber_bvarray_add,
|
ber_bvfree, ber_bvecfree, ber_bvecadd, ber_bvarray_free, ber_bvarray_add,
|
||||||
ber_bvdup, ber_dupbv, ber_bvstr, ber_bvstrdup, ber_str2bv, ber_free
|
ber_bvdup, ber_dupbv, ber_bvstr, ber_bvstrdup, ber_str2bv,
|
||||||
|
ber_alloc_t, ber_init, ber_init2, ber_free
|
||||||
\- LBER types and allocation functions
|
\- LBER types and allocation functions
|
||||||
.SH LIBRARY
|
.SH LIBRARY
|
||||||
OpenLDAP LBER (liblber, -llber)
|
OpenLDAP LBER (liblber, -llber)
|
||||||
@ -50,6 +51,12 @@ typedef struct berelement BerElement;
|
|||||||
.LP
|
.LP
|
||||||
.BI "struct berval *ber_str2bv(const char *" str ", ber_len_t " len ", int " dup ", struct berval *" bv ");"
|
.BI "struct berval *ber_str2bv(const char *" str ", ber_len_t " len ", int " dup ", struct berval *" bv ");"
|
||||||
.LP
|
.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 ");"
|
.BI "void ber_free(BerElement *" ber ", int " freebuf ");"
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.LP
|
.LP
|
||||||
@ -151,10 +158,29 @@ in this version of the library.
|
|||||||
.LP
|
.LP
|
||||||
.B BerElement
|
.B BerElement
|
||||||
is an opaque structure used to maintain state information used in
|
is an opaque structure used to maintain state information used in
|
||||||
encoding and decoding. BerElement structures are created using
|
encoding and decoding.
|
||||||
.BR ber_alloc_t (3)
|
.BR ber_alloc_t ()
|
||||||
and
|
is used to create an empty BerElement structure. If
|
||||||
.BR ber_init (3).
|
.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 ()
|
.BR ber_free ()
|
||||||
frees a BerElement pointed to by \fIber\fP. If \fIber\fP is NULL, the routine
|
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.
|
does nothing. If \fIfreebuf\fP is zero, the internal buffer is not freed.
|
||||||
|
Loading…
Reference in New Issue
Block a user