Allocates and initializes a new BerElement structure with a copy of the data in the given berval structure.
#include <ldap.h> or <lber.h>
BerElement *ber_init (
const struct berval *bv);
(IN) Points to the berval structure with which to initialize the new BerElement.
Returns a new BerElement with the specified data on success; otherwise, returns a NULL pointer on failure.
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.