# See the file LICENSE for redistribution information.
#
# Copyright (c) 1999-2003
#       Sleepycat Software.  All rights reserved.
#
# $Id: rpc.src,v 1.85 2003/06/30 17:54:49 sue Exp $
#
# Syntax:
# BEGIN	function_name  {CODE | RETCODE | NOFUNC}
#	CODE:	generate XDR and client code, return status
#		Used for functions that just return a status and nothing else.
#	RETCODE:generate XDR and client code, call return function
#		(generate template return function)
#		Used for functions that returns data.
#	NOFUNC:	generate a client "unsupported function" with right args
#		Used for unsupported functions.
#
# ARG	{IGNORE | STRING | INT | DBT | LIST | ID | CONST}  C-type varname
#	IGNORE:	not passed to server
#	STRING:	string passed to server
#	DBT:	DBT arg passed to server
#	LIST:	list passed to server (NULL-terminated list of something)
#	INT:	integer passed to server
#	ID:	cl_id from arg passed to server
#	GID:	global id passed to server
#	CONST:  do not generate COMPQUIET (for NOFUNC only)
# FUNCPROT prototype
# FUNCARG functiontype
#	These two *MUST* go together and FUNCPROT *MUST* be first.  These
#	are for the tricky user-supplied functions to some methods.  They
#	are not supported in RPC, so will be ignored, but the complicated
#	syntax of their argument requires we have a special flag for them
#	that contains the verbatim text to use in the prototype and the
#	c-type, respectively.  The FUNCARG must include the function, and
#	must call it 'funcN', where N is the count of functions.  Almost
#	always it must be func0.  A *very* few methods have more than one
#	user-supplied functions, in those cases, it must be func0, func1, etc.
#
# All messages automatically return "status" and return that from
# the call to the function.  RET's are additional things the server
# may return.  RET is like ARG but does not need the IGNORE option.
# ARETs are RETs which are returned in arguments by the client.
# {RET | ARET}	{STRING | INT | DBT | LIST | ID} varname [GID | INT | ID]
#	STRING:	string from server
#	DBT:	DBT arg from server
#	LIST:	list from server (NULL-terminated list)
#	  Must have list type of GID, ID or INT specified
#	INT:	integer from server
#	ID:	id from server stored in cl_id
# END	function end.

#
# Environment functions
#
BEGIN	env_alloc	NOFUNC
ARG	ID	DB_ENV *	dbenv
FUNCPROT	void *(*)(size_t)
FUNCARG	void *(*func0) __P((size_t))
FUNCPROT	void *(*)(void *, size_t)
FUNCARG	void *(*func1) __P((void *, size_t))
FUNCPROT	void (*)(void *)
FUNCARG	void (*func2) __P((void *))
END
BEGIN	set_app_dispatch	NOFUNC
ARG	ID	DB_ENV *	dbenv
FUNCPROT	int (*)(DB_ENV *, DBT *, DB_LSN *, db_recops)
FUNCARG	int (*func0) __P((DB_ENV *, DBT *, DB_LSN *, db_recops))
END
BEGIN	env_get_cachesize	CODE
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	gbytes
ARET	INT	u_int32_t	bytes
ARET	INT	int		ncache
END
BEGIN	env_cachesize	CODE
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	gbytes
ARG	INT	u_int32_t	bytes
ARG	INT	int		ncache
END
BEGIN	env_close	CODE
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	flags
END
BEGIN	env_create	RETCODE
ARG	IGNORE	DB_ENV *	dbenv
ARG	INT	long		timeout
RET	ID	long		env
END
BEGIN	get_data_dirs	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	STRING	const char ***	dirpp
END
BEGIN	set_data_dir	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	STRING	const char *	dir
END
BEGIN	env_dbremove		CODE
ARG	ID	DB_ENV *	dbenv
ARG	ID	DB_TXN *	txnp
ARG	STRING	const char *	name
ARG	STRING	const char *	subdb
ARG	INT	u_int32_t	flags
END
BEGIN	env_dbrename		CODE
ARG	ID	DB_ENV *	dbenv
ARG	ID	DB_TXN *	txnp
ARG	STRING	const char *	name
ARG	STRING	const char *	subdb
ARG	STRING	const char *	newname
ARG	INT	u_int32_t	flags
END
BEGIN	env_get_encrypt_flags		CODE
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	flags
END
BEGIN	env_encrypt		CODE
ARG	ID	DB_ENV *	dbenv
ARG	STRING	const char *	passwd
ARG	INT	u_int32_t	flags
END
BEGIN	env_set_feedback	NOFUNC
ARG	ID	DB_ENV *	dbenv
FUNCPROT	void (*)(DB_ENV *, int, int)
FUNCARG	void (*func0) __P((DB_ENV *, int, int))
END
BEGIN	env_get_flags	CODE
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	flags
END
BEGIN	env_flags	CODE
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	flags
ARG	INT	int		onoff
END
BEGIN	get_lg_bsize	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	bsize
END
BEGIN	set_lg_bsize	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	bsize
END
BEGIN	get_lg_dir	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	STRING	const char *	dir
END
BEGIN	set_lg_dir	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	STRING	const char *	dir
END
BEGIN	get_lg_max	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	max
END
BEGIN	set_lg_max	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	max
END
BEGIN	get_lg_regionmax	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	max
END
BEGIN	set_lg_regionmax	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	max
END
BEGIN	get_lk_conflicts	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	const u_int8_t **	conflicts
ARG	IGNORE	int *		modes
END
BEGIN	set_lk_conflict	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int8_t *	conflicts
ARG	INT	int		modes
END
BEGIN	get_lk_detect	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	detect
END
BEGIN	set_lk_detect	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	detect
END
BEGIN	set_lk_max	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	max
END
BEGIN	get_lk_max_locks	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	max
END
BEGIN	set_lk_max_locks	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	max
END
BEGIN	get_lk_max_lockers	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	max
END
BEGIN	set_lk_max_lockers	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	max
END
BEGIN	get_lk_max_objects	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	max
END
BEGIN	set_lk_max_objects	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	max
END
BEGIN	get_mp_maxwrite	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	int		nwrite
ARET	INT	int		nsleep
END
BEGIN	set_mp_maxwrite	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	int		nwrite
ARG	INT	int		nsleep
END
BEGIN	get_mp_mmapsize	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	size_t		mmapsize
END
BEGIN	set_mp_mmapsize	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	size_t		mmapsize
END
BEGIN	env_get_home	CODE
ARG	ID	DB_ENV *	dbenv
ARET	STRING	const char *	home
END
BEGIN	env_get_open_flags	CODE
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	flags
END
BEGIN	env_open	RETCODE
ARG	ID	DB_ENV *	dbenv
ARG	STRING	const char *	home
ARG	INT	u_int32_t	flags
ARG	INT	int		mode
RET	ID	long		env
END
BEGIN	env_paniccall	NOFUNC
ARG	ID	DB_ENV *	dbenv
FUNCPROT	void (*)(DB_ENV *, int)
FUNCARG	void (*func0) __P((DB_ENV *, int))
END
BEGIN	env_remove	RETCODE
ARG	ID	DB_ENV *	dbenv
ARG	STRING	const char *	home
ARG	INT	u_int32_t	flags
END
BEGIN	get_shm_key	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	long		shm_key
END
BEGIN	set_shm_key	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	long		shm_key
END
BEGIN	get_tas_spins	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	tas_spins
END
BEGIN	set_tas_spins	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	tas_spins
END
BEGIN	get_timeout	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	timeout
ARG	INT	u_int32_t	flags
END
BEGIN	set_timeout	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	timeout
ARG	INT	u_int32_t	flags
END
BEGIN	get_tmp_dir	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	STRING	const char *	dir
END
BEGIN	set_tmp_dir	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	STRING	const char *	dir
END
BEGIN	get_tx_max	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	max
END
BEGIN	set_tx_max	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	max
END
BEGIN	get_tx_timestamp	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	time_t	max
END
BEGIN	set_tx_timestamp	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	time_t *	max
END
BEGIN	get_verbose	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	which
ARET	INT	int		onoff
END
BEGIN	set_verbose	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	which
ARG	INT	int		onoff
END
#
# Transaction functions
#
BEGIN	txn_abort	RETCODE
ARG	ID	DB_TXN *	txnp
END
BEGIN	txn_begin	RETCODE
ARG	ID	DB_ENV *	dbenv
ARG	ID	DB_TXN *	parent
ARG	IGNORE	DB_TXN **	txnpp
ARG	INT	u_int32_t	flags
RET	ID	long		txnid
END
BEGIN	txn_checkpoint	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	kbyte
ARG	INT	u_int32_t	min
ARG	INT	u_int32_t	flags
END
BEGIN	txn_commit	RETCODE
ARG	ID	DB_TXN *	txnp
ARG	INT	u_int32_t	flags
END
BEGIN	txn_discard	RETCODE
ARG	ID	DB_TXN *	txnp
ARG	INT	u_int32_t	flags
END
BEGIN	txn_prepare	CODE
ARG	ID	DB_TXN *	txnp
ARG	GID	u_int8_t *	gid
END
BEGIN	txn_recover	RETCODE
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	DB_PREPLIST *	preplist
ARG	INT	long		count
ARG	IGNORE	long *		retp
ARG	INT	u_int32_t	flags
RET	LIST	DB_TXN *	txn	ID
RET	LIST	u_int8_t *	gid	GID
RET	INT	long		retcount
END
BEGIN	txn_stat	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	DB_TXN_STAT **	statp
ARG	INT	u_int32_t	flags
END
BEGIN	txn_timeout	NOFUNC
ARG	ID	DB_TXN *	txnp
ARG	INT	u_int32_t	timeout
ARG	INT	u_int32_t	flags
END
#
# Replication functions
#
BEGIN	rep_elect	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	int		nsites
ARG	INT	int		pri
ARG	INT	u_int32_t	timeout
ARG	IGNORE	int *		idp
END
BEGIN	rep_flush	NOFUNC
ARG	ID	DB_ENV *	dbenv
END
BEGIN	rep_process_message	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	DBT	DBT *		rec
ARG	DBT	DBT *		control
ARG	IGNORE	int *		idp
ARG	IGNORE	DB_LSN *	ret_lsnp
END
BEGIN	rep_get_limit		NOFUNC
ARG	ID	DB_ENV *	dbenv
ARET	INT	u_int32_t	mbytes
ARET	INT	u_int32_t	bytes
END
BEGIN	rep_set_limit		NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	mbytes
ARG	INT	u_int32_t	bytes
END
BEGIN	rep_set_request		NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	min
ARG	INT	u_int32_t	max
END
BEGIN	rep_set_rep_transport	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	int		id
FUNCPROT	int (*)(DB_ENV *, const DBT *, const DBT *, const DB_LSN *, int, u_int32_t)
FUNCARG	int (*func0) __P((DB_ENV *, const DBT *, const DBT *, const DB_LSN *, int, u_int32_t))
END
BEGIN	rep_start	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	DBT	DBT *		cdata
ARG	INT	u_int32_t	flags
END
BEGIN	rep_stat	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	DB_REP_STAT **	statp
ARG	INT	u_int32_t	flags
END

#
# Database functions
#
BEGIN	db_alloc	NOFUNC
ARG	ID	DB *		dbp
FUNCPROT	void *(*)(size_t)
FUNCARG	void *(*func0) __P((size_t))
FUNCPROT	void *(*)(void *, size_t)
FUNCARG	void *(*func1) __P((void *, size_t))
FUNCPROT	void (*)(void *)
FUNCARG	void (*func2) __P((void *))
END
BEGIN	db_associate	CODE
ARG	ID	DB *		dbp
ARG	ID	DB_TXN *	txnp
ARG	ID	DB *		sdbp
FUNCPROT	int (*)(DB *, const DBT *, const DBT *, DBT *)
FUNCARG	int (*func0) __P((DB *, const DBT *, const DBT *, DBT *))
ARG	INT	u_int32_t	flags
END
BEGIN	db_bt_compare	NOFUNC
ARG	ID	DB *		dbp
FUNCPROT	int (*)(DB *, const DBT *, const DBT *)
FUNCARG	int (*func0) __P((DB *, const DBT *, const DBT *))
END
BEGIN	db_bt_maxkey	CODE
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	maxkey
END
BEGIN	db_get_bt_minkey	CODE
ARG	ID	DB *		dbp
ARET	INT	u_int32_t	minkey
END
BEGIN	db_bt_minkey	CODE
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	minkey
END
BEGIN	db_bt_prefix	NOFUNC
ARG	ID	DB *		dbp
FUNCPROT	size_t(*)(DB *, const DBT *, const DBT *)
FUNCARG	size_t (*func0) __P((DB *, const DBT *, const DBT *))
END
BEGIN	db_set_append_recno	NOFUNC
ARG	ID	DB *		dbp
FUNCPROT	int (*)(DB *, DBT *, db_recno_t)
FUNCARG	int (*func0) __P((DB *, DBT *, db_recno_t))
END
BEGIN	db_get_cachesize	NOFUNC
ARG	ID	DB *		dbp
ARET	INT	u_int32_t	gbytes
ARET	INT	u_int32_t	bytes
ARET	INT	int		ncache
END
BEGIN	db_cachesize	NOFUNC
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	gbytes
ARG	INT	u_int32_t	bytes
ARG	INT	int		ncache
END
BEGIN	db_close	RETCODE
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	flags
END
BEGIN	db_create	RETCODE
ARG	IGNORE	DB *		dbp
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	flags
RET	ID	long		db
END
BEGIN	db_del		CODE
ARG	ID	DB *		dbp
ARG	ID	DB_TXN *	txnp
ARG	DBT	DBT *		key
ARG	INT	u_int32_t	flags
END
BEGIN	db_dup_compare	NOFUNC
ARG	ID	DB *		dbp
FUNCPROT	int (*)(DB *, const DBT *, const DBT *)
FUNCARG	int (*func0) __P((DB *, const DBT *, const DBT *))
END
BEGIN	db_get_encrypt_flags		CODE
ARG	ID	DB *		dbp
ARET	INT	u_int32_t	flags
END
BEGIN	db_encrypt		CODE
ARG	ID	DB *		dbp
ARG	STRING	const char *	passwd
ARG	INT	u_int32_t	flags
END
BEGIN	db_get_extentsize	CODE
ARG	ID	DB *		dbp
ARET	INT	u_int32_t	extentsize
END
BEGIN	db_extentsize	CODE
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	extentsize
END
BEGIN	db_fd		NOFUNC
ARG	ID	DB *		dbp
ARG	IGNORE	int *		fdp
END
BEGIN	db_feedback	NOFUNC
ARG	ID	DB *		dbp
FUNCPROT	void (*)(DB *, int, int)
FUNCARG	void (*func0) __P((DB *, int, int))
END
BEGIN	db_get_flags	CODE
ARG	ID	DB *		dbp
ARET	INT	u_int32_t	flags
END
BEGIN	db_flags	CODE
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	flags
END
BEGIN	db_get		RETCODE
ARG	ID	DB *		dbp
ARG	ID	DB_TXN *	txnp
ARG	DBT	DBT *		key
ARG	DBT	DBT *		data
ARG	INT	u_int32_t	flags
RET	DBT	DBT *		key
RET	DBT	DBT *		data
END
BEGIN	db_get_name	CODE
ARG	ID	DB *		dbp
ARET	STRING	const char *	filename
ARET	STRING	const char *	dbname
END
BEGIN	db_get_open_flags	CODE
ARG	ID	DB *		dbp
ARET	INT	u_int32_t	flags
END
BEGIN	db_get_h_ffactor	CODE
ARG	ID	DB *		dbp
ARET	INT	u_int32_t	ffactor
END
BEGIN	db_h_ffactor	CODE
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	ffactor
END
BEGIN	db_h_hash	NOFUNC
ARG	ID	DB *		dbp
FUNCPROT	u_int32_t(*)(DB *, const void *, u_int32_t)
FUNCARG	u_int32_t (*func0) __P((DB *, const void *, u_int32_t))
END
BEGIN	db_get_h_nelem	CODE
ARG	ID	DB *		dbp
ARET	INT	u_int32_t	nelem
END
BEGIN	db_h_nelem	CODE
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	nelem
END
BEGIN	db_key_range	RETCODE
ARG	ID	DB *		dbp
ARG	ID	DB_TXN *	txnp
ARG	DBT	DBT *		key
ARG	IGNORE	DB_KEY_RANGE *	range
ARG	INT	u_int32_t	flags
RET	DBL	double		less
RET	DBL	double		equal
RET	DBL	double		greater
END
BEGIN	db_get_lorder	CODE
ARG	ID	DB *		dbp
ARET	INT	int		lorder
END
BEGIN	db_lorder	CODE
ARG	ID	DB *		dbp
ARG	INT	int		lorder
END
# XXX
# The line:
# RET	INT	u_int32_t	dbflags
# should go away when a get_flags method exists.  It is
# needed now because Tcl looks at dbp->flags.
#
BEGIN	db_open		RETCODE
ARG	ID	DB *		dbp
ARG	ID	DB_TXN *	txnp
ARG	STRING	const char *	name
ARG	STRING	const char *	subdb
ARG	INT	DBTYPE		type
ARG	INT	u_int32_t	flags
ARG	INT	int		mode
RET	ID	long		db
RET	INT	DBTYPE		type
RET	INT	u_int32_t	dbflags
RET	INT	int		lorder
END
BEGIN	db_get_pagesize	CODE
ARG	ID	DB *		dbp
ARET	INT	u_int32_t	pagesize
END
BEGIN	db_pagesize	CODE
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	pagesize
END
BEGIN	db_panic	NOFUNC
ARG	ID	DB *		dbp
FUNCPROT	void (*)(DB_ENV *, int)
FUNCARG	void (*func0) __P((DB_ENV *, int))
END
BEGIN	db_pget		RETCODE
ARG	ID	DB *		dbp
ARG	ID	DB_TXN *	txnp
ARG	DBT	DBT *		skey
ARG	DBT	DBT *		pkey
ARG	DBT	DBT *		data
ARG	INT	u_int32_t	flags
RET	DBT	DBT *		skey
RET	DBT	DBT *		pkey
RET	DBT	DBT *		data
END
BEGIN	db_put		RETCODE
ARG	ID	DB *		dbp
ARG	ID	DB_TXN *	txnp
ARG	DBT	DBT *		key
ARG	DBT	DBT *		data
ARG	INT	u_int32_t	flags
RET	DBT	DBT *		key
END
BEGIN	db_get_re_delim	CODE
ARG	ID	DB *		dbp
ARET	INT	int		delim
END
BEGIN	db_re_delim	CODE
ARG	ID	DB *		dbp
ARG	INT	int		delim
END
BEGIN	db_get_re_len	CODE
ARG	ID	DB *		dbp
ARET	INT	u_int32_t	len
END
BEGIN	db_re_len	CODE
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	len
END
BEGIN	db_re_pad	CODE
ARG	ID	DB *		dbp
ARG	INT	int		pad
END
BEGIN	db_get_re_pad	CODE
ARG	ID	DB *		dbp
ARET	INT	int		pad
END
BEGIN	db_get_re_source	NOFUNC
ARG	ID	DB *		dbp
ARET	STRING	const char *	re_source
END
BEGIN	db_re_source	NOFUNC
ARG	ID	DB *		dbp
ARG	STRING	const char *	re_source
END
BEGIN	db_remove	RETCODE
ARG	ID	DB *		dbp
ARG	STRING	const char *	name
ARG	STRING	const char *	subdb
ARG	INT	u_int32_t	flags
END
BEGIN	db_rename	RETCODE
ARG	ID	DB *		dbp
ARG	STRING	const char *	name
ARG	STRING	const char *	subdb
ARG	STRING	const char *	newname
ARG	INT	u_int32_t	flags
END
BEGIN	db_stat		RETCODE
ARG	ID	DB *		dbp
ARG	IGNORE	void *		sp
ARG	INT	u_int32_t	flags
RET	LIST	u_int32_t *	stats	INT
END
BEGIN	db_sync		CODE
ARG	ID	DB *		dbp
ARG	INT	u_int32_t	flags
END
BEGIN	db_truncate	RETCODE
ARG	ID	DB *		dbp
ARG	ID	DB_TXN *	txnp
ARG	IGNORE	u_int32_t  *	countp
ARG	INT	u_int32_t	flags
RET	INT	u_int32_t	count
END
BEGIN	db_upgrade	NOFUNC
ARG	ID	DB *		dbp
ARG	STRING	const char *	fname
ARG	INT	u_int32_t	flags
END
BEGIN	db_verify	NOFUNC
ARG	ID	DB *		dbp
ARG	STRING	const char *	fname
ARG	STRING	const char *	subdb
ARG	IGNORE	FILE *		outfile
ARG	INT	u_int32_t	flags
END
#
# Cursor functions
#
BEGIN	db_cursor	RETCODE
ARG	ID	DB *		dbp
ARG	ID	DB_TXN *	txnp
ARG	IGNORE	DBC **		dbcpp
ARG	INT	u_int32_t	flags
RET	ID	long		dbcid
END
BEGIN	db_join		RETCODE
ARG	ID	DB *		dbp
ARG	LIST	DBC **		curs	ID
ARG	IGNORE	DBC **		dbcp
ARG	INT	u_int32_t	flags
RET	ID	long		dbcid
END
BEGIN	dbc_close	RETCODE
ARG	ID	DBC *		dbc
END
BEGIN	dbc_count	RETCODE
ARG	ID	DBC *		dbc
ARG	IGNORE	db_recno_t *	countp
ARG	INT	u_int32_t	flags
RET	INT	db_recno_t	dupcount
END
BEGIN	dbc_del		CODE
ARG	ID	DBC *		dbc
ARG	INT	u_int32_t	flags
END
BEGIN	dbc_dup		RETCODE
ARG	ID	DBC *		dbc
ARG	IGNORE	DBC **		dbcp
ARG	INT	u_int32_t	flags
RET	ID	long		dbcid
END
BEGIN	dbc_get		RETCODE
ARG	ID	DBC *		dbc
ARG	DBT	DBT *		key
ARG	DBT	DBT *		data
ARG	INT	u_int32_t	flags
RET	DBT	DBT *		key
RET	DBT	DBT *		data
END
BEGIN	dbc_pget		RETCODE
ARG	ID	DBC *		dbc
ARG	DBT	DBT *		skey
ARG	DBT	DBT *		pkey
ARG	DBT	DBT *		data
ARG	INT	u_int32_t	flags
RET	DBT	DBT *		skey
RET	DBT	DBT *		pkey
RET	DBT	DBT *		data
END
BEGIN	dbc_put		RETCODE
ARG	ID	DBC *		dbc
ARG	DBT	DBT *		key
ARG	DBT	DBT *		data
ARG	INT	u_int32_t	flags
RET	DBT	DBT *		key
END

#
# Unsupported environment subsystems
#
#
# Locking subsystem
#
BEGIN	lock_detect	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	flags
ARG	INT	u_int32_t	atype
ARG	IGNORE	int *		aborted
END
BEGIN	lock_get	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	locker
ARG	INT	u_int32_t	flags
ARG	CONST	const DBT *	obj
ARG	INT	db_lockmode_t	mode
ARG	IGNORE	DB_LOCK *	lock
END
BEGIN	lock_id		NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t *	idp
END
BEGIN	lock_id_free		NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	id
END
BEGIN	lock_put	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	ID	DB_LOCK *	lock
END
BEGIN	lock_stat	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	DB_LOCK_STAT **	statp
ARG	INT	u_int32_t	flags
END
BEGIN	lock_vec	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	u_int32_t	locker
ARG	INT	u_int32_t	flags
ARG	IGNORE	DB_LOCKREQ *	list
ARG	INT	int		nlist
ARG	IGNORE	DB_LOCKREQ **	elistp
END
#
# Logging subsystem
#
BEGIN	log_archive	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	char ***	listp
ARG	INT	u_int32_t	flags
END
BEGIN	log_cursor		NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	DB_LOGC **	logcp
ARG	INT	u_int32_t	flags
END
#
# Don't do log_compare.  It doesn't have an env we can get at,
# and it doesn't manipulate DB internal information.
#
BEGIN	log_file	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	CONST	const DB_LSN *	lsn
ARG	STRING	char *		namep
ARG	INT	size_t		len
END
BEGIN	log_flush	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	CONST	const DB_LSN *	lsn
END
BEGIN	log_put		NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	DB_LSN *	lsn
ARG	DBT	const DBT *	data
ARG	INT	u_int32_t	flags
END
BEGIN	log_stat	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	DB_LOG_STAT **	statp
ARG	INT	u_int32_t	flags
END

#
# DB_MPOOL methods.
#
BEGIN	memp_register	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	int		ftype
FUNCPROT	int (*)(DB_ENV *, db_pgno_t, void *, DBT *)
FUNCARG	int (*func0) __P((DB_ENV *, db_pgno_t, void *, DBT *))
FUNCPROT	int (*)(DB_ENV *, db_pgno_t, void *, DBT *)
FUNCARG	int (*func1) __P((DB_ENV *, db_pgno_t, void *, DBT *))
END
BEGIN	memp_stat	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	DB_MPOOL_STAT **	gstatp
ARG	IGNORE	DB_MPOOL_FSTAT ***	fstatp
ARG	INT	u_int32_t	flags
END
BEGIN	memp_sync	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	IGNORE	DB_LSN *	lsn
END
BEGIN	memp_trickle	NOFUNC
ARG	ID	DB_ENV *	dbenv
ARG	INT	int		pct
ARG	IGNORE	int *		nwrotep
END

#
# DB_MPOOLFILE methods.
#
BEGIN	memp_fget		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	u_int32_t *	pgnoaddr
ARG	IGNORE	u_int32_t	flags
ARG	IGNORE	void *		addrp
END
BEGIN	memp_fopen		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	const char *	path
ARG	IGNORE	u_int32_t	flags
ARG	IGNORE	int		mode
ARG	IGNORE	size_t		pagesize
END
BEGIN	memp_fput		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	void *		pgaddr
ARG	IGNORE	u_int32_t	flags
END
BEGIN	memp_fset		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	void *		pgaddr
ARG	IGNORE	u_int32_t	flags
END
BEGIN	memp_get_clear_len	NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	u_int32_t *	clear_lenp
END
BEGIN	memp_set_clear_len	NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	u_int32_t	clear_len
END
BEGIN	memp_get_fileid		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	u_int8_t *	fileid
END
BEGIN	memp_set_fileid		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	u_int8_t *	fileid
END
BEGIN	memp_get_flags		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	u_int32_t *	flagsp
END
BEGIN	memp_set_flags		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	u_int32_t	flags
ARG	IGNORE	int		onoff
END
BEGIN	memp_get_ftype		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	int *		ftype
END
BEGIN	memp_set_ftype		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	int		ftype
END
BEGIN	memp_get_lsn_offset	NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	int32_t *	lsn_offsetp
END
BEGIN	memp_set_lsn_offset	NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	int32_t		lsn_offset
END
BEGIN	memp_get_maxsize	NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	u_int32_t *	gbytesp
ARG	IGNORE	u_int32_t *	bytesp
END
BEGIN	memp_set_maxsize	NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	u_int32_t	gbytes
ARG	IGNORE	u_int32_t	bytes
END
BEGIN	memp_get_pgcookie	NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	DBT *		pgcookie
END
BEGIN	memp_set_pgcookie	NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	DBT *		pgcookie
END
BEGIN	memp_get_priority	NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	DB_CACHE_PRIORITY *	priorityp
END
BEGIN	memp_set_priority	NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
ARG	IGNORE	DB_CACHE_PRIORITY	priority
END
BEGIN	memp_fsync		NOFUNC
ARG	ID	DB_MPOOLFILE *	dbmfp
END
