ber_init

Allocates and initializes a new BerElement structure with a copy of the data in the given berval structure.

Library:*ldapsdk.*
NDS Version:7.xx or higher
Platform:NLM, Windows (NT, 95, 98, 2000, XP, Vista 32-bit and 64-bit ), Linux (32-bit and 64-bit), Solaris, AIX, and HP-UX

Syntax

  #include <ldap.h> or <lber.h>
  
  BerElement *ber_init (
     const struct berval  *bv);
  

Parameters

bv

(IN) Points to the berval structure with which to initialize the new BerElement.

Return Values

Returns a new BerElement with the specified data on success; otherwise, returns a NULL pointer on failure.

Remarks

BerElements allocated with the ber_init function should be freed by calling the ber_free function.

Ber_init and ber_flatten are opposite functions. Ber_init converts a berval to a BerElement, and ber_flatten converts a BerElement to a berval.

See Also

ber_free, ber_flatten