Back to index

openldap  2.4.31
Classes | Defines | Typedefs | Functions
midl.h File Reference

ldap bdb back-end ID List header file. More...

#include <stddef.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  ID2
 An ID2 is an ID/pointer pair. More...


#define NOID   (~(ID)0)
#define MDB_IDL_LOGN   16 /* DB_SIZE is 2^16, UM_SIZE is 2^17 */
#define MDB_IDL_UM_SIZE   (1<<(MDB_IDL_LOGN+1))
#define MDB_IDL_UM_SIZEOF   (MDB_IDL_UM_SIZE * sizeof(ID))
#define MDB_IDL_IS_RANGE(ids)   ((ids)[0] == NOID)
#define MDB_IDL_RANGE_SIZE   (3)
#define MDB_IDL_SIZEOF(ids)
#define MDB_IDL_RANGE_FIRST(ids)   ((ids)[1])
#define MDB_IDL_RANGE_LAST(ids)   ((ids)[2])
#define MDB_IDL_RANGE(ids, f, l)
#define MDB_IDL_ZERO(ids)
#define MDB_IDL_IS_ZERO(ids)   ( (ids)[0] == 0 )
#define MDB_IDL_IS_ALL(range, ids)
#define MDB_IDL_CPY(dst, src)   (memcpy( dst, src, MDB_IDL_SIZEOF( src ) ))
#define MDB_IDL_ID(bdb, ids, id)   MDB_IDL_RANGE( ids, id, ((bdb)->bi_lastid) )
#define MDB_IDL_ALL(bdb, ids)   MDB_IDL_RANGE( ids, 1, ((bdb)->bi_lastid) )
#define MDB_IDL_FIRST(ids)   ( (ids)[1] )
#define MDB_IDL_LAST(ids)
#define MDB_IDL_N(ids)


typedef size_t ID
 A generic ID number.
typedef IDIDL
 An IDL is an ID List, a sorted array of IDs.
typedef struct ID2 ID2
 An ID2 is an ID/pointer pair.
typedef ID2ID2L
 An ID2L is an ID2 List, a sorted array of ID2s.


IDL mdb_midl_alloc ()
 Allocate an IDL.
void mdb_midl_free (IDL ids)
 Free an IDL.
int mdb_midl_shrink (IDL *idp)
 Shrink an IDL.
int mdb_midl_append (IDL *idp, ID id)
 Append an ID onto an IDL.
int mdb_midl_append_list (IDL *idp, IDL app)
 Append an IDL onto an IDL.
void mdb_midl_sort (IDL ids)
 Sort an IDL.
unsigned mdb_mid2l_search (ID2L ids, ID id)
 Search for an ID in an ID2L.
int mdb_mid2l_insert (ID2L ids, ID2 *id)
 Insert an ID2 into a ID2L.

Detailed Description

ldap bdb back-end ID List header file.

This file was originally part of back-bdb but has been modified for use in libmdb. Most of the macros defined in this file are unused, just left over from the original.

This file is only used internally in libmdb and its definitions are not exposed publicly.

Definition in file midl.h.