⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 db.in

📁 这是国外的resip协议栈
💻 IN
📖 第 1 页 / 共 5 页
字号:
/* * See the file LICENSE for redistribution information. * * Copyright (c) 1996-2004 *	Sleepycat Software.  All rights reserved. * * $Id: db.in,v 11.463 2004/10/11 18:47:50 bostic Exp $ * * db.h include file layout: *	General. *	Database Environment. *	Locking subsystem. *	Logging subsystem. *	Shared buffer cache (mpool) subsystem. *	Transaction subsystem. *	Access methods. *	Access method cursors. *	Dbm/Ndbm, Hsearch historic interfaces. */#ifndef _DB_H_#define	_DB_H_#ifndef __NO_SYSTEM_INCLUDES#include <sys/types.h>@inttypes_h_decl@@stdint_h_decl@@stddef_h_decl@#include <stdio.h>#endif#if defined(__cplusplus)extern "C" {#endif@DB_CONST@@DB_PROTO1@@DB_PROTO2@/* * Berkeley DB version information. */#define	DB_VERSION_MAJOR	@DB_VERSION_MAJOR@#define	DB_VERSION_MINOR	@DB_VERSION_MINOR@#define	DB_VERSION_PATCH	@DB_VERSION_PATCH@#define	DB_VERSION_STRING	@DB_VERSION_STRING@/* * !!! * Berkeley DB uses specifically sized types.  If they're not provided by * the system, typedef them here. * * We protect them against multiple inclusion using __BIT_TYPES_DEFINED__, * as does BIND and Kerberos, since we don't know for sure what #include * files the user is using. * * !!! * We also provide the standard u_int, u_long etc., if they're not provided * by the system. */#ifndef	__BIT_TYPES_DEFINED__#define	__BIT_TYPES_DEFINED__@u_int8_decl@@int16_decl@@u_int16_decl@@int32_decl@@u_int32_decl@@int64_decl@@u_int64_decl@#endif@u_char_decl@@u_short_decl@@u_int_decl@@u_long_decl@@ssize_t_decl@/* * uintmax_t -- * Largest unsigned type, used to align structures in memory.  We don't store * floating point types in structures, so integral types should be sufficient * (and we don't have to worry about systems that store floats in other than * power-of-2 numbers of bytes).  Additionally this fixes compilers that rewrite * structure assignments and ANSI C memcpy calls to be in-line instructions * that happen to require alignment.  Note: this alignment isn't sufficient for * mutexes, which depend on things like cache line alignment.  Mutex alignment * is handled separately, in mutex.h. * * uintptr_t -- * Unsigned type that's the same size as a pointer.  There are places where * DB modifies pointers by discarding the bottom bits to guarantee alignment. * We can't use uintmax_t, it may be larger than the pointer, and compilers * get upset about that.  So far we haven't run on any machine where there's * no unsigned type the same size as a pointer -- here's hoping. */@uintmax_t_decl@@uintptr_t_decl@/* * Sequences are only available on machines with 64-bit integral types. */@db_seq_decl@/* Basic types that are exported or quasi-exported. */typedef	u_int32_t	db_pgno_t;	/* Page number type. */typedef	u_int16_t	db_indx_t;	/* Page offset type. */#define	DB_MAX_PAGES	0xffffffff	/* >= # of pages in a file */typedef	u_int32_t	db_recno_t;	/* Record number type. */#define	DB_MAX_RECORDS	0xffffffff	/* >= # of records in a tree */typedef u_int32_t	db_timeout_t;	/* Type of a timeout. *//* * Region offsets are the difference between a pointer in a region and the * region's base address.  With private environments, both addresses are the * result of calling malloc, and we can't assume anything about what malloc * will return, so region offsets have to be able to hold differences between * arbitrary pointers. */typedef	uintptr_t	roff_t;/* * Forward structure declarations, so we can declare pointers and * applications can get type checking. */struct __db;		typedef struct __db DB;struct __db_bt_stat;	typedef struct __db_bt_stat DB_BTREE_STAT;struct __db_cipher;	typedef struct __db_cipher DB_CIPHER;struct __db_dbt;	typedef struct __db_dbt DBT;struct __db_env;	typedef struct __db_env DB_ENV;struct __db_h_stat;	typedef struct __db_h_stat DB_HASH_STAT;struct __db_ilock;	typedef struct __db_ilock DB_LOCK_ILOCK;struct __db_lock_stat;	typedef struct __db_lock_stat DB_LOCK_STAT;struct __db_lock_u;	typedef struct __db_lock_u DB_LOCK;struct __db_lockreq;	typedef struct __db_lockreq DB_LOCKREQ;struct __db_log_cursor;	typedef struct __db_log_cursor DB_LOGC;struct __db_log_stat;	typedef struct __db_log_stat DB_LOG_STAT;struct __db_lsn;	typedef struct __db_lsn DB_LSN;struct __db_mpool;	typedef struct __db_mpool DB_MPOOL;struct __db_mpool_fstat;typedef struct __db_mpool_fstat DB_MPOOL_FSTAT;struct __db_mpool_stat;	typedef struct __db_mpool_stat DB_MPOOL_STAT;struct __db_mpoolfile;	typedef struct __db_mpoolfile DB_MPOOLFILE;struct __db_preplist;	typedef struct __db_preplist DB_PREPLIST;struct __db_qam_stat;	typedef struct __db_qam_stat DB_QUEUE_STAT;struct __db_rep;	typedef struct __db_rep DB_REP;struct __db_rep_stat;	typedef struct __db_rep_stat DB_REP_STAT;struct __db_sequence;	typedef struct __db_sequence DB_SEQUENCE;struct __db_seq_record; typedef struct __db_seq_record DB_SEQ_RECORD;struct __db_seq_stat;	typedef struct __db_seq_stat DB_SEQUENCE_STAT;struct __db_txn;	typedef struct __db_txn DB_TXN;struct __db_txn_active;	typedef struct __db_txn_active DB_TXN_ACTIVE;struct __db_txn_stat;	typedef struct __db_txn_stat DB_TXN_STAT;struct __db_txnmgr;	typedef struct __db_txnmgr DB_TXNMGR;struct __dbc;		typedef struct __dbc DBC;struct __dbc_internal;	typedef struct __dbc_internal DBC_INTERNAL;struct __fh_t;		typedef struct __fh_t DB_FH;struct __fname;		typedef struct __fname FNAME;struct __key_range;	typedef struct __key_range DB_KEY_RANGE;struct __mpoolfile;	typedef struct __mpoolfile MPOOLFILE;struct __mutex_t;	typedef struct __mutex_t DB_MUTEX;/* Key/data structure -- a Data-Base Thang. */struct __db_dbt {	/*	 * data/size must be fields 1 and 2 for DB 1.85 compatibility.	 */	void	 *data;			/* Key/data */	u_int32_t size;			/* key/data length */	u_int32_t ulen;			/* RO: length of user buffer. */	u_int32_t dlen;			/* RO: get/put record length. */	u_int32_t doff;			/* RO: get/put record offset. */#define	DB_DBT_APPMALLOC	0x001	/* Callback allocated memory. */#define	DB_DBT_ISSET		0x002	/* Lower level calls set value. */#define	DB_DBT_MALLOC		0x004	/* Return in malloc'd memory. */#define	DB_DBT_PARTIAL		0x008	/* Partial put/get. */#define	DB_DBT_REALLOC		0x010	/* Return in realloc'd memory. */#define	DB_DBT_USERMEM		0x020	/* Return in user's memory. */#define	DB_DBT_DUPOK		0x040	/* Insert if duplicate. */	u_int32_t flags;};/* * Common flags -- *	Interfaces which use any of these common flags should never have *	interface specific flags in this range. */#define	DB_CREATE	      0x0000001	/* Create file as necessary. */#define	DB_CXX_NO_EXCEPTIONS  0x0000002	/* C++: return error values. */#define	DB_FORCE	      0x0000004	/* Force (anything). */#define	DB_NOMMAP	      0x0000008	/* Don't mmap underlying file. */#define	DB_RDONLY	      0x0000010	/* Read-only (O_RDONLY). */#define	DB_RECOVER	      0x0000020	/* Run normal recovery. */#define	DB_THREAD	      0x0000040	/* Applications are threaded. */#define	DB_TRUNCATE	      0x0000080	/* Discard existing DB (O_TRUNC). */#define	DB_TXN_NOSYNC	      0x0000100	/* Do not sync log on commit. */#define	DB_TXN_NOT_DURABLE    0x0000200	/* Do not log changes. */#define	DB_USE_ENVIRON	      0x0000400	/* Use the environment. */#define	DB_USE_ENVIRON_ROOT   0x0000800	/* Use the environment if root. *//* * Common flags -- *	Interfaces which use any of these common flags should never have *	interface specific flags in this range. * * DB_AUTO_COMMIT: *	DB_ENV->set_flags, DB->associate, DB->del, DB->put, DB->open, *	DB->remove, DB->rename, DB->truncate * DB_DEGREE_2: *	DB->cursor, DB->get, DB->join, DBcursor->c_get, DB_ENV->txn_begin * DB_DIRTY_READ: *	DB->cursor, DB->get, DB->join, DB->open, DBcursor->c_get, *	DB_ENV->txn_begin * DB_NOAUTO_COMMIT *	DB->associate, DB->del, DB->put, DB->open, *	DB->remove, DB->rename, DB->truncate * * !!! * The DB_DIRTY_READ and DB_DEGREE_2 bit masks can't be changed without * also changing the masks for the flags that can be OR'd into DB * access method and cursor operation values. */#define	DB_AUTO_COMMIT	      0x01000000/* Implied transaction. */#define	DB_DEGREE_2	      0x02000000/* Degree 2. */#define	DB_DIRTY_READ	      0x04000000/* Dirty Read. */#define	DB_NO_AUTO_COMMIT     0x08000000/* Override env-wide AUTOCOMMIT. *//* * Flags private to db_env_create. */#define	DB_RPCCLIENT	      0x0000001	/* An RPC client environment. *//* * Flags private to db_create. */#define	DB_REP_CREATE	      0x0000001	/* Open of an internal rep database. */#define	DB_XA_CREATE	      0x0000002	/* Open in an XA environment. *//* * Flags private to DB_ENV->open. *	   Shared flags up to 0x0000800 */#define	DB_INIT_CDB	      0x0001000	/* Concurrent Access Methods. */#define	DB_INIT_LOCK	      0x0002000	/* Initialize locking. */#define	DB_INIT_LOG	      0x0004000	/* Initialize logging. */#define	DB_INIT_MPOOL	      0x0008000	/* Initialize mpool. */#define	DB_INIT_REP	      0x0010000	/* Initialize replication. */#define	DB_INIT_TXN	      0x0020000	/* Initialize transactions. */#define	DB_JOINENV	      0x0040000	/* Initialize all subsystems present. */#define	DB_LOCKDOWN	      0x0080000	/* Lock memory into physical core. */#define	DB_PRIVATE	      0x0100000	/* DB_ENV is process local. */#define	DB_RECOVER_FATAL      0x0200000	/* Run catastrophic recovery. */#define	DB_SYSTEM_MEM	      0x0400000	/* Use system-backed memory. *//* * Flags private to DB->open. *	   Shared flags up to 0x0000800 */#define	DB_EXCL		      0x0001000	/* Exclusive open (O_EXCL). */#define	DB_FCNTL_LOCKING      0x0002000	/* UNDOC: fcntl(2) locking. */#define	DB_RDWRMASTER	      0x0004000	/* UNDOC: allow subdb master open R/W */#define	DB_WRITEOPEN	      0x0008000	/* UNDOC: open with write lock. *//* * Flags private to DB_ENV->txn_begin. *	   Shared flags up to 0x0000800 */#define	DB_TXN_NOWAIT	      0x0001000	/* Do not wait for locks in this TXN. */#define	DB_TXN_SYNC	      0x0002000	/* Always sync log on commit. *//* * Flags private to DB_ENV->set_encrypt. */#define	DB_ENCRYPT_AES	      0x0000001	/* AES, assumes SHA1 checksum *//* * Flags private to DB_ENV->set_flags. *	   Shared flags up to 0x00000800 */#define	DB_CDB_ALLDB	      0x00001000/* Set CDB locking per environment. */#define	DB_DIRECT_DB	      0x00002000/* Don't buffer databases in the OS. */#define	DB_DIRECT_LOG	      0x00004000/* Don't buffer log files in the OS. */#define	DB_DSYNC_LOG	      0x00008000/* Set O_DSYNC on the log. */#define	DB_LOG_AUTOREMOVE     0x00010000/* Automatically remove log files. */#define	DB_LOG_INMEMORY       0x00020000/* Store logs in buffers in memory. */#define	DB_NOLOCKING	      0x00040000/* Set locking/mutex behavior. */#define	DB_NOPANIC	      0x00080000/* Set panic state per DB_ENV. */#define	DB_OVERWRITE	      0x00100000/* Overwrite unlinked region files. */#define	DB_PANIC_ENVIRONMENT  0x00200000/* Set panic state per environment. */#define	DB_REGION_INIT	      0x00400000/* Page-fault regions on open. */#define	DB_TIME_NOTGRANTED    0x00800000/* Return NOTGRANTED on timeout. *//*	      Shared flags at 0x01000000 *//*	      Shared flags at 0x02000000 *//*	      Shared flags at 0x04000000 *//*	      Shared flags at 0x08000000 */#define	DB_TXN_WRITE_NOSYNC   0x10000000/* Write, don't sync, on txn commit. */#define	DB_YIELDCPU	      0x20000000/* Yield the CPU (a lot). *//* * Flags private to DB->set_feedback's callback. */#define	DB_UPGRADE	      0x0000001	/* Upgrading. */#define	DB_VERIFY	      0x0000002	/* Verifying. *//* * Flags private to DB_MPOOLFILE->open. *	   Shared flags up to 0x0000800 */#define	DB_DIRECT	      0x0001000	/* Don't buffer the file in the OS. */#define	DB_DURABLE_UNKNOWN    0x0002000 /* internal: durability on open. */#define	DB_EXTENT	      0x0004000	/* internal: dealing with an extent. */#define	DB_ODDFILESIZE	      0x0008000	/* Truncate file to N * pgsize. *//* * Flags private to DB->set_flags. */#define	DB_CHKSUM	      0x0000001	/* Do checksumming */#define	DB_DUP		      0x0000002	/* Btree, Hash: duplicate keys. */#define	DB_DUPSORT	      0x0000004	/* Btree, Hash: duplicate keys. */#define	DB_ENCRYPT	      0x0000008	/* Btree, Hash: duplicate keys. */#define	DB_INORDER	      0x0000010	/* Queue: strict ordering on consume. */#define	DB_RECNUM	      0x0000020	/* Btree: record numbers. */#define	DB_RENUMBER	      0x0000040	/* Recno: renumber on insert/delete. */#define	DB_REVSPLITOFF	      0x0000080	/* Btree: turn off reverse splits. */#define	DB_SNAPSHOT	      0x0000100	/* Recno: snapshot the input. *//* * Flags private to the DB_ENV->stat_print, DB->stat and DB->stat_print methods. */#define	DB_STAT_ALL	      0x0000001	/* Print: Everything. */#define	DB_STAT_CLEAR	      0x0000002	/* Clear stat after returning values. */#define	DB_STAT_LOCK_CONF     0x0000004	/* Print: Lock conflict matrix. */#define	DB_STAT_LOCK_LOCKERS  0x0000008	/* Print: Lockers. */#define	DB_STAT_LOCK_OBJECTS  0x0000010	/* Print: Lock objects. */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -