Back to index

openldap  2.4.31
Classes | Defines | Typedefs | Functions
lber.h File Reference
#include <lber_types.h>
#include <string.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  lber_memory_fns
struct  sockbuf_io_desc
struct  sockbuf_io
struct  berval


#define LBER_CLASS_UNIVERSAL   ((ber_tag_t) 0x00U)
#define LBER_CLASS_APPLICATION   ((ber_tag_t) 0x40U)
#define LBER_CLASS_CONTEXT   ((ber_tag_t) 0x80U)
#define LBER_CLASS_PRIVATE   ((ber_tag_t) 0xc0U)
#define LBER_CLASS_MASK   ((ber_tag_t) 0xc0U)
#define LBER_PRIMITIVE   ((ber_tag_t) 0x00U)
#define LBER_CONSTRUCTED   ((ber_tag_t) 0x20U)
#define LBER_ENCODING_MASK   ((ber_tag_t) 0x20U)
#define LBER_BIG_TAG_MASK   ((ber_tag_t) 0x1fU)
#define LBER_MORE_TAG_MASK   ((ber_tag_t) 0x80U)
#define LBER_ERROR   ((ber_tag_t) -1)
#define LBER_DEFAULT   ((ber_tag_t) -1)
#define LBER_BOOLEAN   ((ber_tag_t) 0x01UL)
#define LBER_INTEGER   ((ber_tag_t) 0x02UL)
#define LBER_BITSTRING   ((ber_tag_t) 0x03UL)
#define LBER_OCTETSTRING   ((ber_tag_t) 0x04UL)
#define LBER_NULL   ((ber_tag_t) 0x05UL)
#define LBER_ENUMERATED   ((ber_tag_t) 0x0aUL)
#define LBER_SEQUENCE   ((ber_tag_t) 0x30UL) /* constructed */
#define LBER_SET   ((ber_tag_t) 0x31UL) /* constructed */
#define LBER_USE_DER   0x01
#define LBER_OPT_BER_OPTIONS   0x01
#define LBER_OPT_BER_DEBUG   0x02
#define LBER_OPT_BER_MEMCTX   0x06
#define LBER_OPT_LOG_PRINT_FN   0x8001
#define LBER_OPT_MEMORY_FNS   0x8002
#define LBER_OPT_ERROR_FN   0x8003
#define LBER_OPT_LOG_PRINT_FILE   0x8004
#define LBER_OPT_MEMORY_INUSE   0x8005 /* for memory debugging */
#define LBER_OPT_LOG_PROC   0x8006 /* for external logging function */
#define LBER_SB_OPT_GET_FD   1
#define LBER_SB_OPT_SET_FD   2
#define LBER_SB_OPT_HAS_IO   3
#define LBER_SB_OPT_GET_SSL   7
#define LBER_SB_OPT_DRAIN   10
#define LBER_SB_OPT_UNGET_BUF   15
#define LBER_SB_OPT_OPT_MAX   15
#define LBER_OPT_SOCKBUF_DESC   0x1000
#define LBER_OPT_SOCKBUF_DEBUG   0x1002
#define LBER_OPT_ON   ((void *) &ber_pvt_opt_on)
#define LBER_OPT_OFF   ((void *) 0)
#define LBER_OPT_SUCCESS   (0)
#define LBER_OPT_ERROR   (-1)
#define LBER_SBIOD_READ_NEXT(sbiod, buf, len)
#define LBER_SBIOD_WRITE_NEXT(sbiod, buf, len)
#define LBER_SBIOD_CTRL_NEXT(sbiod, opt, arg)
#define LBER_BV_ALLOC   0x01 /* allocate/copy result, otherwise in-place */
#define LBER_BV_NOTERM   0x02 /* omit NUL-terminator if parsing in-place */
#define LBER_BV_STRING   0x04 /* fail if berval contains embedded \0 */
#define LBER_FLUSH_FREE_NEVER   (0x0) /* traditional behavior */
#define LBER_FLUSH_FREE_ON_SUCCESS   (0x1) /* traditional behavior */
#define LBER_FLUSH_FREE_ON_ERROR   (0x2)
#define ber_bvstr(a)   ((ber_str2bv)((a), 0, 0, NULL))
#define ber_bvstrdup(a)   ((ber_str2bv)((a), 0, 1, NULL))
#define ber_bvcmp(v1, v2)
#define ber_errno   (*(ber_errno_addr)())
#define LBER_ERROR_NONE   0
#define LBER_ERROR_PARAM   0x1
#define LBER_ERROR_MEMORY   0x2


typedef int *BER_ERRNO_FN LDAP_P ((void))
typedef voidctx
typedef struct lber_memory_fns BerMemoryFunctions
typedef struct berelement
typedef struct sockbuf
typedef struct sockbuf_io
typedef struct sockbuf_io_desc Sockbuf_IO_Desc
typedef struct berval BerValue
typedef BerValueBerVarray


typedef void (BER_MEMFREE_FN) LDAP_P((void *p
 LBER_V (char) ber_pvt_opt_on
ber_error_print LDAP_P ((LDAP_CONST char *data))
ber_bprint LDAP_P ((LDAP_CONST char *data, ber_len_t len))
ber_dump LDAP_P ((BerElement *ber, int inout))
ber_get_tag LDAP_P ((BerElement *ber))
ber_skip_tag LDAP_P ((BerElement *ber, ber_len_t *len))
ber_skip_element LDAP_P ((BerElement *ber, struct berval *bv))
ber_peek_element LDAP_P ((LDAP_CONST BerElement *ber, struct berval *bv))
ber_get_int LDAP_P ((BerElement *ber, ber_int_t *num))
ber_get_stringb LDAP_P ((BerElement *ber, char *buf, ber_len_t *len))
ber_get_stringbv LDAP_P ((BerElement *ber, struct berval *bv, int options))
ber_get_stringa LDAP_P ((BerElement *ber, char **buf))
ber_get_stringal LDAP_P ((BerElement *ber, struct berval **bv))
ber_get_bitstringa LDAP_P ((BerElement *ber, char **buf, ber_len_t *len))
ber_get_boolean LDAP_P ((BerElement *ber, ber_int_t *boolval))
ber_first_element LDAP_P ((BerElement *ber, ber_len_t *len, char **last))
ber_next_element LDAP_P ((BerElement *ber, ber_len_t *len, LDAP_CONST char *last))
ber_scanf LDAP_P ((BerElement *ber, LDAP_CONST char *fmt,...))
ber_decode_oid LDAP_P ((struct berval *in, struct berval *out))
ber_put_enum LDAP_P ((BerElement *ber, ber_int_t num, ber_tag_t tag))
ber_put_ostring LDAP_P ((BerElement *ber, LDAP_CONST char *str, ber_len_t len, ber_tag_t tag))
ber_put_berval LDAP_P ((BerElement *ber, struct berval *bv, ber_tag_t tag))
ber_put_string LDAP_P ((BerElement *ber, LDAP_CONST char *str, ber_tag_t tag))
ber_put_bitstring LDAP_P ((BerElement *ber, LDAP_CONST char *str, ber_len_t bitlen, ber_tag_t tag))
ber_put_null LDAP_P ((BerElement *ber, ber_tag_t tag))
ber_put_boolean LDAP_P ((BerElement *ber, ber_int_t boolval, ber_tag_t tag))
ber_skip_data LDAP_P ((BerElement *ber, ber_len_t len))
ber_read LDAP_P ((BerElement *ber, char *buf, ber_len_t len))
ber_write LDAP_P ((BerElement *ber, LDAP_CONST char *buf, ber_len_t len, int zero))
ber_free LDAP_P ((BerElement *ber, int freebuf))
ber_flush2 LDAP_P ((Sockbuf *sb, BerElement *ber, int freeit))
ber_alloc LDAP_P ((void))
ber_alloc_t LDAP_P ((int beroptions))
ber_get_next LDAP_P ((Sockbuf *sb, ber_len_t *len, BerElement *ber))
ber_init_w_nullc LDAP_P ((BerElement *ber, int options))
ber_reset LDAP_P ((BerElement *ber, int was_writing))
ber_init LDAP_P ((struct berval *bv))
ber_flatten LDAP_P ((BerElement *ber, struct berval **bvPtr))
ber_flatten2 LDAP_P ((BerElement *ber, struct berval *bv, int alloc))
ber_get_option LDAP_P ((void *item, int option, void *outvalue))
ber_set_option LDAP_P ((void *item, int option, LDAP_CONST void *invalue))
ber_sockbuf_free LDAP_P ((Sockbuf *sb))
ber_sockbuf_add_io LDAP_P ((Sockbuf *sb, Sockbuf_IO *sbio, int layer, void *arg))
ber_sockbuf_remove_io LDAP_P ((Sockbuf *sb, Sockbuf_IO *sbio, int layer))
ber_sockbuf_ctrl LDAP_P ((Sockbuf *sb, int opt, void *arg))
 LBER_V (Sockbuf_IO) ber_sockbuf_io_tcp
ber_memalloc LDAP_P ((ber_len_t s))
ber_memrealloc LDAP_P ((void *p, ber_len_t s))
ber_memcalloc LDAP_P ((ber_len_t n, ber_len_t s))
ber_memfree LDAP_P ((void *p))
ber_memvfree LDAP_P ((void **vector))
ber_bvecfree LDAP_P ((struct berval **bv))
ber_bvecadd LDAP_P ((struct berval ***bvec, struct berval *bv))
ber_dupbv LDAP_P ((struct berval *dst, struct berval *src))
ber_bvdup LDAP_P ((struct berval *src))
ber_mem2bv LDAP_P ((LDAP_CONST char *, ber_len_t len, int duplicate, struct berval *bv))
ber_strdup LDAP_P ((LDAP_CONST char *))
ber_strnlen LDAP_P ((LDAP_CONST char *s, ber_len_t len))
ber_strndup LDAP_P ((LDAP_CONST char *s, ber_len_t l))
ber_bvreplace LDAP_P ((struct berval *dst, LDAP_CONST struct berval *src))
ber_bvarray_free LDAP_P ((BerVarray p))
ber_bvarray_add LDAP_P ((BerVarray *p, BerValue *bv))
 LBER_F (int *) ber_errno_addr LDAP_P((void))

Class Documentation

struct lber_memory_fns

Definition at line 126 of file lber.h.

Class Members
BER_MEMCALLOC_FN * bmf_calloc
BER_MEMFREE_FN * bmf_free
BER_MEMALLOC_FN * bmf_malloc
BER_MEMREALLOC_FN * bmf_realloc
struct sockbuf_io_desc

Definition at line 177 of file lber.h.

Collaboration diagram for sockbuf_io_desc:
Class Members
Sockbuf_IO * sbiod_io
int sbiod_level
struct sockbuf_io_desc * sbiod_next
void * sbiod_pvt
Sockbuf * sbiod_sb
struct berval

Definition at line 212 of file lber.h.

Class Members
ber_len_t bv_len
char * bv_val

Define Documentation

#define ber_bvcmp (   v1,
((v1)->bv_len < (v2)->bv_len \
              ? -1 : ((v1)->bv_len > (v2)->bv_len \
                     ? 1 : memcmp((v1)->bv_val, (v2)->bv_val, (v1)->bv_len) ))

Definition at line 664 of file lber.h.

#define ber_bvstr (   a)    ((ber_str2bv)((a), 0, 0, NULL))

Definition at line 639 of file lber.h.

#define ber_bvstrdup (   a)    ((ber_str2bv)((a), 0, 1, NULL))

Definition at line 640 of file lber.h.

#define ber_errno   (*(ber_errno_addr)())

Definition at line 673 of file lber.h.

#define LBER_BIG_TAG_MASK   ((ber_tag_t) 0x1fU)

Definition at line 71 of file lber.h.

#define LBER_BITSTRING   ((ber_tag_t) 0x03UL)

Definition at line 85 of file lber.h.

#define LBER_BOOLEAN   ((ber_tag_t) 0x01UL)

Definition at line 83 of file lber.h.

#define LBER_BV_ALLOC   0x01 /* allocate/copy result, otherwise in-place */

Definition at line 284 of file lber.h.

#define LBER_BV_NOTERM   0x02 /* omit NUL-terminator if parsing in-place */

Definition at line 285 of file lber.h.

#define LBER_BV_STRING   0x04 /* fail if berval contains embedded \0 */

Definition at line 286 of file lber.h.

#define LBER_CLASS_APPLICATION   ((ber_tag_t) 0x40U)

Definition at line 61 of file lber.h.

#define LBER_CLASS_CONTEXT   ((ber_tag_t) 0x80U)

Definition at line 62 of file lber.h.

#define LBER_CLASS_MASK   ((ber_tag_t) 0xc0U)

Definition at line 64 of file lber.h.

#define LBER_CLASS_PRIVATE   ((ber_tag_t) 0xc0U)

Definition at line 63 of file lber.h.

#define LBER_CLASS_UNIVERSAL   ((ber_tag_t) 0x00U)

Definition at line 60 of file lber.h.

#define LBER_CONSTRUCTED   ((ber_tag_t) 0x20U)

Definition at line 68 of file lber.h.

#define LBER_DEFAULT   ((ber_tag_t) -1)

Definition at line 80 of file lber.h.

#define LBER_ENCODING_MASK   ((ber_tag_t) 0x20U)

Definition at line 69 of file lber.h.

#define LBER_ENUMERATED   ((ber_tag_t) 0x0aUL)

Definition at line 88 of file lber.h.

#define LBER_ERROR   ((ber_tag_t) -1)

Definition at line 79 of file lber.h.

#define LBER_ERROR_MEMORY   0x2

Definition at line 677 of file lber.h.

#define LBER_ERROR_NONE   0

Definition at line 675 of file lber.h.

#define LBER_ERROR_PARAM   0x1

Definition at line 676 of file lber.h.

Definition at line 469 of file lber.h.

#define LBER_FLUSH_FREE_NEVER   (0x0) /* traditional behavior */

Definition at line 466 of file lber.h.

#define LBER_FLUSH_FREE_ON_ERROR   (0x2)

Definition at line 468 of file lber.h.

#define LBER_FLUSH_FREE_ON_SUCCESS   (0x1) /* traditional behavior */

Definition at line 467 of file lber.h.

#define LBER_INTEGER   ((ber_tag_t) 0x02UL)

Definition at line 84 of file lber.h.

#define LBER_MORE_TAG_MASK   ((ber_tag_t) 0x80U)

Definition at line 72 of file lber.h.

#define LBER_NULL   ((ber_tag_t) 0x05UL)

Definition at line 87 of file lber.h.

#define LBER_OCTETSTRING   ((ber_tag_t) 0x04UL)

Definition at line 86 of file lber.h.


Definition at line 100 of file lber.h.

#define LBER_OPT_BER_DEBUG   0x02

Definition at line 97 of file lber.h.

#define LBER_OPT_BER_MEMCTX   0x06

Definition at line 101 of file lber.h.

#define LBER_OPT_BER_OPTIONS   0x01

Definition at line 96 of file lber.h.


Definition at line 98 of file lber.h.


Definition at line 99 of file lber.h.

Definition at line 106 of file lber.h.

Definition at line 103 of file lber.h.

#define LBER_OPT_ERROR   (-1)

Definition at line 169 of file lber.h.

#define LBER_OPT_ERROR_FN   0x8003

Definition at line 110 of file lber.h.

#define LBER_OPT_LOG_PRINT_FILE   0x8004

Definition at line 111 of file lber.h.

#define LBER_OPT_LOG_PRINT_FN   0x8001

Definition at line 108 of file lber.h.

#define LBER_OPT_LOG_PROC   0x8006 /* for external logging function */

Definition at line 115 of file lber.h.

#define LBER_OPT_MEMORY_FNS   0x8002

Definition at line 109 of file lber.h.

#define LBER_OPT_MEMORY_INUSE   0x8005 /* for memory debugging */

Definition at line 114 of file lber.h.

#define LBER_OPT_OFF   ((void *) 0)

Definition at line 166 of file lber.h.

#define LBER_OPT_ON   ((void *) &ber_pvt_opt_on)

Definition at line 165 of file lber.h.

Definition at line 104 of file lber.h.

#define LBER_OPT_SOCKBUF_DEBUG   0x1002

Definition at line 161 of file lber.h.

#define LBER_OPT_SOCKBUF_DESC   0x1000

Definition at line 159 of file lber.h.


Definition at line 160 of file lber.h.

#define LBER_OPT_SUCCESS   (0)

Definition at line 168 of file lber.h.

Definition at line 105 of file lber.h.

#define LBER_PRIMITIVE   ((ber_tag_t) 0x00U)

Definition at line 67 of file lber.h.


Definition at line 139 of file lber.h.

#define LBER_SB_OPT_DRAIN   10

Definition at line 141 of file lber.h.

#define LBER_SB_OPT_GET_FD   1

Definition at line 134 of file lber.h.

Definition at line 144 of file lber.h.

#define LBER_SB_OPT_GET_SSL   7

Definition at line 138 of file lber.h.

#define LBER_SB_OPT_HAS_IO   3

Definition at line 136 of file lber.h.


Definition at line 142 of file lber.h.


Definition at line 143 of file lber.h.

#define LBER_SB_OPT_OPT_MAX   15

Definition at line 151 of file lber.h.

#define LBER_SB_OPT_SET_FD   2

Definition at line 135 of file lber.h.

Definition at line 145 of file lber.h.


Definition at line 137 of file lber.h.


Definition at line 140 of file lber.h.

#define LBER_SB_OPT_UNGET_BUF   15

Definition at line 148 of file lber.h.

#define LBER_SBIOD_CTRL_NEXT (   sbiod,
( (sbiod)->sbiod_next ? \
              ( (sbiod)->sbiod_next->sbiod_io->sbi_ctrl( \
              (sbiod)->sbiod_next, opt, arg ) ) : 0 )

Definition at line 206 of file lber.h.

Definition at line 156 of file lber.h.


Definition at line 154 of file lber.h.


Definition at line 155 of file lber.h.

#define LBER_SBIOD_READ_NEXT (   sbiod,
( (sbiod)->sbiod_next->sbiod_io->sbi_read( (sbiod)->sbiod_next, \
              buf, len ) )

Definition at line 200 of file lber.h.

#define LBER_SBIOD_WRITE_NEXT (   sbiod,
( (sbiod)->sbiod_next->sbiod_io->sbi_write( (sbiod)->sbiod_next, \
              buf, len ) )

Definition at line 203 of file lber.h.

#define LBER_SEQUENCE   ((ber_tag_t) 0x30UL) /* constructed */

Definition at line 89 of file lber.h.

#define LBER_SET   ((ber_tag_t) 0x31UL) /* constructed */

Definition at line 90 of file lber.h.

#define LBER_USE_DER   0x01

Definition at line 93 of file lber.h.

Typedef Documentation

typedef struct berelement

Definition at line 171 of file lber.h.

typedef struct berval BerValue
typedef BerValue* BerVarray

Definition at line 217 of file lber.h.

Definition at line 124 of file lber.h.

typedef int BEREncodeCallback LDAP_P((BerElement *ber,void *data))

Definition at line 117 of file lber.h.

typedef struct sockbuf

Definition at line 172 of file lber.h.

typedef struct sockbuf_io

Definition at line 174 of file lber.h.

Function Documentation

LBER_F ( int )
LBER_V ( char  )
LBER_V ( Sockbuf_IO  )
ber_dump LDAP_P ( (BerElement *ber, int inout)  )
ber_get_tag LDAP_P ( (BerElement *ber )
ber_skip_tag LDAP_P ( (BerElement *ber, ber_len_t *len )
ber_skip_element LDAP_P ( (BerElement *ber, struct berval *bv )
ber_peek_element LDAP_P ( (LDAP_CONST BerElement *ber, struct berval *bv )
ber_get_int LDAP_P ( (BerElement *ber, ber_int_t *num )
ber_get_stringb LDAP_P ( (BerElement *ber, char *buf, ber_len_t *len )
ber_get_stringbv LDAP_P ( (BerElement *ber, struct berval *bv, int options )
ber_get_stringa LDAP_P ( (BerElement *ber, char **buf )
ber_get_stringal LDAP_P ( (BerElement *ber, struct berval **bv )
ber_get_bitstringa LDAP_P ( (BerElement *ber, char **buf, ber_len_t *len )
ber_get_boolean LDAP_P ( (BerElement *ber, ber_int_t *boolval)  )
ber_first_element LDAP_P ( (BerElement *ber, ber_len_t *len, char **last )
ber_next_element LDAP_P ( (BerElement *ber, ber_len_t *len, LDAP_CONST char *last )
ber_scanf LDAP_P ( (BerElement *ber, LDAP_CONST char *fmt,...)  )
ber_decode_oid LDAP_P ( (struct berval *in, struct berval *out )
ber_put_enum LDAP_P ( (BerElement *ber, ber_int_t num, ber_tag_t tag )
ber_put_ostring LDAP_P ( (BerElement *ber, LDAP_CONST char *str, ber_len_t len, ber_tag_t tag )
ber_put_berval LDAP_P ( (BerElement *ber, struct berval *bv, ber_tag_t tag )
ber_put_string LDAP_P ( (BerElement *ber, LDAP_CONST char *str, ber_tag_t tag )
ber_put_bitstring LDAP_P ( (BerElement *ber, LDAP_CONST char *str, ber_len_t bitlen, ber_tag_t tag )
ber_put_null LDAP_P ( (BerElement *ber, ber_tag_t tag )
ber_put_boolean LDAP_P ( (BerElement *ber, ber_int_t boolval, ber_tag_t tag )
ber_skip_data LDAP_P ( (BerElement *ber, ber_len_t len )
ber_read LDAP_P ( (BerElement *ber, char *buf, ber_len_t len )
ber_write LDAP_P ( (BerElement *ber, LDAP_CONST char *buf, ber_len_t len, int zero)  )
ber_free LDAP_P ( (BerElement *ber, int freebuf)  )
ber_flush2 LDAP_P ( (Sockbuf *sb, BerElement *ber, int freeit )
ber_alloc_t LDAP_P ( (int beroptions)  )
ber_get_next LDAP_P ( (Sockbuf *sb, ber_len_t *len, BerElement *ber )
ber_init_w_nullc LDAP_P ( (BerElement *ber, int options )
ber_reset LDAP_P ( (BerElement *ber, int was_writing)  )
ber_init LDAP_P ( (struct berval *bv )
ber_flatten LDAP_P ( (BerElement *ber, struct berval **bvPtr)  )
ber_flatten2 LDAP_P ( (BerElement *ber, struct berval *bv, int alloc)  )
ber_get_option LDAP_P ( (void *item, int option, void *outvalue)  )
ber_set_option LDAP_P ( (void *item, int option, LDAP_CONST void *invalue)  )
ber_sockbuf_free LDAP_P ( (Sockbuf *sb )
ber_sockbuf_add_io LDAP_P ( (Sockbuf *sb, Sockbuf_IO *sbio, int layer, void *arg )
ber_sockbuf_remove_io LDAP_P ( (Sockbuf *sb, Sockbuf_IO *sbio, int layer)  )
ber_sockbuf_ctrl LDAP_P ( (Sockbuf *sb, int opt, void *arg )
ber_memfree LDAP_P ( (void *p)  )
ber_memvfree LDAP_P ( (void **vector)  )
ber_bvecfree LDAP_P ( (struct berval **bv )
ber_bvecadd LDAP_P ( (struct berval ***bvec, struct berval *bv )
ber_dupbv LDAP_P ( (struct berval *dst, struct berval *src )
ber_bvdup LDAP_P ( (struct berval *src )
ber_mem2bv LDAP_P ( (LDAP_CONST char *, ber_len_t len, int duplicate, struct berval *bv )
ber_strdup LDAP_P ( (LDAP_CONST char *)  )
ber_bvreplace LDAP_P ( (struct berval *dst, LDAP_CONST struct berval *src )
typedef void ( BER_MEMFREE_FN  )