Asterisk - The Open Source Telephony Project GIT-master-0644429
Data Structures | Macros | Typedefs | Enumerations | Functions
db.h File Reference
#include <sys/types.h>
#include <limits.h>
Include dependency graph for db.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  __db
 
struct  BTREEINFO
 
struct  DBT
 
struct  HASHINFO
 
struct  RECNOINFO
 

Macros

#define __BIT_TYPES_DEFINED__
 
#define __R_UNUSED   2 /* UNUSED */
 
#define BTREEMAGIC   0x053162
 
#define BTREEVERSION   3
 
#define DB_LOCK   0x2000 /* Do locking. */
 
#define DB_SHMEM   0x4000 /* Use shared memory. */
 
#define DB_TXN   0x8000 /* Do transactions. */
 
#define HASHMAGIC   0x061561
 
#define HASHVERSION   2
 
#define MAX_PAGE_NUMBER   0xffffffff /* >= # of pages in a file */
 
#define MAX_PAGE_OFFSET   65535 /* >= # of bytes in a page */
 
#define MAX_REC_NUMBER   0xffffffff /* >= # of records in a tree */
 
#define R_CURSOR   1 /* del, put, seq */
 
#define R_DUP   0x01 /* duplicate keys */
 
#define R_FIRST   3 /* seq */
 
#define R_FIXEDLEN   0x01 /* fixed-length records */
 
#define R_IAFTER   4 /* put (RECNO) */
 
#define R_IBEFORE   5 /* put (RECNO) */
 
#define R_LAST   6 /* seq (BTREE, RECNO) */
 
#define R_NEXT   7 /* seq */
 
#define R_NOKEY   0x02 /* key not required */
 
#define R_NOOVERWRITE   8 /* put */
 
#define R_PREV   9 /* seq (BTREE, RECNO) */
 
#define R_RECNOSYNC   11 /* sync (RECNO) */
 
#define R_SETCURSOR   10 /* put (RECNO) */
 
#define R_SNAPSHOT   0x04 /* snapshot the input */
 
#define RET_ERROR   -1 /* Return values. */
 
#define RET_SPECIAL   1
 
#define RET_SUCCESS   0
 

Typedefs

typedef struct __db DB
 
typedef u_int16_t indx_t
 
typedef short int16_t
 
typedef int int32_t
 
typedef __signed char int8_t
 
typedef u_int32_t pgno_t
 
typedef u_int32_t recno_t
 
typedef unsigned short u_int16_t
 
typedef unsigned int u_int32_t
 
typedef unsigned char u_int8_t
 

Enumerations

enum  DBTYPE { DB_BTREE , DB_HASH , DB_RECNO }
 

Functions

__BEGIN_DECLS DB *__dbopen __P ((const char *, int, int, DBTYPE, const void *))
 

Macro Definition Documentation

◆ __BIT_TYPES_DEFINED__

#define __BIT_TYPES_DEFINED__

Definition at line 56 of file db.h.

◆ __R_UNUSED

#define __R_UNUSED   2 /* UNUSED */

Definition at line 92 of file db.h.

◆ BTREEMAGIC

#define BTREEMAGIC   0x053162

Definition at line 141 of file db.h.

◆ BTREEVERSION

#define BTREEVERSION   3

Definition at line 142 of file db.h.

◆ DB_LOCK

#define DB_LOCK   0x2000 /* Do locking. */

Definition at line 123 of file db.h.

◆ DB_SHMEM

#define DB_SHMEM   0x4000 /* Use shared memory. */

Definition at line 124 of file db.h.

◆ DB_TXN

#define DB_TXN   0x8000 /* Do transactions. */

Definition at line 125 of file db.h.

◆ HASHMAGIC

#define HASHMAGIC   0x061561

Definition at line 159 of file db.h.

◆ HASHVERSION

#define HASHVERSION   2

Definition at line 160 of file db.h.

◆ MAX_PAGE_NUMBER

#define MAX_PAGE_NUMBER   0xffffffff /* >= # of pages in a file */

Definition at line 77 of file db.h.

◆ MAX_PAGE_OFFSET

#define MAX_PAGE_OFFSET   65535 /* >= # of bytes in a page */

Definition at line 79 of file db.h.

◆ MAX_REC_NUMBER

#define MAX_REC_NUMBER   0xffffffff /* >= # of records in a tree */

Definition at line 81 of file db.h.

◆ R_CURSOR

#define R_CURSOR   1 /* del, put, seq */

Definition at line 91 of file db.h.

◆ R_DUP

#define R_DUP   0x01 /* duplicate keys */

Definition at line 146 of file db.h.

◆ R_FIRST

#define R_FIRST   3 /* seq */

Definition at line 93 of file db.h.

◆ R_FIXEDLEN

#define R_FIXEDLEN   0x01 /* fixed-length records */

Definition at line 175 of file db.h.

◆ R_IAFTER

#define R_IAFTER   4 /* put (RECNO) */

Definition at line 94 of file db.h.

◆ R_IBEFORE

#define R_IBEFORE   5 /* put (RECNO) */

Definition at line 95 of file db.h.

◆ R_LAST

#define R_LAST   6 /* seq (BTREE, RECNO) */

Definition at line 96 of file db.h.

◆ R_NEXT

#define R_NEXT   7 /* seq */

Definition at line 97 of file db.h.

◆ R_NOKEY

#define R_NOKEY   0x02 /* key not required */

Definition at line 176 of file db.h.

◆ R_NOOVERWRITE

#define R_NOOVERWRITE   8 /* put */

Definition at line 98 of file db.h.

◆ R_PREV

#define R_PREV   9 /* seq (BTREE, RECNO) */

Definition at line 99 of file db.h.

◆ R_RECNOSYNC

#define R_RECNOSYNC   11 /* sync (RECNO) */

Definition at line 101 of file db.h.

◆ R_SETCURSOR

#define R_SETCURSOR   10 /* put (RECNO) */

Definition at line 100 of file db.h.

◆ R_SNAPSHOT

#define R_SNAPSHOT   0x04 /* snapshot the input */

Definition at line 177 of file db.h.

◆ RET_ERROR

#define RET_ERROR   -1 /* Return values. */

Definition at line 51 of file db.h.

◆ RET_SPECIAL

#define RET_SPECIAL   1

Definition at line 53 of file db.h.

◆ RET_SUCCESS

#define RET_SUCCESS   0

Definition at line 52 of file db.h.

Typedef Documentation

◆ DB

typedef struct __db DB

◆ indx_t

typedef u_int16_t indx_t

Definition at line 80 of file db.h.

◆ int16_t

typedef short int16_t

Definition at line 59 of file db.h.

◆ int32_t

typedef int int32_t

Definition at line 60 of file db.h.

◆ int8_t

typedef __signed char int8_t

Definition at line 58 of file db.h.

◆ pgno_t

typedef u_int32_t pgno_t

Definition at line 78 of file db.h.

◆ recno_t

typedef u_int32_t recno_t

Definition at line 82 of file db.h.

◆ u_int16_t

typedef unsigned short u_int16_t

Definition at line 62 of file db.h.

◆ u_int32_t

typedef unsigned int u_int32_t

Definition at line 63 of file db.h.

◆ u_int8_t

typedef unsigned char u_int8_t

Definition at line 61 of file db.h.

Enumeration Type Documentation

◆ DBTYPE

enum DBTYPE
Enumerator
DB_BTREE 
DB_HASH 
DB_RECNO 

Definition at line 103 of file db.h.

DBTYPE
Definition: db.h:103
@ DB_BTREE
Definition: db.h:103
@ DB_RECNO
Definition: db.h:103
@ DB_HASH
Definition: db.h:103

Function Documentation

◆ __P()

DB *dbopen __P ( (const char *, int, int, DBTYPE, const void *)  )