diff options
author | unknown <tim@threads.polyesthetic.msg> | 2001-04-05 15:33:16 -0400 |
---|---|---|
committer | unknown <tim@threads.polyesthetic.msg> | 2001-04-05 15:33:16 -0400 |
commit | 353d84d874c4a4c9bef89a1e19737ff7dd468a65 (patch) | |
tree | c89a2faa418ef1c4cd12af14af0a472e15c1dcc9 /bdb/rpc_client | |
parent | 9d10389a1238cfad6971236f55ee33d228f31cab (diff) | |
download | mariadb-git-353d84d874c4a4c9bef89a1e19737ff7dd468a65.tar.gz |
Remove generated files from bdb source code control.
BitKeeper/deleted/.del-btree_auto.c~a683156a176761f:
Delete: bdb/btree/btree_auto.c
BitKeeper/deleted/.del-chk.define~aa9a626e58631003:
Delete: bdb/dist/build/chk.define
BitKeeper/deleted/.del-chk.def~bb65b471d09f7c58:
Delete: bdb/dist/build/chk.def
BitKeeper/deleted/.del-chk.offt~25759c9294db634e:
Delete: bdb/dist/build/chk.offt
BitKeeper/deleted/.del-chk.srcfiles~ae884700cd110cbf:
Delete: bdb/dist/build/chk.srcfiles
BitKeeper/deleted/.del-chk.tags~7a5b14d33d4078cc:
Delete: bdb/dist/build/chk.tags
BitKeeper/deleted/.del-config.guess~ead1d91caeaa748c:
Delete: bdb/dist/config.guess
BitKeeper/deleted/.del-config.hin~fdecb7a06fa137a7:
Delete: bdb/dist/config.hin
BitKeeper/deleted/.del-config.sub~17e9990a298261a:
Delete: bdb/dist/config.sub
BitKeeper/deleted/.del-crdel_auto.c~ee4146a08fd175c1:
Delete: bdb/db/crdel_auto.c
BitKeeper/deleted/.del-db_auto.c~3186e950cc321ae7:
Delete: bdb/db/db_auto.c
BitKeeper/deleted/.del-db_int.h~40ba51edce41403f:
Delete: bdb/build_vxworks/db_int.h
BitKeeper/deleted/.del-db_int.h~9ee5645850a336a0:
Delete: bdb/build_win32/db_int.h
BitKeeper/deleted/.del-include.tcl~f8bffb5e2510f229:
Delete: bdb/build_win32/include.tcl
BitKeeper/deleted/.del-install-sh~1858c24340b72628:
Delete: bdb/dist/install-sh
BitKeeper/deleted/.del-libdb.rc~906f4936ec6a8398:
Delete: bdb/build_win32/libdb.rc
BitKeeper/deleted/.del-DbConstants.java~15fa87eda6b72302:
Delete: bdb/java/src/com/sleepycat/db/DbConstants.java
BitKeeper/deleted/.del-btree_auto.h~84d4451c78faf67e:
Delete: bdb/include/btree_auto.h
BitKeeper/deleted/.del-crdel_auto.h~1b8255da47550ece:
Delete: bdb/include/crdel_auto.h
BitKeeper/deleted/.del-db_auto.h~994ddc84db334345:
Delete: bdb/include/db_auto.h
BitKeeper/deleted/.del-db_server.h~61a33aa05bf368a7:
Delete: bdb/include/db_server.h
BitKeeper/deleted/.del-db_server_clnt.c~b548b860f765c597:
Delete: bdb/rpc_client/db_server_clnt.c
BitKeeper/deleted/.del-db_server_svc.c~35804eb82b953f49:
Delete: bdb/rpc_server/db_server_svc.c
BitKeeper/deleted/.del-gen_client.c~ad86f092d0996a68:
Delete: bdb/rpc_client/gen_client.c
BitKeeper/deleted/.del-hash_auto.c~d17c6a6ed4f181d1:
Delete: bdb/hash/hash_auto.c
BitKeeper/deleted/.del-hash_auto.h~1b79cdd426d7ef25:
Delete: bdb/include/hash_auto.h
BitKeeper/deleted/.del-log_auto.c~fe8c0369965f7151:
Delete: bdb/log/log_auto.c
BitKeeper/deleted/.del-log_auto.h~8d52dd0884d03051:
Delete: bdb/include/log_auto.h
BitKeeper/deleted/.del-qam_auto.c~361954d3f149feb0:
Delete: bdb/qam/qam_auto.c
BitKeeper/deleted/.del-qam_auto.h~96f6c045fd0d6cab:
Delete: bdb/include/qam_auto.h
BitKeeper/deleted/.del-rec_btree~65d6b0b2f5b7a6d2:
Delete: bdb/dist/template/rec_btree
BitKeeper/deleted/.del-rec_crdel~58795c0c5232f80d:
Delete: bdb/dist/template/rec_crdel
BitKeeper/deleted/.del-rec_db~52c5797539878fca:
Delete: bdb/dist/template/rec_db
BitKeeper/deleted/.del-rec_hash~dcbdd106ae17b865:
Delete: bdb/dist/template/rec_hash
BitKeeper/deleted/.del-rec_log~3fe6d62c43bc553a:
Delete: bdb/dist/template/rec_log
BitKeeper/deleted/.del-rec_qam~6eecf6833de0af98:
Delete: bdb/dist/template/rec_qam
BitKeeper/deleted/.del-rec_txn~1ff22b797deb0e1b:
Delete: bdb/dist/template/rec_txn
BitKeeper/deleted/.del-txn_auto.h~e3f49e94fd291c45:
Delete: bdb/include/txn_auto.h
BitKeeper/deleted/.del-db_server_xdr.c~336ef020b4a22c05:
Delete: bdb/rpc_server/db_server_xdr.c
BitKeeper/deleted/.del-gen_db_server.c~d5602f9bd5c930e:
Delete: bdb/rpc_server/gen_db_server.c
BitKeeper/deleted/.del-include.tcl~20fc297b040cbe2:
Delete: bdb/test/include.tcl
BitKeeper/deleted/.del-txn_auto.c~6eb282f016f606d9:
Delete: bdb/txn/txn_auto.c
Diffstat (limited to 'bdb/rpc_client')
-rw-r--r-- | bdb/rpc_client/db_server_clnt.c | 692 | ||||
-rw-r--r-- | bdb/rpc_client/gen_client.c | 2494 |
2 files changed, 0 insertions, 3186 deletions
diff --git a/bdb/rpc_client/db_server_clnt.c b/bdb/rpc_client/db_server_clnt.c deleted file mode 100644 index 680a26144b2..00000000000 --- a/bdb/rpc_client/db_server_clnt.c +++ /dev/null @@ -1,692 +0,0 @@ -#include "db_config.h" -#ifdef HAVE_RPC -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "db_server.h" - -/* Default timeout can be changed using clnt_control() */ -static struct timeval TIMEOUT = { 25, 0 }; - -__env_cachesize_reply * -__db_env_cachesize_1(argp, clnt) - __env_cachesize_msg *argp; - CLIENT *clnt; -{ - static __env_cachesize_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_env_cachesize, - (xdrproc_t) xdr___env_cachesize_msg, (caddr_t) argp, - (xdrproc_t) xdr___env_cachesize_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__env_close_reply * -__db_env_close_1(argp, clnt) - __env_close_msg *argp; - CLIENT *clnt; -{ - static __env_close_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_env_close, - (xdrproc_t) xdr___env_close_msg, (caddr_t) argp, - (xdrproc_t) xdr___env_close_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__env_create_reply * -__db_env_create_1(argp, clnt) - __env_create_msg *argp; - CLIENT *clnt; -{ - static __env_create_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_env_create, - (xdrproc_t) xdr___env_create_msg, (caddr_t) argp, - (xdrproc_t) xdr___env_create_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__env_flags_reply * -__db_env_flags_1(argp, clnt) - __env_flags_msg *argp; - CLIENT *clnt; -{ - static __env_flags_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_env_flags, - (xdrproc_t) xdr___env_flags_msg, (caddr_t) argp, - (xdrproc_t) xdr___env_flags_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__env_open_reply * -__db_env_open_1(argp, clnt) - __env_open_msg *argp; - CLIENT *clnt; -{ - static __env_open_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_env_open, - (xdrproc_t) xdr___env_open_msg, (caddr_t) argp, - (xdrproc_t) xdr___env_open_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__env_remove_reply * -__db_env_remove_1(argp, clnt) - __env_remove_msg *argp; - CLIENT *clnt; -{ - static __env_remove_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_env_remove, - (xdrproc_t) xdr___env_remove_msg, (caddr_t) argp, - (xdrproc_t) xdr___env_remove_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__txn_abort_reply * -__db_txn_abort_1(argp, clnt) - __txn_abort_msg *argp; - CLIENT *clnt; -{ - static __txn_abort_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_txn_abort, - (xdrproc_t) xdr___txn_abort_msg, (caddr_t) argp, - (xdrproc_t) xdr___txn_abort_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__txn_begin_reply * -__db_txn_begin_1(argp, clnt) - __txn_begin_msg *argp; - CLIENT *clnt; -{ - static __txn_begin_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_txn_begin, - (xdrproc_t) xdr___txn_begin_msg, (caddr_t) argp, - (xdrproc_t) xdr___txn_begin_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__txn_commit_reply * -__db_txn_commit_1(argp, clnt) - __txn_commit_msg *argp; - CLIENT *clnt; -{ - static __txn_commit_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_txn_commit, - (xdrproc_t) xdr___txn_commit_msg, (caddr_t) argp, - (xdrproc_t) xdr___txn_commit_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_bt_maxkey_reply * -__db_db_bt_maxkey_1(argp, clnt) - __db_bt_maxkey_msg *argp; - CLIENT *clnt; -{ - static __db_bt_maxkey_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_bt_maxkey, - (xdrproc_t) xdr___db_bt_maxkey_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_bt_maxkey_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_bt_minkey_reply * -__db_db_bt_minkey_1(argp, clnt) - __db_bt_minkey_msg *argp; - CLIENT *clnt; -{ - static __db_bt_minkey_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_bt_minkey, - (xdrproc_t) xdr___db_bt_minkey_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_bt_minkey_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_close_reply * -__db_db_close_1(argp, clnt) - __db_close_msg *argp; - CLIENT *clnt; -{ - static __db_close_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_close, - (xdrproc_t) xdr___db_close_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_close_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_create_reply * -__db_db_create_1(argp, clnt) - __db_create_msg *argp; - CLIENT *clnt; -{ - static __db_create_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_create, - (xdrproc_t) xdr___db_create_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_create_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_del_reply * -__db_db_del_1(argp, clnt) - __db_del_msg *argp; - CLIENT *clnt; -{ - static __db_del_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_del, - (xdrproc_t) xdr___db_del_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_del_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_extentsize_reply * -__db_db_extentsize_1(argp, clnt) - __db_extentsize_msg *argp; - CLIENT *clnt; -{ - static __db_extentsize_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_extentsize, - (xdrproc_t) xdr___db_extentsize_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_extentsize_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_flags_reply * -__db_db_flags_1(argp, clnt) - __db_flags_msg *argp; - CLIENT *clnt; -{ - static __db_flags_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_flags, - (xdrproc_t) xdr___db_flags_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_flags_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_get_reply * -__db_db_get_1(argp, clnt) - __db_get_msg *argp; - CLIENT *clnt; -{ - static __db_get_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_get, - (xdrproc_t) xdr___db_get_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_get_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_h_ffactor_reply * -__db_db_h_ffactor_1(argp, clnt) - __db_h_ffactor_msg *argp; - CLIENT *clnt; -{ - static __db_h_ffactor_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_h_ffactor, - (xdrproc_t) xdr___db_h_ffactor_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_h_ffactor_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_h_nelem_reply * -__db_db_h_nelem_1(argp, clnt) - __db_h_nelem_msg *argp; - CLIENT *clnt; -{ - static __db_h_nelem_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_h_nelem, - (xdrproc_t) xdr___db_h_nelem_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_h_nelem_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_key_range_reply * -__db_db_key_range_1(argp, clnt) - __db_key_range_msg *argp; - CLIENT *clnt; -{ - static __db_key_range_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_key_range, - (xdrproc_t) xdr___db_key_range_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_key_range_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_lorder_reply * -__db_db_lorder_1(argp, clnt) - __db_lorder_msg *argp; - CLIENT *clnt; -{ - static __db_lorder_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_lorder, - (xdrproc_t) xdr___db_lorder_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_lorder_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_open_reply * -__db_db_open_1(argp, clnt) - __db_open_msg *argp; - CLIENT *clnt; -{ - static __db_open_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_open, - (xdrproc_t) xdr___db_open_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_open_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_pagesize_reply * -__db_db_pagesize_1(argp, clnt) - __db_pagesize_msg *argp; - CLIENT *clnt; -{ - static __db_pagesize_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_pagesize, - (xdrproc_t) xdr___db_pagesize_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_pagesize_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_put_reply * -__db_db_put_1(argp, clnt) - __db_put_msg *argp; - CLIENT *clnt; -{ - static __db_put_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_put, - (xdrproc_t) xdr___db_put_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_put_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_re_delim_reply * -__db_db_re_delim_1(argp, clnt) - __db_re_delim_msg *argp; - CLIENT *clnt; -{ - static __db_re_delim_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_re_delim, - (xdrproc_t) xdr___db_re_delim_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_re_delim_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_re_len_reply * -__db_db_re_len_1(argp, clnt) - __db_re_len_msg *argp; - CLIENT *clnt; -{ - static __db_re_len_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_re_len, - (xdrproc_t) xdr___db_re_len_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_re_len_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_re_pad_reply * -__db_db_re_pad_1(argp, clnt) - __db_re_pad_msg *argp; - CLIENT *clnt; -{ - static __db_re_pad_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_re_pad, - (xdrproc_t) xdr___db_re_pad_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_re_pad_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_remove_reply * -__db_db_remove_1(argp, clnt) - __db_remove_msg *argp; - CLIENT *clnt; -{ - static __db_remove_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_remove, - (xdrproc_t) xdr___db_remove_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_remove_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_rename_reply * -__db_db_rename_1(argp, clnt) - __db_rename_msg *argp; - CLIENT *clnt; -{ - static __db_rename_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_rename, - (xdrproc_t) xdr___db_rename_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_rename_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_stat_reply * -__db_db_stat_1(argp, clnt) - __db_stat_msg *argp; - CLIENT *clnt; -{ - static __db_stat_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_stat, - (xdrproc_t) xdr___db_stat_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_stat_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_swapped_reply * -__db_db_swapped_1(argp, clnt) - __db_swapped_msg *argp; - CLIENT *clnt; -{ - static __db_swapped_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_swapped, - (xdrproc_t) xdr___db_swapped_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_swapped_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_sync_reply * -__db_db_sync_1(argp, clnt) - __db_sync_msg *argp; - CLIENT *clnt; -{ - static __db_sync_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_sync, - (xdrproc_t) xdr___db_sync_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_sync_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_cursor_reply * -__db_db_cursor_1(argp, clnt) - __db_cursor_msg *argp; - CLIENT *clnt; -{ - static __db_cursor_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_cursor, - (xdrproc_t) xdr___db_cursor_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_cursor_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__db_join_reply * -__db_db_join_1(argp, clnt) - __db_join_msg *argp; - CLIENT *clnt; -{ - static __db_join_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_db_join, - (xdrproc_t) xdr___db_join_msg, (caddr_t) argp, - (xdrproc_t) xdr___db_join_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__dbc_close_reply * -__db_dbc_close_1(argp, clnt) - __dbc_close_msg *argp; - CLIENT *clnt; -{ - static __dbc_close_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_dbc_close, - (xdrproc_t) xdr___dbc_close_msg, (caddr_t) argp, - (xdrproc_t) xdr___dbc_close_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__dbc_count_reply * -__db_dbc_count_1(argp, clnt) - __dbc_count_msg *argp; - CLIENT *clnt; -{ - static __dbc_count_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_dbc_count, - (xdrproc_t) xdr___dbc_count_msg, (caddr_t) argp, - (xdrproc_t) xdr___dbc_count_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__dbc_del_reply * -__db_dbc_del_1(argp, clnt) - __dbc_del_msg *argp; - CLIENT *clnt; -{ - static __dbc_del_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_dbc_del, - (xdrproc_t) xdr___dbc_del_msg, (caddr_t) argp, - (xdrproc_t) xdr___dbc_del_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__dbc_dup_reply * -__db_dbc_dup_1(argp, clnt) - __dbc_dup_msg *argp; - CLIENT *clnt; -{ - static __dbc_dup_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_dbc_dup, - (xdrproc_t) xdr___dbc_dup_msg, (caddr_t) argp, - (xdrproc_t) xdr___dbc_dup_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__dbc_get_reply * -__db_dbc_get_1(argp, clnt) - __dbc_get_msg *argp; - CLIENT *clnt; -{ - static __dbc_get_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_dbc_get, - (xdrproc_t) xdr___dbc_get_msg, (caddr_t) argp, - (xdrproc_t) xdr___dbc_get_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} - -__dbc_put_reply * -__db_dbc_put_1(argp, clnt) - __dbc_put_msg *argp; - CLIENT *clnt; -{ - static __dbc_put_reply clnt_res; - - memset((char *)&clnt_res, 0, sizeof (clnt_res)); - if (clnt_call(clnt, __DB_dbc_put, - (xdrproc_t) xdr___dbc_put_msg, (caddr_t) argp, - (xdrproc_t) xdr___dbc_put_reply, (caddr_t) &clnt_res, - TIMEOUT) != RPC_SUCCESS) { - return (NULL); - } - return (&clnt_res); -} -#endif /* HAVE_RPC */ diff --git a/bdb/rpc_client/gen_client.c b/bdb/rpc_client/gen_client.c deleted file mode 100644 index 7cc598e7dfa..00000000000 --- a/bdb/rpc_client/gen_client.c +++ /dev/null @@ -1,2494 +0,0 @@ -/* Do not edit: automatically built by gen_rpc.awk. */ -#include "db_config.h" - -#ifdef HAVE_RPC -#ifndef NO_SYSTEM_INCLUDES -#include <sys/types.h> -#include <rpc/rpc.h> -#include <rpc/xdr.h> - -#include <errno.h> -#include <string.h> -#endif -#include "db_server.h" - -#include "db_int.h" -#include "db_page.h" -#include "db_ext.h" -#include "mp.h" -#include "rpc_client_ext.h" -#include "txn.h" - -#include "gen_client_ext.h" - -int -__dbcl_env_cachesize(dbenv, gbytes, bytes, ncache) - DB_ENV * dbenv; - u_int32_t gbytes; - u_int32_t bytes; - int ncache; -{ - CLIENT *cl; - __env_cachesize_msg req; - static __env_cachesize_reply *replyp = NULL; - int ret; - - ret = 0; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___env_cachesize_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbenv == NULL) - req.dbenvcl_id = 0; - else - req.dbenvcl_id = dbenv->cl_id; - req.gbytes = gbytes; - req.bytes = bytes; - req.ncache = ncache; - - replyp = __db_env_cachesize_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_env_close(dbenv, flags) - DB_ENV * dbenv; - u_int32_t flags; -{ - CLIENT *cl; - __env_close_msg req; - static __env_close_reply *replyp = NULL; - int ret; - - ret = 0; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___env_close_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbenv == NULL) - req.dbenvcl_id = 0; - else - req.dbenvcl_id = dbenv->cl_id; - req.flags = flags; - - replyp = __db_env_close_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_env_close_ret(dbenv, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_rpc_illegal(dbenv, name) - DB_ENV *dbenv; - char *name; -{ - __db_err(dbenv, - "%s method meaningless in RPC environment", name); - return (__db_eopnotsup(dbenv)); -} - -int -__dbcl_set_data_dir(dbenv, dir) - DB_ENV * dbenv; - const char * dir; -{ - COMPQUIET(dir, NULL); - return (__dbcl_rpc_illegal(dbenv, "set_data_dir")); -} - -int -__dbcl_env_set_feedback(dbenv, func0) - DB_ENV * dbenv; - void (*func0) __P((DB_ENV *, int, int)); -{ - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "env_set_feedback")); -} - -int -__dbcl_env_flags(dbenv, flags, onoff) - DB_ENV * dbenv; - u_int32_t flags; - int onoff; -{ - CLIENT *cl; - __env_flags_msg req; - static __env_flags_reply *replyp = NULL; - int ret; - - ret = 0; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___env_flags_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbenv == NULL) - req.dbenvcl_id = 0; - else - req.dbenvcl_id = dbenv->cl_id; - req.flags = flags; - req.onoff = onoff; - - replyp = __db_env_flags_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_set_lg_bsize(dbenv, bsize) - DB_ENV * dbenv; - u_int32_t bsize; -{ - COMPQUIET(bsize, 0); - return (__dbcl_rpc_illegal(dbenv, "set_lg_bsize")); -} - -int -__dbcl_set_lg_dir(dbenv, dir) - DB_ENV * dbenv; - const char * dir; -{ - COMPQUIET(dir, NULL); - return (__dbcl_rpc_illegal(dbenv, "set_lg_dir")); -} - -int -__dbcl_set_lg_max(dbenv, max) - DB_ENV * dbenv; - u_int32_t max; -{ - COMPQUIET(max, 0); - return (__dbcl_rpc_illegal(dbenv, "set_lg_max")); -} - -int -__dbcl_set_lk_conflict(dbenv, conflicts, modes) - DB_ENV * dbenv; - u_int8_t * conflicts; - int modes; -{ - COMPQUIET(conflicts, 0); - COMPQUIET(modes, 0); - return (__dbcl_rpc_illegal(dbenv, "set_lk_conflict")); -} - -int -__dbcl_set_lk_detect(dbenv, detect) - DB_ENV * dbenv; - u_int32_t detect; -{ - COMPQUIET(detect, 0); - return (__dbcl_rpc_illegal(dbenv, "set_lk_detect")); -} - -int -__dbcl_set_lk_max(dbenv, max) - DB_ENV * dbenv; - u_int32_t max; -{ - COMPQUIET(max, 0); - return (__dbcl_rpc_illegal(dbenv, "set_lk_max")); -} - -int -__dbcl_set_lk_max_locks(dbenv, max) - DB_ENV * dbenv; - u_int32_t max; -{ - COMPQUIET(max, 0); - return (__dbcl_rpc_illegal(dbenv, "set_lk_max_locks")); -} - -int -__dbcl_set_lk_max_lockers(dbenv, max) - DB_ENV * dbenv; - u_int32_t max; -{ - COMPQUIET(max, 0); - return (__dbcl_rpc_illegal(dbenv, "set_lk_max_lockers")); -} - -int -__dbcl_set_lk_max_objects(dbenv, max) - DB_ENV * dbenv; - u_int32_t max; -{ - COMPQUIET(max, 0); - return (__dbcl_rpc_illegal(dbenv, "set_lk_max_objects")); -} - -int -__dbcl_set_mp_mmapsize(dbenv, mmapsize) - DB_ENV * dbenv; - size_t mmapsize; -{ - COMPQUIET(mmapsize, 0); - return (__dbcl_rpc_illegal(dbenv, "set_mp_mmapsize")); -} - -int -__dbcl_set_mutex_locks(dbenv, do_lock) - DB_ENV * dbenv; - int do_lock; -{ - COMPQUIET(do_lock, 0); - return (__dbcl_rpc_illegal(dbenv, "set_mutex_locks")); -} - -int -__dbcl_env_open(dbenv, home, flags, mode) - DB_ENV * dbenv; - const char * home; - u_int32_t flags; - int mode; -{ - CLIENT *cl; - __env_open_msg req; - static __env_open_reply *replyp = NULL; - int ret; - - ret = 0; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___env_open_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbenv == NULL) - req.dbenvcl_id = 0; - else - req.dbenvcl_id = dbenv->cl_id; - if (home == NULL) - req.home = ""; - else - req.home = (char *)home; - req.flags = flags; - req.mode = mode; - - replyp = __db_env_open_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_env_open_ret(dbenv, home, flags, mode, replyp)); -out: - return (ret); -} - -int -__dbcl_env_paniccall(dbenv, func0) - DB_ENV * dbenv; - void (*func0) __P((DB_ENV *, int)); -{ - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "env_paniccall")); -} - -int -__dbcl_set_recovery_init(dbenv, func0) - DB_ENV * dbenv; - int (*func0) __P((DB_ENV *)); -{ - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "set_recovery_init")); -} - -int -__dbcl_env_remove(dbenv, home, flags) - DB_ENV * dbenv; - const char * home; - u_int32_t flags; -{ - CLIENT *cl; - __env_remove_msg req; - static __env_remove_reply *replyp = NULL; - int ret; - - ret = 0; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___env_remove_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbenv == NULL) - req.dbenvcl_id = 0; - else - req.dbenvcl_id = dbenv->cl_id; - if (home == NULL) - req.home = ""; - else - req.home = (char *)home; - req.flags = flags; - - replyp = __db_env_remove_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_env_remove_ret(dbenv, home, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_set_shm_key(dbenv, shm_key) - DB_ENV * dbenv; - long shm_key; -{ - COMPQUIET(shm_key, 0); - return (__dbcl_rpc_illegal(dbenv, "set_shm_key")); -} - -int -__dbcl_set_tmp_dir(dbenv, dir) - DB_ENV * dbenv; - const char * dir; -{ - COMPQUIET(dir, NULL); - return (__dbcl_rpc_illegal(dbenv, "set_tmp_dir")); -} - -int -__dbcl_set_tx_recover(dbenv, func0) - DB_ENV * dbenv; - int (*func0) __P((DB_ENV *, DBT *, DB_LSN *, db_recops)); -{ - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "set_tx_recover")); -} - -int -__dbcl_set_tx_max(dbenv, max) - DB_ENV * dbenv; - u_int32_t max; -{ - COMPQUIET(max, 0); - return (__dbcl_rpc_illegal(dbenv, "set_tx_max")); -} - -int -__dbcl_set_tx_timestamp(dbenv, max) - DB_ENV * dbenv; - time_t * max; -{ - COMPQUIET(max, 0); - return (__dbcl_rpc_illegal(dbenv, "set_tx_timestamp")); -} - -int -__dbcl_set_verbose(dbenv, which, onoff) - DB_ENV * dbenv; - u_int32_t which; - int onoff; -{ - COMPQUIET(which, 0); - COMPQUIET(onoff, 0); - return (__dbcl_rpc_illegal(dbenv, "set_verbose")); -} - -int -__dbcl_txn_abort(txnp) - DB_TXN * txnp; -{ - CLIENT *cl; - __txn_abort_msg req; - static __txn_abort_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = txnp->mgrp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___txn_abort_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (txnp == NULL) - req.txnpcl_id = 0; - else - req.txnpcl_id = txnp->txnid; - - replyp = __db_txn_abort_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_txn_abort_ret(txnp, replyp)); -out: - return (ret); -} - -int -__dbcl_txn_begin(envp, parent, txnpp, flags) - DB_ENV * envp; - DB_TXN * parent; - DB_TXN ** txnpp; - u_int32_t flags; -{ - CLIENT *cl; - __txn_begin_msg req; - static __txn_begin_reply *replyp = NULL; - int ret; - - ret = 0; - if (envp == NULL || envp->cl_handle == NULL) { - __db_err(envp, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___txn_begin_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)envp->cl_handle; - - if (envp == NULL) - req.envpcl_id = 0; - else - req.envpcl_id = envp->cl_id; - if (parent == NULL) - req.parentcl_id = 0; - else - req.parentcl_id = parent->txnid; - req.flags = flags; - - replyp = __db_txn_begin_1(&req, cl); - if (replyp == NULL) { - __db_err(envp, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_txn_begin_ret(envp, parent, txnpp, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_txn_checkpoint(dbenv, kbyte, min) - DB_ENV * dbenv; - u_int32_t kbyte; - u_int32_t min; -{ - COMPQUIET(kbyte, 0); - COMPQUIET(min, 0); - return (__dbcl_rpc_illegal(dbenv, "txn_checkpoint")); -} - -int -__dbcl_txn_commit(txnp, flags) - DB_TXN * txnp; - u_int32_t flags; -{ - CLIENT *cl; - __txn_commit_msg req; - static __txn_commit_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = txnp->mgrp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___txn_commit_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (txnp == NULL) - req.txnpcl_id = 0; - else - req.txnpcl_id = txnp->txnid; - req.flags = flags; - - replyp = __db_txn_commit_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_txn_commit_ret(txnp, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_txn_prepare(txnp) - DB_TXN * txnp; -{ - DB_ENV *dbenv; - - dbenv = txnp->mgrp->dbenv; - return (__dbcl_rpc_illegal(dbenv, "txn_prepare")); -} - -int -__dbcl_txn_stat(dbenv, statp, func0) - DB_ENV * dbenv; - DB_TXN_STAT ** statp; - void *(*func0) __P((size_t)); -{ - COMPQUIET(statp, 0); - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "txn_stat")); -} - -int -__dbcl_db_bt_compare(dbp, func0) - DB * dbp; - int (*func0) __P((DB *, const DBT *, const DBT *)); -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "db_bt_compare")); -} - -int -__dbcl_db_bt_maxkey(dbp, maxkey) - DB * dbp; - u_int32_t maxkey; -{ - CLIENT *cl; - __db_bt_maxkey_msg req; - static __db_bt_maxkey_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_bt_maxkey_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.maxkey = maxkey; - - replyp = __db_db_bt_maxkey_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_bt_minkey(dbp, minkey) - DB * dbp; - u_int32_t minkey; -{ - CLIENT *cl; - __db_bt_minkey_msg req; - static __db_bt_minkey_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_bt_minkey_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.minkey = minkey; - - replyp = __db_db_bt_minkey_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_bt_prefix(dbp, func0) - DB * dbp; - size_t (*func0) __P((DB *, const DBT *, const DBT *)); -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "db_bt_prefix")); -} - -int -__dbcl_db_set_append_recno(dbp, func0) - DB * dbp; - int (*func0) __P((DB *, DBT *, db_recno_t)); -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "db_set_append_recno")); -} - -int -__dbcl_db_cachesize(dbp, gbytes, bytes, ncache) - DB * dbp; - u_int32_t gbytes; - u_int32_t bytes; - int ncache; -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(gbytes, 0); - COMPQUIET(bytes, 0); - COMPQUIET(ncache, 0); - return (__dbcl_rpc_illegal(dbenv, "db_cachesize")); -} - -int -__dbcl_db_close(dbp, flags) - DB * dbp; - u_int32_t flags; -{ - CLIENT *cl; - __db_close_msg req; - static __db_close_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_close_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.flags = flags; - - replyp = __db_db_close_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_db_close_ret(dbp, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_db_del(dbp, txnp, key, flags) - DB * dbp; - DB_TXN * txnp; - DBT * key; - u_int32_t flags; -{ - CLIENT *cl; - __db_del_msg req; - static __db_del_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_del_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - if (txnp == NULL) - req.txnpcl_id = 0; - else - req.txnpcl_id = txnp->txnid; - req.keydlen = key->dlen; - req.keydoff = key->doff; - req.keyflags = key->flags; - req.keydata.keydata_val = key->data; - req.keydata.keydata_len = key->size; - req.flags = flags; - - replyp = __db_db_del_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_extentsize(dbp, extentsize) - DB * dbp; - u_int32_t extentsize; -{ - CLIENT *cl; - __db_extentsize_msg req; - static __db_extentsize_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_extentsize_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.extentsize = extentsize; - - replyp = __db_db_extentsize_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_fd(dbp, fdp) - DB * dbp; - int * fdp; -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(fdp, 0); - return (__dbcl_rpc_illegal(dbenv, "db_fd")); -} - -int -__dbcl_db_feedback(dbp, func0) - DB * dbp; - void (*func0) __P((DB *, int, int)); -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "db_feedback")); -} - -int -__dbcl_db_flags(dbp, flags) - DB * dbp; - u_int32_t flags; -{ - CLIENT *cl; - __db_flags_msg req; - static __db_flags_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_flags_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.flags = flags; - - replyp = __db_db_flags_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_get(dbp, txnp, key, data, flags) - DB * dbp; - DB_TXN * txnp; - DBT * key; - DBT * data; - u_int32_t flags; -{ - CLIENT *cl; - __db_get_msg req; - static __db_get_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_get_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - if (txnp == NULL) - req.txnpcl_id = 0; - else - req.txnpcl_id = txnp->txnid; - req.keydlen = key->dlen; - req.keydoff = key->doff; - req.keyflags = key->flags; - req.keydata.keydata_val = key->data; - req.keydata.keydata_len = key->size; - req.datadlen = data->dlen; - req.datadoff = data->doff; - req.dataflags = data->flags; - req.datadata.datadata_val = data->data; - req.datadata.datadata_len = data->size; - req.flags = flags; - - replyp = __db_db_get_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_db_get_ret(dbp, txnp, key, data, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_db_h_ffactor(dbp, ffactor) - DB * dbp; - u_int32_t ffactor; -{ - CLIENT *cl; - __db_h_ffactor_msg req; - static __db_h_ffactor_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_h_ffactor_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.ffactor = ffactor; - - replyp = __db_db_h_ffactor_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_h_hash(dbp, func0) - DB * dbp; - u_int32_t (*func0) __P((DB *, const void *, u_int32_t)); -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "db_h_hash")); -} - -int -__dbcl_db_h_nelem(dbp, nelem) - DB * dbp; - u_int32_t nelem; -{ - CLIENT *cl; - __db_h_nelem_msg req; - static __db_h_nelem_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_h_nelem_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.nelem = nelem; - - replyp = __db_db_h_nelem_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_key_range(dbp, txnp, key, range, flags) - DB * dbp; - DB_TXN * txnp; - DBT * key; - DB_KEY_RANGE * range; - u_int32_t flags; -{ - CLIENT *cl; - __db_key_range_msg req; - static __db_key_range_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_key_range_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - if (txnp == NULL) - req.txnpcl_id = 0; - else - req.txnpcl_id = txnp->txnid; - req.keydlen = key->dlen; - req.keydoff = key->doff; - req.keyflags = key->flags; - req.keydata.keydata_val = key->data; - req.keydata.keydata_len = key->size; - req.flags = flags; - - replyp = __db_db_key_range_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_db_key_range_ret(dbp, txnp, key, range, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_db_lorder(dbp, lorder) - DB * dbp; - int lorder; -{ - CLIENT *cl; - __db_lorder_msg req; - static __db_lorder_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_lorder_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.lorder = lorder; - - replyp = __db_db_lorder_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_malloc(dbp, func0) - DB * dbp; - void *(*func0) __P((size_t)); -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "db_malloc")); -} - -int -__dbcl_db_open(dbp, name, subdb, type, flags, mode) - DB * dbp; - const char * name; - const char * subdb; - DBTYPE type; - u_int32_t flags; - int mode; -{ - CLIENT *cl; - __db_open_msg req; - static __db_open_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_open_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - if (name == NULL) - req.name = ""; - else - req.name = (char *)name; - if (subdb == NULL) - req.subdb = ""; - else - req.subdb = (char *)subdb; - req.type = type; - req.flags = flags; - req.mode = mode; - - replyp = __db_db_open_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_db_open_ret(dbp, name, subdb, type, flags, mode, replyp)); -out: - return (ret); -} - -int -__dbcl_db_pagesize(dbp, pagesize) - DB * dbp; - u_int32_t pagesize; -{ - CLIENT *cl; - __db_pagesize_msg req; - static __db_pagesize_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_pagesize_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.pagesize = pagesize; - - replyp = __db_db_pagesize_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_panic(dbp, func0) - DB * dbp; - void (*func0) __P((DB_ENV *, int)); -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "db_panic")); -} - -int -__dbcl_db_put(dbp, txnp, key, data, flags) - DB * dbp; - DB_TXN * txnp; - DBT * key; - DBT * data; - u_int32_t flags; -{ - CLIENT *cl; - __db_put_msg req; - static __db_put_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_put_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - if (txnp == NULL) - req.txnpcl_id = 0; - else - req.txnpcl_id = txnp->txnid; - req.keydlen = key->dlen; - req.keydoff = key->doff; - req.keyflags = key->flags; - req.keydata.keydata_val = key->data; - req.keydata.keydata_len = key->size; - req.datadlen = data->dlen; - req.datadoff = data->doff; - req.dataflags = data->flags; - req.datadata.datadata_val = data->data; - req.datadata.datadata_len = data->size; - req.flags = flags; - - replyp = __db_db_put_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_db_put_ret(dbp, txnp, key, data, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_db_realloc(dbp, func0) - DB * dbp; - void *(*func0) __P((void *, size_t)); -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "db_realloc")); -} - -int -__dbcl_db_re_delim(dbp, delim) - DB * dbp; - int delim; -{ - CLIENT *cl; - __db_re_delim_msg req; - static __db_re_delim_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_re_delim_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.delim = delim; - - replyp = __db_db_re_delim_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_re_len(dbp, len) - DB * dbp; - u_int32_t len; -{ - CLIENT *cl; - __db_re_len_msg req; - static __db_re_len_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_re_len_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.len = len; - - replyp = __db_db_re_len_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_re_pad(dbp, pad) - DB * dbp; - int pad; -{ - CLIENT *cl; - __db_re_pad_msg req; - static __db_re_pad_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_re_pad_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.pad = pad; - - replyp = __db_db_re_pad_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_re_source(dbp, re_source) - DB * dbp; - const char * re_source; -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(re_source, NULL); - return (__dbcl_rpc_illegal(dbenv, "db_re_source")); -} - -int -__dbcl_db_remove(dbp, name, subdb, flags) - DB * dbp; - const char * name; - const char * subdb; - u_int32_t flags; -{ - CLIENT *cl; - __db_remove_msg req; - static __db_remove_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_remove_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - if (name == NULL) - req.name = ""; - else - req.name = (char *)name; - if (subdb == NULL) - req.subdb = ""; - else - req.subdb = (char *)subdb; - req.flags = flags; - - replyp = __db_db_remove_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_db_remove_ret(dbp, name, subdb, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_db_rename(dbp, name, subdb, newname, flags) - DB * dbp; - const char * name; - const char * subdb; - const char * newname; - u_int32_t flags; -{ - CLIENT *cl; - __db_rename_msg req; - static __db_rename_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_rename_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - if (name == NULL) - req.name = ""; - else - req.name = (char *)name; - if (subdb == NULL) - req.subdb = ""; - else - req.subdb = (char *)subdb; - if (newname == NULL) - req.newname = ""; - else - req.newname = (char *)newname; - req.flags = flags; - - replyp = __db_db_rename_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_db_rename_ret(dbp, name, subdb, newname, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_db_stat(dbp, sp, func0, flags) - DB * dbp; - void * sp; - void *(*func0) __P((size_t)); - u_int32_t flags; -{ - CLIENT *cl; - __db_stat_msg req; - static __db_stat_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_stat_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (func0 != NULL) { - __db_err(sp, "User functions not supported in RPC."); - return (EINVAL); - } - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.flags = flags; - - replyp = __db_db_stat_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_db_stat_ret(dbp, sp, func0, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_db_swapped(dbp) - DB * dbp; -{ - CLIENT *cl; - __db_swapped_msg req; - static __db_swapped_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_swapped_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - - replyp = __db_db_swapped_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_sync(dbp, flags) - DB * dbp; - u_int32_t flags; -{ - CLIENT *cl; - __db_sync_msg req; - static __db_sync_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_sync_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - req.flags = flags; - - replyp = __db_db_sync_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_db_upgrade(dbp, fname, flags) - DB * dbp; - const char * fname; - u_int32_t flags; -{ - DB_ENV *dbenv; - - dbenv = dbp->dbenv; - COMPQUIET(fname, NULL); - COMPQUIET(flags, 0); - return (__dbcl_rpc_illegal(dbenv, "db_upgrade")); -} - -int -__dbcl_db_cursor(dbp, txnp, dbcpp, flags) - DB * dbp; - DB_TXN * txnp; - DBC ** dbcpp; - u_int32_t flags; -{ - CLIENT *cl; - __db_cursor_msg req; - static __db_cursor_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_cursor_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - if (txnp == NULL) - req.txnpcl_id = 0; - else - req.txnpcl_id = txnp->txnid; - req.flags = flags; - - replyp = __db_db_cursor_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_db_cursor_ret(dbp, txnp, dbcpp, flags, replyp)); -out: - return (ret); -} - -static int __dbcl_db_join_curslist __P((__db_join_curslist **, DBC **)); -static void __dbcl_db_join_cursfree __P((__db_join_curslist **)); -int -__dbcl_db_join(dbp, curs, dbcp, flags) - DB * dbp; - DBC ** curs; - DBC ** dbcp; - u_int32_t flags; -{ - CLIENT *cl; - __db_join_msg req; - static __db_join_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___db_join_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbp == NULL) - req.dbpcl_id = 0; - else - req.dbpcl_id = dbp->cl_id; - if ((ret = __dbcl_db_join_curslist(&req.curslist, curs)) != 0) - goto out; - req.flags = flags; - - replyp = __db_db_join_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - __dbcl_db_join_cursfree(&req.curslist); - return (__dbcl_db_join_ret(dbp, curs, dbcp, flags, replyp)); -out: - __dbcl_db_join_cursfree(&req.curslist); - return (ret); -} - -int -__dbcl_db_join_curslist(locp, pp) - __db_join_curslist **locp; - DBC ** pp; -{ - DBC ** p; - u_int32_t *q; - int ret; - __db_join_curslist *nl, **nlp; - - *locp = NULL; - if (pp == NULL) - return (0); - nlp = locp; - for (p = pp; *p != 0; p++) { - if ((ret = __os_malloc(NULL, sizeof(*nl), NULL, nlp)) != 0) - goto out; - nl = *nlp; - nl->next = NULL; - nl->ent.ent_val = NULL; - nl->ent.ent_len = 0; - if ((ret = __os_malloc(NULL, sizeof(u_int32_t), NULL, &nl->ent.ent_val)) != 0) - goto out; - q = (u_int32_t *)nl->ent.ent_val; - *q = (*p)->cl_id; - nl->ent.ent_len = sizeof(u_int32_t); - nlp = &nl->next; - } - return (0); -out: - __dbcl_db_join_cursfree(locp); - return (ret); -} - -void -__dbcl_db_join_cursfree(locp) - __db_join_curslist **locp; -{ - __db_join_curslist *nl, *nl1; - - if (locp == NULL) - return; - for (nl = *locp; nl != NULL; nl = nl1) { - nl1 = nl->next; - if (nl->ent.ent_val) - __os_free(nl->ent.ent_val, nl->ent.ent_len); - __os_free(nl, sizeof(*nl)); - } -} - -int -__dbcl_dbc_close(dbc) - DBC * dbc; -{ - CLIENT *cl; - __dbc_close_msg req; - static __dbc_close_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbc->dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___dbc_close_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbc == NULL) - req.dbccl_id = 0; - else - req.dbccl_id = dbc->cl_id; - - replyp = __db_dbc_close_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_dbc_close_ret(dbc, replyp)); -out: - return (ret); -} - -int -__dbcl_dbc_count(dbc, countp, flags) - DBC * dbc; - db_recno_t * countp; - u_int32_t flags; -{ - CLIENT *cl; - __dbc_count_msg req; - static __dbc_count_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbc->dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___dbc_count_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbc == NULL) - req.dbccl_id = 0; - else - req.dbccl_id = dbc->cl_id; - req.flags = flags; - - replyp = __db_dbc_count_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_dbc_count_ret(dbc, countp, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_dbc_del(dbc, flags) - DBC * dbc; - u_int32_t flags; -{ - CLIENT *cl; - __dbc_del_msg req; - static __dbc_del_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbc->dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___dbc_del_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbc == NULL) - req.dbccl_id = 0; - else - req.dbccl_id = dbc->cl_id; - req.flags = flags; - - replyp = __db_dbc_del_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - ret = replyp->status; -out: - return (ret); -} - -int -__dbcl_dbc_dup(dbc, dbcp, flags) - DBC * dbc; - DBC ** dbcp; - u_int32_t flags; -{ - CLIENT *cl; - __dbc_dup_msg req; - static __dbc_dup_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbc->dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___dbc_dup_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbc == NULL) - req.dbccl_id = 0; - else - req.dbccl_id = dbc->cl_id; - req.flags = flags; - - replyp = __db_dbc_dup_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_dbc_dup_ret(dbc, dbcp, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_dbc_get(dbc, key, data, flags) - DBC * dbc; - DBT * key; - DBT * data; - u_int32_t flags; -{ - CLIENT *cl; - __dbc_get_msg req; - static __dbc_get_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbc->dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___dbc_get_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbc == NULL) - req.dbccl_id = 0; - else - req.dbccl_id = dbc->cl_id; - req.keydlen = key->dlen; - req.keydoff = key->doff; - req.keyflags = key->flags; - req.keydata.keydata_val = key->data; - req.keydata.keydata_len = key->size; - req.datadlen = data->dlen; - req.datadoff = data->doff; - req.dataflags = data->flags; - req.datadata.datadata_val = data->data; - req.datadata.datadata_len = data->size; - req.flags = flags; - - replyp = __db_dbc_get_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_dbc_get_ret(dbc, key, data, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_dbc_put(dbc, key, data, flags) - DBC * dbc; - DBT * key; - DBT * data; - u_int32_t flags; -{ - CLIENT *cl; - __dbc_put_msg req; - static __dbc_put_reply *replyp = NULL; - int ret; - DB_ENV *dbenv; - - ret = 0; - dbenv = NULL; - dbenv = dbc->dbp->dbenv; - if (dbenv == NULL || dbenv->cl_handle == NULL) { - __db_err(dbenv, "No server environment."); - return (DB_NOSERVER); - } - - if (replyp != NULL) { - xdr_free((xdrproc_t)xdr___dbc_put_reply, (void *)replyp); - replyp = NULL; - } - cl = (CLIENT *)dbenv->cl_handle; - - if (dbc == NULL) - req.dbccl_id = 0; - else - req.dbccl_id = dbc->cl_id; - req.keydlen = key->dlen; - req.keydoff = key->doff; - req.keyflags = key->flags; - req.keydata.keydata_val = key->data; - req.keydata.keydata_len = key->size; - req.datadlen = data->dlen; - req.datadoff = data->doff; - req.dataflags = data->flags; - req.datadata.datadata_val = data->data; - req.datadata.datadata_len = data->size; - req.flags = flags; - - replyp = __db_dbc_put_1(&req, cl); - if (replyp == NULL) { - __db_err(dbenv, clnt_sperror(cl, "Berkeley DB")); - ret = DB_NOSERVER; - goto out; - } - return (__dbcl_dbc_put_ret(dbc, key, data, flags, replyp)); -out: - return (ret); -} - -int -__dbcl_lock_detect(dbenv, flags, atype, aborted) - DB_ENV * dbenv; - u_int32_t flags; - u_int32_t atype; - int * aborted; -{ - COMPQUIET(flags, 0); - COMPQUIET(atype, 0); - COMPQUIET(aborted, 0); - return (__dbcl_rpc_illegal(dbenv, "lock_detect")); -} - -int -__dbcl_lock_get(dbenv, locker, flags, obj, mode, lock) - DB_ENV * dbenv; - u_int32_t locker; - u_int32_t flags; - const DBT * obj; - db_lockmode_t mode; - DB_LOCK * lock; -{ - COMPQUIET(locker, 0); - COMPQUIET(flags, 0); - COMPQUIET(obj, NULL); - COMPQUIET(mode, 0); - COMPQUIET(lock, 0); - return (__dbcl_rpc_illegal(dbenv, "lock_get")); -} - -int -__dbcl_lock_id(dbenv, idp) - DB_ENV * dbenv; - u_int32_t * idp; -{ - COMPQUIET(idp, 0); - return (__dbcl_rpc_illegal(dbenv, "lock_id")); -} - -int -__dbcl_lock_put(dbenv, lock) - DB_ENV * dbenv; - DB_LOCK * lock; -{ - COMPQUIET(lock, 0); - return (__dbcl_rpc_illegal(dbenv, "lock_put")); -} - -int -__dbcl_lock_stat(dbenv, statp, func0) - DB_ENV * dbenv; - DB_LOCK_STAT ** statp; - void *(*func0) __P((size_t)); -{ - COMPQUIET(statp, 0); - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "lock_stat")); -} - -int -__dbcl_lock_vec(dbenv, locker, flags, list, nlist, elistp) - DB_ENV * dbenv; - u_int32_t locker; - u_int32_t flags; - DB_LOCKREQ * list; - int nlist; - DB_LOCKREQ ** elistp; -{ - COMPQUIET(locker, 0); - COMPQUIET(flags, 0); - COMPQUIET(list, 0); - COMPQUIET(nlist, 0); - COMPQUIET(elistp, 0); - return (__dbcl_rpc_illegal(dbenv, "lock_vec")); -} - -int -__dbcl_log_archive(dbenv, listp, flags, func0) - DB_ENV * dbenv; - char *** listp; - u_int32_t flags; - void *(*func0) __P((size_t)); -{ - COMPQUIET(listp, 0); - COMPQUIET(flags, 0); - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "log_archive")); -} - -int -__dbcl_log_file(dbenv, lsn, namep, len) - DB_ENV * dbenv; - const DB_LSN * lsn; - char * namep; - size_t len; -{ - COMPQUIET(lsn, NULL); - COMPQUIET(namep, NULL); - COMPQUIET(len, 0); - return (__dbcl_rpc_illegal(dbenv, "log_file")); -} - -int -__dbcl_log_flush(dbenv, lsn) - DB_ENV * dbenv; - const DB_LSN * lsn; -{ - COMPQUIET(lsn, NULL); - return (__dbcl_rpc_illegal(dbenv, "log_flush")); -} - -int -__dbcl_log_get(dbenv, lsn, data, flags) - DB_ENV * dbenv; - DB_LSN * lsn; - DBT * data; - u_int32_t flags; -{ - COMPQUIET(lsn, 0); - COMPQUIET(data, NULL); - COMPQUIET(flags, 0); - return (__dbcl_rpc_illegal(dbenv, "log_get")); -} - -int -__dbcl_log_put(dbenv, lsn, data, flags) - DB_ENV * dbenv; - DB_LSN * lsn; - const DBT * data; - u_int32_t flags; -{ - COMPQUIET(lsn, 0); - COMPQUIET(data, NULL); - COMPQUIET(flags, 0); - return (__dbcl_rpc_illegal(dbenv, "log_put")); -} - -int -__dbcl_log_register(dbenv, dbp, namep) - DB_ENV * dbenv; - DB * dbp; - const char * namep; -{ - COMPQUIET(dbp, 0); - COMPQUIET(namep, NULL); - return (__dbcl_rpc_illegal(dbenv, "log_register")); -} - -int -__dbcl_log_stat(dbenv, statp, func0) - DB_ENV * dbenv; - DB_LOG_STAT ** statp; - void *(*func0) __P((size_t)); -{ - COMPQUIET(statp, 0); - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "log_stat")); -} - -int -__dbcl_log_unregister(dbenv, dbp) - DB_ENV * dbenv; - DB * dbp; -{ - COMPQUIET(dbp, 0); - return (__dbcl_rpc_illegal(dbenv, "log_unregister")); -} - -int -__dbcl_memp_fclose(mpf) - DB_MPOOLFILE * mpf; -{ - DB_ENV *dbenv; - - dbenv = mpf->dbmp->dbenv; - return (__dbcl_rpc_illegal(dbenv, "memp_fclose")); -} - -int -__dbcl_memp_fget(mpf, pgno, flags, pagep) - DB_MPOOLFILE * mpf; - db_pgno_t * pgno; - u_int32_t flags; - void ** pagep; -{ - DB_ENV *dbenv; - - dbenv = mpf->dbmp->dbenv; - COMPQUIET(pgno, 0); - COMPQUIET(flags, 0); - COMPQUIET(pagep, 0); - return (__dbcl_rpc_illegal(dbenv, "memp_fget")); -} - -int -__dbcl_memp_fopen(dbenv, file, flags, mode, pagesize, finfop, mpf) - DB_ENV * dbenv; - const char * file; - u_int32_t flags; - int mode; - size_t pagesize; - DB_MPOOL_FINFO * finfop; - DB_MPOOLFILE ** mpf; -{ - COMPQUIET(file, NULL); - COMPQUIET(flags, 0); - COMPQUIET(mode, 0); - COMPQUIET(pagesize, 0); - COMPQUIET(finfop, 0); - COMPQUIET(mpf, 0); - return (__dbcl_rpc_illegal(dbenv, "memp_fopen")); -} - -int -__dbcl_memp_fput(mpf, pgaddr, flags) - DB_MPOOLFILE * mpf; - void * pgaddr; - u_int32_t flags; -{ - DB_ENV *dbenv; - - dbenv = mpf->dbmp->dbenv; - COMPQUIET(pgaddr, 0); - COMPQUIET(flags, 0); - return (__dbcl_rpc_illegal(dbenv, "memp_fput")); -} - -int -__dbcl_memp_fset(mpf, pgaddr, flags) - DB_MPOOLFILE * mpf; - void * pgaddr; - u_int32_t flags; -{ - DB_ENV *dbenv; - - dbenv = mpf->dbmp->dbenv; - COMPQUIET(pgaddr, 0); - COMPQUIET(flags, 0); - return (__dbcl_rpc_illegal(dbenv, "memp_fset")); -} - -int -__dbcl_memp_fsync(mpf) - DB_MPOOLFILE * mpf; -{ - DB_ENV *dbenv; - - dbenv = mpf->dbmp->dbenv; - return (__dbcl_rpc_illegal(dbenv, "memp_fsync")); -} - -int -__dbcl_memp_register(dbenv, ftype, func0, func1) - DB_ENV * dbenv; - int ftype; - int (*func0) __P((DB_ENV *, db_pgno_t, void *, DBT *)); - int (*func1) __P((DB_ENV *, db_pgno_t, void *, DBT *)); -{ - COMPQUIET(ftype, 0); - COMPQUIET(func0, 0); - COMPQUIET(func1, 0); - return (__dbcl_rpc_illegal(dbenv, "memp_register")); -} - -int -__dbcl_memp_stat(dbenv, gstatp, fstatp, func0) - DB_ENV * dbenv; - DB_MPOOL_STAT ** gstatp; - DB_MPOOL_FSTAT *** fstatp; - void *(*func0) __P((size_t)); -{ - COMPQUIET(gstatp, 0); - COMPQUIET(fstatp, 0); - COMPQUIET(func0, 0); - return (__dbcl_rpc_illegal(dbenv, "memp_stat")); -} - -int -__dbcl_memp_sync(dbenv, lsn) - DB_ENV * dbenv; - DB_LSN * lsn; -{ - COMPQUIET(lsn, 0); - return (__dbcl_rpc_illegal(dbenv, "memp_sync")); -} - -int -__dbcl_memp_trickle(dbenv, pct, nwrotep) - DB_ENV * dbenv; - int pct; - int * nwrotep; -{ - COMPQUIET(pct, 0); - COMPQUIET(nwrotep, 0); - return (__dbcl_rpc_illegal(dbenv, "memp_trickle")); -} - -#endif /* HAVE_RPC */ |