00001
00002 #include "db_config.h"
00003
00004 #ifndef NO_SYSTEM_INCLUDES
00005 #include <sys/types.h>
00006
00007 #include <rpc/rpc.h>
00008
00009 #include <string.h>
00010 #endif
00011
00012 #include "db_server.h"
00013
00014 #include "db_int.h"
00015 #include "dbinc/txn.h"
00016 #include "dbinc_auto/rpc_client_ext.h"
00017
00018 static int __dbcl_dbp_illegal __P((DB *));
00019 static int __dbcl_noserver __P((DB_ENV *));
00020 static int __dbcl_txn_illegal __P((DB_TXN *));
00021
00022 static int
00023 __dbcl_noserver(dbenv)
00024 DB_ENV *dbenv;
00025 {
00026 __db_err(dbenv, "No Berkeley DB RPC server environment");
00027 return (DB_NOSERVER);
00028 }
00029
00030
00031
00032
00033
00034
00035
00036 int
00037 __dbcl_dbenv_illegal(dbenv)
00038 DB_ENV *dbenv;
00039 {
00040 __db_err(dbenv,
00041 "Interface not supported by Berkeley DB RPC client environments");
00042 return (DB_OPNOTSUP);
00043 }
00044
00045
00046
00047
00048
00049 static int
00050 __dbcl_dbp_illegal(dbp)
00051 DB *dbp;
00052 {
00053 return (__dbcl_dbenv_illegal(dbp->dbenv));
00054 }
00055
00056
00057
00058
00059
00060 static int
00061 __dbcl_txn_illegal(txn)
00062 DB_TXN *txn;
00063 {
00064 return (__dbcl_dbenv_illegal(txn->mgrp->dbenv));
00065 }
00066
00067
00068
00069
00070 int
00071 __dbcl_env_create(dbenv, timeout)
00072 DB_ENV * dbenv;
00073 long timeout;
00074 {
00075 CLIENT *cl;
00076 __env_create_msg msg;
00077 __env_create_reply *replyp = NULL;
00078 int ret;
00079
00080 ret = 0;
00081 if (dbenv == NULL || !RPC_ON(dbenv))
00082 return (__dbcl_noserver(dbenv));
00083
00084 cl = (CLIENT *)dbenv->cl_handle;
00085
00086 msg.timeout = timeout;
00087
00088 replyp = __db_env_create_4004(&msg, cl);
00089 if (replyp == NULL) {
00090 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00091 ret = DB_NOSERVER;
00092 goto out;
00093 }
00094 ret = __dbcl_env_create_ret(dbenv, timeout, replyp);
00095 out:
00096 if (replyp != NULL)
00097 xdr_free((xdrproc_t)xdr___env_create_reply, (void *)replyp);
00098 return (ret);
00099 }
00100
00101
00102
00103
00104 int
00105 __dbcl_env_close(dbenv, flags)
00106 DB_ENV * dbenv;
00107 u_int32_t flags;
00108 {
00109 CLIENT *cl;
00110 __env_close_msg msg;
00111 __env_close_reply *replyp = NULL;
00112 int ret;
00113
00114 ret = 0;
00115 if (dbenv == NULL || !RPC_ON(dbenv))
00116 return (__dbcl_noserver(dbenv));
00117
00118 cl = (CLIENT *)dbenv->cl_handle;
00119
00120 msg.dbenvcl_id = dbenv->cl_id;
00121 msg.flags = flags;
00122
00123 replyp = __db_env_close_4004(&msg, cl);
00124 if (replyp == NULL) {
00125 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00126 ret = DB_NOSERVER;
00127 goto out;
00128 }
00129 ret = replyp->status;
00130 out:
00131 if (replyp != NULL)
00132 xdr_free((xdrproc_t)xdr___env_close_reply, (void *)replyp);
00133 return (ret);
00134 }
00135
00136
00137
00138
00139
00140 int
00141 __dbcl_env_dbremove(dbenv, txnp, name, subdb, flags)
00142 DB_ENV * dbenv;
00143 DB_TXN * txnp;
00144 const char * name;
00145 const char * subdb;
00146 u_int32_t flags;
00147 {
00148 CLIENT *cl;
00149 __env_dbremove_msg msg;
00150 __env_dbremove_reply *replyp = NULL;
00151 int ret;
00152
00153 ret = 0;
00154 if (dbenv == NULL || !RPC_ON(dbenv))
00155 return (__dbcl_noserver(dbenv));
00156
00157 cl = (CLIENT *)dbenv->cl_handle;
00158
00159 msg.dbenvcl_id = dbenv->cl_id;
00160 if (txnp == NULL)
00161 msg.txnpcl_id = 0;
00162 else
00163 msg.txnpcl_id = txnp->txnid;
00164 if (name == NULL)
00165 msg.name = "";
00166 else
00167 msg.name = (char *)name;
00168 if (subdb == NULL)
00169 msg.subdb = "";
00170 else
00171 msg.subdb = (char *)subdb;
00172 msg.flags = flags;
00173
00174 replyp = __db_env_dbremove_4004(&msg, cl);
00175 if (replyp == NULL) {
00176 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00177 ret = DB_NOSERVER;
00178 goto out;
00179 }
00180 ret = replyp->status;
00181 out:
00182 if (replyp != NULL)
00183 xdr_free((xdrproc_t)xdr___env_dbremove_reply, (void *)replyp);
00184 return (ret);
00185 }
00186
00187
00188
00189
00190
00191 int
00192 __dbcl_env_dbrename(dbenv, txnp, name, subdb, newname, flags)
00193 DB_ENV * dbenv;
00194 DB_TXN * txnp;
00195 const char * name;
00196 const char * subdb;
00197 const char * newname;
00198 u_int32_t flags;
00199 {
00200 CLIENT *cl;
00201 __env_dbrename_msg msg;
00202 __env_dbrename_reply *replyp = NULL;
00203 int ret;
00204
00205 ret = 0;
00206 if (dbenv == NULL || !RPC_ON(dbenv))
00207 return (__dbcl_noserver(dbenv));
00208
00209 cl = (CLIENT *)dbenv->cl_handle;
00210
00211 msg.dbenvcl_id = dbenv->cl_id;
00212 if (txnp == NULL)
00213 msg.txnpcl_id = 0;
00214 else
00215 msg.txnpcl_id = txnp->txnid;
00216 if (name == NULL)
00217 msg.name = "";
00218 else
00219 msg.name = (char *)name;
00220 if (subdb == NULL)
00221 msg.subdb = "";
00222 else
00223 msg.subdb = (char *)subdb;
00224 if (newname == NULL)
00225 msg.newname = "";
00226 else
00227 msg.newname = (char *)newname;
00228 msg.flags = flags;
00229
00230 replyp = __db_env_dbrename_4004(&msg, cl);
00231 if (replyp == NULL) {
00232 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00233 ret = DB_NOSERVER;
00234 goto out;
00235 }
00236 ret = replyp->status;
00237 out:
00238 if (replyp != NULL)
00239 xdr_free((xdrproc_t)xdr___env_dbrename_reply, (void *)replyp);
00240 return (ret);
00241 }
00242
00243
00244
00245
00246
00247 int
00248 __dbcl_env_get_cachesize(dbenv, gbytesp, bytesp, ncachep)
00249 DB_ENV * dbenv;
00250 u_int32_t * gbytesp;
00251 u_int32_t * bytesp;
00252 int * ncachep;
00253 {
00254 CLIENT *cl;
00255 __env_get_cachesize_msg msg;
00256 __env_get_cachesize_reply *replyp = NULL;
00257 int ret;
00258
00259 ret = 0;
00260 if (dbenv == NULL || !RPC_ON(dbenv))
00261 return (__dbcl_noserver(dbenv));
00262
00263 cl = (CLIENT *)dbenv->cl_handle;
00264
00265 msg.dbenvcl_id = dbenv->cl_id;
00266
00267 replyp = __db_env_get_cachesize_4004(&msg, cl);
00268 if (replyp == NULL) {
00269 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00270 ret = DB_NOSERVER;
00271 goto out;
00272 }
00273 ret = replyp->status;
00274 if (gbytesp != NULL)
00275 *gbytesp = replyp->gbytes;
00276 if (bytesp != NULL)
00277 *bytesp = replyp->bytes;
00278 if (ncachep != NULL)
00279 *ncachep = replyp->ncache;
00280 out:
00281 if (replyp != NULL)
00282 xdr_free((xdrproc_t)xdr___env_get_cachesize_reply, (void *)replyp);
00283 return (ret);
00284 }
00285
00286
00287
00288
00289 int
00290 __dbcl_env_get_encrypt_flags(dbenv, flagsp)
00291 DB_ENV * dbenv;
00292 u_int32_t * flagsp;
00293 {
00294 CLIENT *cl;
00295 __env_get_encrypt_flags_msg msg;
00296 __env_get_encrypt_flags_reply *replyp = NULL;
00297 int ret;
00298
00299 ret = 0;
00300 if (dbenv == NULL || !RPC_ON(dbenv))
00301 return (__dbcl_noserver(dbenv));
00302
00303 cl = (CLIENT *)dbenv->cl_handle;
00304
00305 msg.dbenvcl_id = dbenv->cl_id;
00306
00307 replyp = __db_env_get_encrypt_flags_4004(&msg, cl);
00308 if (replyp == NULL) {
00309 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00310 ret = DB_NOSERVER;
00311 goto out;
00312 }
00313 ret = replyp->status;
00314 if (flagsp != NULL)
00315 *flagsp = replyp->flags;
00316 out:
00317 if (replyp != NULL)
00318 xdr_free((xdrproc_t)xdr___env_get_encrypt_flags_reply, (void *)replyp);
00319 return (ret);
00320 }
00321
00322
00323
00324
00325 int
00326 __dbcl_env_get_flags(dbenv, flagsp)
00327 DB_ENV * dbenv;
00328 u_int32_t * flagsp;
00329 {
00330 CLIENT *cl;
00331 __env_get_flags_msg msg;
00332 __env_get_flags_reply *replyp = NULL;
00333 int ret;
00334
00335 ret = 0;
00336 if (dbenv == NULL || !RPC_ON(dbenv))
00337 return (__dbcl_noserver(dbenv));
00338
00339 cl = (CLIENT *)dbenv->cl_handle;
00340
00341 msg.dbenvcl_id = dbenv->cl_id;
00342
00343 replyp = __db_env_get_flags_4004(&msg, cl);
00344 if (replyp == NULL) {
00345 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00346 ret = DB_NOSERVER;
00347 goto out;
00348 }
00349 ret = replyp->status;
00350 if (flagsp != NULL)
00351 *flagsp = replyp->flags;
00352 out:
00353 if (replyp != NULL)
00354 xdr_free((xdrproc_t)xdr___env_get_flags_reply, (void *)replyp);
00355 return (ret);
00356 }
00357
00358
00359
00360
00361 int
00362 __dbcl_env_get_home(dbenv, homep)
00363 DB_ENV * dbenv;
00364 const char * * homep;
00365 {
00366 CLIENT *cl;
00367 __env_get_home_msg msg;
00368 __env_get_home_reply *replyp = NULL;
00369 int ret;
00370
00371 ret = 0;
00372 if (dbenv == NULL || !RPC_ON(dbenv))
00373 return (__dbcl_noserver(dbenv));
00374
00375 cl = (CLIENT *)dbenv->cl_handle;
00376
00377 msg.dbenvcl_id = dbenv->cl_id;
00378
00379 replyp = __db_env_get_home_4004(&msg, cl);
00380 if (replyp == NULL) {
00381 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00382 ret = DB_NOSERVER;
00383 goto out;
00384 }
00385 ret = replyp->status;
00386 if (homep != NULL)
00387 *homep = replyp->home;
00388 out:
00389 if (replyp != NULL)
00390 xdr_free((xdrproc_t)xdr___env_get_home_reply, (void *)replyp);
00391 return (ret);
00392 }
00393
00394
00395
00396
00397 int
00398 __dbcl_env_get_open_flags(dbenv, flagsp)
00399 DB_ENV * dbenv;
00400 u_int32_t * flagsp;
00401 {
00402 CLIENT *cl;
00403 __env_get_open_flags_msg msg;
00404 __env_get_open_flags_reply *replyp = NULL;
00405 int ret;
00406
00407 ret = 0;
00408 if (dbenv == NULL || !RPC_ON(dbenv))
00409 return (__dbcl_noserver(dbenv));
00410
00411 cl = (CLIENT *)dbenv->cl_handle;
00412
00413 msg.dbenvcl_id = dbenv->cl_id;
00414
00415 replyp = __db_env_get_open_flags_4004(&msg, cl);
00416 if (replyp == NULL) {
00417 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00418 ret = DB_NOSERVER;
00419 goto out;
00420 }
00421 ret = replyp->status;
00422 if (flagsp != NULL)
00423 *flagsp = replyp->flags;
00424 out:
00425 if (replyp != NULL)
00426 xdr_free((xdrproc_t)xdr___env_get_open_flags_reply, (void *)replyp);
00427 return (ret);
00428 }
00429
00430
00431
00432
00433 int
00434 __dbcl_env_open(dbenv, home, flags, mode)
00435 DB_ENV * dbenv;
00436 const char * home;
00437 u_int32_t flags;
00438 int mode;
00439 {
00440 CLIENT *cl;
00441 __env_open_msg msg;
00442 __env_open_reply *replyp = NULL;
00443 int ret;
00444
00445 ret = 0;
00446 if (dbenv == NULL || !RPC_ON(dbenv))
00447 return (__dbcl_noserver(dbenv));
00448
00449 cl = (CLIENT *)dbenv->cl_handle;
00450
00451 msg.dbenvcl_id = dbenv->cl_id;
00452 if (home == NULL)
00453 msg.home = "";
00454 else
00455 msg.home = (char *)home;
00456 msg.flags = flags;
00457 msg.mode = mode;
00458
00459 replyp = __db_env_open_4004(&msg, cl);
00460 if (replyp == NULL) {
00461 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00462 ret = DB_NOSERVER;
00463 goto out;
00464 }
00465 ret = __dbcl_env_open_ret(dbenv, home, flags, mode, replyp);
00466 out:
00467 if (replyp != NULL)
00468 xdr_free((xdrproc_t)xdr___env_open_reply, (void *)replyp);
00469 return (ret);
00470 }
00471
00472
00473
00474
00475 int
00476 __dbcl_env_remove(dbenv, home, flags)
00477 DB_ENV * dbenv;
00478 const char * home;
00479 u_int32_t flags;
00480 {
00481 CLIENT *cl;
00482 __env_remove_msg msg;
00483 __env_remove_reply *replyp = NULL;
00484 int ret;
00485
00486 ret = 0;
00487 if (dbenv == NULL || !RPC_ON(dbenv))
00488 return (__dbcl_noserver(dbenv));
00489
00490 cl = (CLIENT *)dbenv->cl_handle;
00491
00492 msg.dbenvcl_id = dbenv->cl_id;
00493 if (home == NULL)
00494 msg.home = "";
00495 else
00496 msg.home = (char *)home;
00497 msg.flags = flags;
00498
00499 replyp = __db_env_remove_4004(&msg, cl);
00500 if (replyp == NULL) {
00501 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00502 ret = DB_NOSERVER;
00503 goto out;
00504 }
00505 ret = __dbcl_env_remove_ret(dbenv, home, flags, replyp);
00506 out:
00507 if (replyp != NULL)
00508 xdr_free((xdrproc_t)xdr___env_remove_reply, (void *)replyp);
00509 return (ret);
00510 }
00511
00512
00513
00514
00515
00516 int
00517 __dbcl_env_set_cachesize(dbenv, gbytes, bytes, ncache)
00518 DB_ENV * dbenv;
00519 u_int32_t gbytes;
00520 u_int32_t bytes;
00521 int ncache;
00522 {
00523 CLIENT *cl;
00524 __env_set_cachesize_msg msg;
00525 __env_set_cachesize_reply *replyp = NULL;
00526 int ret;
00527
00528 ret = 0;
00529 if (dbenv == NULL || !RPC_ON(dbenv))
00530 return (__dbcl_noserver(dbenv));
00531
00532 cl = (CLIENT *)dbenv->cl_handle;
00533
00534 msg.dbenvcl_id = dbenv->cl_id;
00535 msg.gbytes = gbytes;
00536 msg.bytes = bytes;
00537 msg.ncache = ncache;
00538
00539 replyp = __db_env_set_cachesize_4004(&msg, cl);
00540 if (replyp == NULL) {
00541 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00542 ret = DB_NOSERVER;
00543 goto out;
00544 }
00545 ret = replyp->status;
00546 out:
00547 if (replyp != NULL)
00548 xdr_free((xdrproc_t)xdr___env_set_cachesize_reply, (void *)replyp);
00549 return (ret);
00550 }
00551
00552
00553
00554
00555 int
00556 __dbcl_env_set_encrypt(dbenv, passwd, flags)
00557 DB_ENV * dbenv;
00558 const char * passwd;
00559 u_int32_t flags;
00560 {
00561 CLIENT *cl;
00562 __env_set_encrypt_msg msg;
00563 __env_set_encrypt_reply *replyp = NULL;
00564 int ret;
00565
00566 ret = 0;
00567 if (dbenv == NULL || !RPC_ON(dbenv))
00568 return (__dbcl_noserver(dbenv));
00569
00570 cl = (CLIENT *)dbenv->cl_handle;
00571
00572 msg.dbenvcl_id = dbenv->cl_id;
00573 if (passwd == NULL)
00574 msg.passwd = "";
00575 else
00576 msg.passwd = (char *)passwd;
00577 msg.flags = flags;
00578
00579 replyp = __db_env_set_encrypt_4004(&msg, cl);
00580 if (replyp == NULL) {
00581 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00582 ret = DB_NOSERVER;
00583 goto out;
00584 }
00585 ret = replyp->status;
00586 out:
00587 if (replyp != NULL)
00588 xdr_free((xdrproc_t)xdr___env_set_encrypt_reply, (void *)replyp);
00589 return (ret);
00590 }
00591
00592
00593
00594
00595 int
00596 __dbcl_env_set_flags(dbenv, flags, onoff)
00597 DB_ENV * dbenv;
00598 u_int32_t flags;
00599 int onoff;
00600 {
00601 CLIENT *cl;
00602 __env_set_flags_msg msg;
00603 __env_set_flags_reply *replyp = NULL;
00604 int ret;
00605
00606 ret = 0;
00607 if (dbenv == NULL || !RPC_ON(dbenv))
00608 return (__dbcl_noserver(dbenv));
00609
00610 cl = (CLIENT *)dbenv->cl_handle;
00611
00612 msg.dbenvcl_id = dbenv->cl_id;
00613 msg.flags = flags;
00614 msg.onoff = onoff;
00615
00616 replyp = __db_env_set_flags_4004(&msg, cl);
00617 if (replyp == NULL) {
00618 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00619 ret = DB_NOSERVER;
00620 goto out;
00621 }
00622 ret = replyp->status;
00623 out:
00624 if (replyp != NULL)
00625 xdr_free((xdrproc_t)xdr___env_set_flags_reply, (void *)replyp);
00626 return (ret);
00627 }
00628
00629
00630
00631
00632
00633 int
00634 __dbcl_env_txn_begin(dbenv, parent, txnpp, flags)
00635 DB_ENV * dbenv;
00636 DB_TXN * parent;
00637 DB_TXN ** txnpp;
00638 u_int32_t flags;
00639 {
00640 CLIENT *cl;
00641 __env_txn_begin_msg msg;
00642 __env_txn_begin_reply *replyp = NULL;
00643 int ret;
00644
00645 ret = 0;
00646 if (dbenv == NULL || !RPC_ON(dbenv))
00647 return (__dbcl_noserver(dbenv));
00648
00649 cl = (CLIENT *)dbenv->cl_handle;
00650
00651 msg.dbenvcl_id = dbenv->cl_id;
00652 if (parent == NULL)
00653 msg.parentcl_id = 0;
00654 else
00655 msg.parentcl_id = parent->txnid;
00656 msg.flags = flags;
00657
00658 replyp = __db_env_txn_begin_4004(&msg, cl);
00659 if (replyp == NULL) {
00660 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00661 ret = DB_NOSERVER;
00662 goto out;
00663 }
00664 ret = __dbcl_env_txn_begin_ret(dbenv, parent, txnpp, flags, replyp);
00665 out:
00666 if (replyp != NULL)
00667 xdr_free((xdrproc_t)xdr___env_txn_begin_reply, (void *)replyp);
00668 return (ret);
00669 }
00670
00671
00672
00673
00674
00675 int
00676 __dbcl_env_txn_recover(dbenv, preplist, count, retp, flags)
00677 DB_ENV * dbenv;
00678 DB_PREPLIST * preplist;
00679 long count;
00680 long * retp;
00681 u_int32_t flags;
00682 {
00683 CLIENT *cl;
00684 __env_txn_recover_msg msg;
00685 __env_txn_recover_reply *replyp = NULL;
00686 int ret;
00687
00688 ret = 0;
00689 if (dbenv == NULL || !RPC_ON(dbenv))
00690 return (__dbcl_noserver(dbenv));
00691
00692 cl = (CLIENT *)dbenv->cl_handle;
00693
00694 msg.dbenvcl_id = dbenv->cl_id;
00695 msg.count = count;
00696 msg.flags = flags;
00697
00698 replyp = __db_env_txn_recover_4004(&msg, cl);
00699 if (replyp == NULL) {
00700 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00701 ret = DB_NOSERVER;
00702 goto out;
00703 }
00704 ret = __dbcl_env_txn_recover_ret(dbenv, preplist, count, retp, flags, replyp);
00705 out:
00706 if (replyp != NULL)
00707 xdr_free((xdrproc_t)xdr___env_txn_recover_reply, (void *)replyp);
00708 return (ret);
00709 }
00710
00711
00712
00713
00714 int
00715 __dbcl_db_create(dbp, dbenv, flags)
00716 DB * dbp;
00717 DB_ENV * dbenv;
00718 u_int32_t flags;
00719 {
00720 CLIENT *cl;
00721 __db_create_msg msg;
00722 __db_create_reply *replyp = NULL;
00723 int ret;
00724
00725 ret = 0;
00726 if (dbenv == NULL || !RPC_ON(dbenv))
00727 return (__dbcl_noserver(dbenv));
00728
00729 cl = (CLIENT *)dbenv->cl_handle;
00730
00731 msg.dbenvcl_id = dbenv->cl_id;
00732 msg.flags = flags;
00733
00734 replyp = __db_db_create_4004(&msg, cl);
00735 if (replyp == NULL) {
00736 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00737 ret = DB_NOSERVER;
00738 goto out;
00739 }
00740 ret = __dbcl_db_create_ret(dbp, dbenv, flags, replyp);
00741 out:
00742 if (replyp != NULL)
00743 xdr_free((xdrproc_t)xdr___db_create_reply, (void *)replyp);
00744 return (ret);
00745 }
00746
00747
00748
00749
00750
00751 int
00752 __dbcl_db_associate(dbp, txnp, sdbp, func0, flags)
00753 DB * dbp;
00754 DB_TXN * txnp;
00755 DB * sdbp;
00756 int (*func0) __P((DB *, const DBT *, const DBT *, DBT *));
00757 u_int32_t flags;
00758 {
00759 CLIENT *cl;
00760 __db_associate_msg msg;
00761 __db_associate_reply *replyp = NULL;
00762 int ret;
00763 DB_ENV *dbenv;
00764
00765 ret = 0;
00766 dbenv = dbp->dbenv;
00767 if (dbenv == NULL || !RPC_ON(dbenv))
00768 return (__dbcl_noserver(NULL));
00769
00770 cl = (CLIENT *)dbenv->cl_handle;
00771
00772 if (func0 != NULL) {
00773 __db_err(dbenv, "User functions not supported in RPC");
00774 return (EINVAL);
00775 }
00776 if (dbp == NULL)
00777 msg.dbpcl_id = 0;
00778 else
00779 msg.dbpcl_id = dbp->cl_id;
00780 if (txnp == NULL)
00781 msg.txnpcl_id = 0;
00782 else
00783 msg.txnpcl_id = txnp->txnid;
00784 if (sdbp == NULL)
00785 msg.sdbpcl_id = 0;
00786 else
00787 msg.sdbpcl_id = sdbp->cl_id;
00788 msg.flags = flags;
00789
00790 replyp = __db_db_associate_4004(&msg, cl);
00791 if (replyp == NULL) {
00792 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00793 ret = DB_NOSERVER;
00794 goto out;
00795 }
00796 ret = replyp->status;
00797 out:
00798 if (replyp != NULL)
00799 xdr_free((xdrproc_t)xdr___db_associate_reply, (void *)replyp);
00800 return (ret);
00801 }
00802
00803
00804
00805
00806 int
00807 __dbcl_db_close(dbp, flags)
00808 DB * dbp;
00809 u_int32_t flags;
00810 {
00811 CLIENT *cl;
00812 __db_close_msg msg;
00813 __db_close_reply *replyp = NULL;
00814 int ret;
00815 DB_ENV *dbenv;
00816
00817 ret = 0;
00818 dbenv = dbp->dbenv;
00819 if (dbenv == NULL || !RPC_ON(dbenv))
00820 return (__dbcl_noserver(NULL));
00821
00822 cl = (CLIENT *)dbenv->cl_handle;
00823
00824 if (dbp == NULL)
00825 msg.dbpcl_id = 0;
00826 else
00827 msg.dbpcl_id = dbp->cl_id;
00828 msg.flags = flags;
00829
00830 replyp = __db_db_close_4004(&msg, cl);
00831 if (replyp == NULL) {
00832 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00833 ret = DB_NOSERVER;
00834 goto out;
00835 }
00836 ret = __dbcl_db_close_ret(dbp, flags, replyp);
00837 out:
00838 if (replyp != NULL)
00839 xdr_free((xdrproc_t)xdr___db_close_reply, (void *)replyp);
00840 return (ret);
00841 }
00842
00843
00844
00845
00846 int
00847 __dbcl_db_cursor(dbp, txnp, dbcpp, flags)
00848 DB * dbp;
00849 DB_TXN * txnp;
00850 DBC ** dbcpp;
00851 u_int32_t flags;
00852 {
00853 CLIENT *cl;
00854 __db_cursor_msg msg;
00855 __db_cursor_reply *replyp = NULL;
00856 int ret;
00857 DB_ENV *dbenv;
00858
00859 ret = 0;
00860 dbenv = dbp->dbenv;
00861 if (dbenv == NULL || !RPC_ON(dbenv))
00862 return (__dbcl_noserver(NULL));
00863
00864 cl = (CLIENT *)dbenv->cl_handle;
00865
00866 if (dbp == NULL)
00867 msg.dbpcl_id = 0;
00868 else
00869 msg.dbpcl_id = dbp->cl_id;
00870 if (txnp == NULL)
00871 msg.txnpcl_id = 0;
00872 else
00873 msg.txnpcl_id = txnp->txnid;
00874 msg.flags = flags;
00875
00876 replyp = __db_db_cursor_4004(&msg, cl);
00877 if (replyp == NULL) {
00878 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00879 ret = DB_NOSERVER;
00880 goto out;
00881 }
00882 ret = __dbcl_db_cursor_ret(dbp, txnp, dbcpp, flags, replyp);
00883 out:
00884 if (replyp != NULL)
00885 xdr_free((xdrproc_t)xdr___db_cursor_reply, (void *)replyp);
00886 return (ret);
00887 }
00888
00889
00890
00891
00892 int
00893 __dbcl_db_del(dbp, txnp, key, flags)
00894 DB * dbp;
00895 DB_TXN * txnp;
00896 DBT * key;
00897 u_int32_t flags;
00898 {
00899 CLIENT *cl;
00900 __db_del_msg msg;
00901 __db_del_reply *replyp = NULL;
00902 int ret;
00903 DB_ENV *dbenv;
00904
00905 ret = 0;
00906 dbenv = dbp->dbenv;
00907 if (dbenv == NULL || !RPC_ON(dbenv))
00908 return (__dbcl_noserver(NULL));
00909
00910 cl = (CLIENT *)dbenv->cl_handle;
00911
00912 if (dbp == NULL)
00913 msg.dbpcl_id = 0;
00914 else
00915 msg.dbpcl_id = dbp->cl_id;
00916 if (txnp == NULL)
00917 msg.txnpcl_id = 0;
00918 else
00919 msg.txnpcl_id = txnp->txnid;
00920 msg.keydlen = key->dlen;
00921 msg.keydoff = key->doff;
00922 msg.keyulen = key->ulen;
00923 msg.keyflags = key->flags;
00924 msg.keydata.keydata_val = key->data;
00925 msg.keydata.keydata_len = key->size;
00926 msg.flags = flags;
00927
00928 replyp = __db_db_del_4004(&msg, cl);
00929 if (replyp == NULL) {
00930 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00931 ret = DB_NOSERVER;
00932 goto out;
00933 }
00934 ret = replyp->status;
00935 out:
00936 if (replyp != NULL)
00937 xdr_free((xdrproc_t)xdr___db_del_reply, (void *)replyp);
00938 return (ret);
00939 }
00940
00941
00942
00943
00944 int
00945 __dbcl_db_get(dbp, txnp, key, data, flags)
00946 DB * dbp;
00947 DB_TXN * txnp;
00948 DBT * key;
00949 DBT * data;
00950 u_int32_t flags;
00951 {
00952 CLIENT *cl;
00953 __db_get_msg msg;
00954 __db_get_reply *replyp = NULL;
00955 int ret;
00956 DB_ENV *dbenv;
00957
00958 ret = 0;
00959 dbenv = dbp->dbenv;
00960 if (dbenv == NULL || !RPC_ON(dbenv))
00961 return (__dbcl_noserver(NULL));
00962
00963 cl = (CLIENT *)dbenv->cl_handle;
00964
00965 if (dbp == NULL)
00966 msg.dbpcl_id = 0;
00967 else
00968 msg.dbpcl_id = dbp->cl_id;
00969 if (txnp == NULL)
00970 msg.txnpcl_id = 0;
00971 else
00972 msg.txnpcl_id = txnp->txnid;
00973 msg.keydlen = key->dlen;
00974 msg.keydoff = key->doff;
00975 msg.keyulen = key->ulen;
00976 msg.keyflags = key->flags;
00977 msg.keydata.keydata_val = key->data;
00978 msg.keydata.keydata_len = key->size;
00979 msg.datadlen = data->dlen;
00980 msg.datadoff = data->doff;
00981 msg.dataulen = data->ulen;
00982 msg.dataflags = data->flags;
00983 msg.datadata.datadata_val = data->data;
00984 msg.datadata.datadata_len = data->size;
00985 msg.flags = flags;
00986
00987 replyp = __db_db_get_4004(&msg, cl);
00988 if (replyp == NULL) {
00989 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
00990 ret = DB_NOSERVER;
00991 goto out;
00992 }
00993 ret = __dbcl_db_get_ret(dbp, txnp, key, data, flags, replyp);
00994 out:
00995 if (replyp != NULL)
00996 xdr_free((xdrproc_t)xdr___db_get_reply, (void *)replyp);
00997 return (ret);
00998 }
00999
01000
01001
01002
01003 int
01004 __dbcl_db_get_bt_minkey(dbp, minkeyp)
01005 DB * dbp;
01006 u_int32_t * minkeyp;
01007 {
01008 CLIENT *cl;
01009 __db_get_bt_minkey_msg msg;
01010 __db_get_bt_minkey_reply *replyp = NULL;
01011 int ret;
01012 DB_ENV *dbenv;
01013
01014 ret = 0;
01015 dbenv = dbp->dbenv;
01016 if (dbenv == NULL || !RPC_ON(dbenv))
01017 return (__dbcl_noserver(NULL));
01018
01019 cl = (CLIENT *)dbenv->cl_handle;
01020
01021 if (dbp == NULL)
01022 msg.dbpcl_id = 0;
01023 else
01024 msg.dbpcl_id = dbp->cl_id;
01025
01026 replyp = __db_db_get_bt_minkey_4004(&msg, cl);
01027 if (replyp == NULL) {
01028 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01029 ret = DB_NOSERVER;
01030 goto out;
01031 }
01032 ret = replyp->status;
01033 if (minkeyp != NULL)
01034 *minkeyp = replyp->minkey;
01035 out:
01036 if (replyp != NULL)
01037 xdr_free((xdrproc_t)xdr___db_get_bt_minkey_reply, (void *)replyp);
01038 return (ret);
01039 }
01040
01041
01042
01043
01044
01045 int
01046 __dbcl_db_get_dbname(dbp, filenamep, dbnamep)
01047 DB * dbp;
01048 const char * * filenamep;
01049 const char * * dbnamep;
01050 {
01051 CLIENT *cl;
01052 __db_get_dbname_msg msg;
01053 __db_get_dbname_reply *replyp = NULL;
01054 int ret;
01055 DB_ENV *dbenv;
01056
01057 ret = 0;
01058 dbenv = dbp->dbenv;
01059 if (dbenv == NULL || !RPC_ON(dbenv))
01060 return (__dbcl_noserver(NULL));
01061
01062 cl = (CLIENT *)dbenv->cl_handle;
01063
01064 if (dbp == NULL)
01065 msg.dbpcl_id = 0;
01066 else
01067 msg.dbpcl_id = dbp->cl_id;
01068
01069 replyp = __db_db_get_dbname_4004(&msg, cl);
01070 if (replyp == NULL) {
01071 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01072 ret = DB_NOSERVER;
01073 goto out;
01074 }
01075 ret = replyp->status;
01076 if (filenamep != NULL)
01077 *filenamep = replyp->filename;
01078 if (dbnamep != NULL)
01079 *dbnamep = replyp->dbname;
01080 out:
01081 if (replyp != NULL)
01082 xdr_free((xdrproc_t)xdr___db_get_dbname_reply, (void *)replyp);
01083 return (ret);
01084 }
01085
01086
01087
01088
01089 int
01090 __dbcl_db_get_encrypt_flags(dbp, flagsp)
01091 DB * dbp;
01092 u_int32_t * flagsp;
01093 {
01094 CLIENT *cl;
01095 __db_get_encrypt_flags_msg msg;
01096 __db_get_encrypt_flags_reply *replyp = NULL;
01097 int ret;
01098 DB_ENV *dbenv;
01099
01100 ret = 0;
01101 dbenv = dbp->dbenv;
01102 if (dbenv == NULL || !RPC_ON(dbenv))
01103 return (__dbcl_noserver(NULL));
01104
01105 cl = (CLIENT *)dbenv->cl_handle;
01106
01107 if (dbp == NULL)
01108 msg.dbpcl_id = 0;
01109 else
01110 msg.dbpcl_id = dbp->cl_id;
01111
01112 replyp = __db_db_get_encrypt_flags_4004(&msg, cl);
01113 if (replyp == NULL) {
01114 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01115 ret = DB_NOSERVER;
01116 goto out;
01117 }
01118 ret = replyp->status;
01119 if (flagsp != NULL)
01120 *flagsp = replyp->flags;
01121 out:
01122 if (replyp != NULL)
01123 xdr_free((xdrproc_t)xdr___db_get_encrypt_flags_reply, (void *)replyp);
01124 return (ret);
01125 }
01126
01127
01128
01129
01130 int
01131 __dbcl_db_get_flags(dbp, flagsp)
01132 DB * dbp;
01133 u_int32_t * flagsp;
01134 {
01135 CLIENT *cl;
01136 __db_get_flags_msg msg;
01137 __db_get_flags_reply *replyp = NULL;
01138 int ret;
01139 DB_ENV *dbenv;
01140
01141 ret = 0;
01142 dbenv = dbp->dbenv;
01143 if (dbenv == NULL || !RPC_ON(dbenv))
01144 return (__dbcl_noserver(NULL));
01145
01146 cl = (CLIENT *)dbenv->cl_handle;
01147
01148 if (dbp == NULL)
01149 msg.dbpcl_id = 0;
01150 else
01151 msg.dbpcl_id = dbp->cl_id;
01152
01153 replyp = __db_db_get_flags_4004(&msg, cl);
01154 if (replyp == NULL) {
01155 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01156 ret = DB_NOSERVER;
01157 goto out;
01158 }
01159 ret = replyp->status;
01160 if (flagsp != NULL)
01161 *flagsp = replyp->flags;
01162 out:
01163 if (replyp != NULL)
01164 xdr_free((xdrproc_t)xdr___db_get_flags_reply, (void *)replyp);
01165 return (ret);
01166 }
01167
01168
01169
01170
01171 int
01172 __dbcl_db_get_h_ffactor(dbp, ffactorp)
01173 DB * dbp;
01174 u_int32_t * ffactorp;
01175 {
01176 CLIENT *cl;
01177 __db_get_h_ffactor_msg msg;
01178 __db_get_h_ffactor_reply *replyp = NULL;
01179 int ret;
01180 DB_ENV *dbenv;
01181
01182 ret = 0;
01183 dbenv = dbp->dbenv;
01184 if (dbenv == NULL || !RPC_ON(dbenv))
01185 return (__dbcl_noserver(NULL));
01186
01187 cl = (CLIENT *)dbenv->cl_handle;
01188
01189 if (dbp == NULL)
01190 msg.dbpcl_id = 0;
01191 else
01192 msg.dbpcl_id = dbp->cl_id;
01193
01194 replyp = __db_db_get_h_ffactor_4004(&msg, cl);
01195 if (replyp == NULL) {
01196 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01197 ret = DB_NOSERVER;
01198 goto out;
01199 }
01200 ret = replyp->status;
01201 if (ffactorp != NULL)
01202 *ffactorp = replyp->ffactor;
01203 out:
01204 if (replyp != NULL)
01205 xdr_free((xdrproc_t)xdr___db_get_h_ffactor_reply, (void *)replyp);
01206 return (ret);
01207 }
01208
01209
01210
01211
01212 int
01213 __dbcl_db_get_h_nelem(dbp, nelemp)
01214 DB * dbp;
01215 u_int32_t * nelemp;
01216 {
01217 CLIENT *cl;
01218 __db_get_h_nelem_msg msg;
01219 __db_get_h_nelem_reply *replyp = NULL;
01220 int ret;
01221 DB_ENV *dbenv;
01222
01223 ret = 0;
01224 dbenv = dbp->dbenv;
01225 if (dbenv == NULL || !RPC_ON(dbenv))
01226 return (__dbcl_noserver(NULL));
01227
01228 cl = (CLIENT *)dbenv->cl_handle;
01229
01230 if (dbp == NULL)
01231 msg.dbpcl_id = 0;
01232 else
01233 msg.dbpcl_id = dbp->cl_id;
01234
01235 replyp = __db_db_get_h_nelem_4004(&msg, cl);
01236 if (replyp == NULL) {
01237 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01238 ret = DB_NOSERVER;
01239 goto out;
01240 }
01241 ret = replyp->status;
01242 if (nelemp != NULL)
01243 *nelemp = replyp->nelem;
01244 out:
01245 if (replyp != NULL)
01246 xdr_free((xdrproc_t)xdr___db_get_h_nelem_reply, (void *)replyp);
01247 return (ret);
01248 }
01249
01250
01251
01252
01253 int
01254 __dbcl_db_get_lorder(dbp, lorderp)
01255 DB * dbp;
01256 int * lorderp;
01257 {
01258 CLIENT *cl;
01259 __db_get_lorder_msg msg;
01260 __db_get_lorder_reply *replyp = NULL;
01261 int ret;
01262 DB_ENV *dbenv;
01263
01264 ret = 0;
01265 dbenv = dbp->dbenv;
01266 if (dbenv == NULL || !RPC_ON(dbenv))
01267 return (__dbcl_noserver(NULL));
01268
01269 cl = (CLIENT *)dbenv->cl_handle;
01270
01271 if (dbp == NULL)
01272 msg.dbpcl_id = 0;
01273 else
01274 msg.dbpcl_id = dbp->cl_id;
01275
01276 replyp = __db_db_get_lorder_4004(&msg, cl);
01277 if (replyp == NULL) {
01278 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01279 ret = DB_NOSERVER;
01280 goto out;
01281 }
01282 ret = replyp->status;
01283 if (lorderp != NULL)
01284 *lorderp = replyp->lorder;
01285 out:
01286 if (replyp != NULL)
01287 xdr_free((xdrproc_t)xdr___db_get_lorder_reply, (void *)replyp);
01288 return (ret);
01289 }
01290
01291
01292
01293
01294 int
01295 __dbcl_db_get_open_flags(dbp, flagsp)
01296 DB * dbp;
01297 u_int32_t * flagsp;
01298 {
01299 CLIENT *cl;
01300 __db_get_open_flags_msg msg;
01301 __db_get_open_flags_reply *replyp = NULL;
01302 int ret;
01303 DB_ENV *dbenv;
01304
01305 ret = 0;
01306 dbenv = dbp->dbenv;
01307 if (dbenv == NULL || !RPC_ON(dbenv))
01308 return (__dbcl_noserver(NULL));
01309
01310 cl = (CLIENT *)dbenv->cl_handle;
01311
01312 if (dbp == NULL)
01313 msg.dbpcl_id = 0;
01314 else
01315 msg.dbpcl_id = dbp->cl_id;
01316
01317 replyp = __db_db_get_open_flags_4004(&msg, cl);
01318 if (replyp == NULL) {
01319 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01320 ret = DB_NOSERVER;
01321 goto out;
01322 }
01323 ret = replyp->status;
01324 if (flagsp != NULL)
01325 *flagsp = replyp->flags;
01326 out:
01327 if (replyp != NULL)
01328 xdr_free((xdrproc_t)xdr___db_get_open_flags_reply, (void *)replyp);
01329 return (ret);
01330 }
01331
01332
01333
01334
01335 int
01336 __dbcl_db_get_pagesize(dbp, pagesizep)
01337 DB * dbp;
01338 u_int32_t * pagesizep;
01339 {
01340 CLIENT *cl;
01341 __db_get_pagesize_msg msg;
01342 __db_get_pagesize_reply *replyp = NULL;
01343 int ret;
01344 DB_ENV *dbenv;
01345
01346 ret = 0;
01347 dbenv = dbp->dbenv;
01348 if (dbenv == NULL || !RPC_ON(dbenv))
01349 return (__dbcl_noserver(NULL));
01350
01351 cl = (CLIENT *)dbenv->cl_handle;
01352
01353 if (dbp == NULL)
01354 msg.dbpcl_id = 0;
01355 else
01356 msg.dbpcl_id = dbp->cl_id;
01357
01358 replyp = __db_db_get_pagesize_4004(&msg, cl);
01359 if (replyp == NULL) {
01360 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01361 ret = DB_NOSERVER;
01362 goto out;
01363 }
01364 ret = replyp->status;
01365 if (pagesizep != NULL)
01366 *pagesizep = replyp->pagesize;
01367 out:
01368 if (replyp != NULL)
01369 xdr_free((xdrproc_t)xdr___db_get_pagesize_reply, (void *)replyp);
01370 return (ret);
01371 }
01372
01373
01374
01375
01376 int
01377 __dbcl_db_get_q_extentsize(dbp, extentsizep)
01378 DB * dbp;
01379 u_int32_t * extentsizep;
01380 {
01381 CLIENT *cl;
01382 __db_get_q_extentsize_msg msg;
01383 __db_get_q_extentsize_reply *replyp = NULL;
01384 int ret;
01385 DB_ENV *dbenv;
01386
01387 ret = 0;
01388 dbenv = dbp->dbenv;
01389 if (dbenv == NULL || !RPC_ON(dbenv))
01390 return (__dbcl_noserver(NULL));
01391
01392 cl = (CLIENT *)dbenv->cl_handle;
01393
01394 if (dbp == NULL)
01395 msg.dbpcl_id = 0;
01396 else
01397 msg.dbpcl_id = dbp->cl_id;
01398
01399 replyp = __db_db_get_q_extentsize_4004(&msg, cl);
01400 if (replyp == NULL) {
01401 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01402 ret = DB_NOSERVER;
01403 goto out;
01404 }
01405 ret = replyp->status;
01406 if (extentsizep != NULL)
01407 *extentsizep = replyp->extentsize;
01408 out:
01409 if (replyp != NULL)
01410 xdr_free((xdrproc_t)xdr___db_get_q_extentsize_reply, (void *)replyp);
01411 return (ret);
01412 }
01413
01414
01415
01416
01417 int
01418 __dbcl_db_get_re_delim(dbp, delimp)
01419 DB * dbp;
01420 int * delimp;
01421 {
01422 CLIENT *cl;
01423 __db_get_re_delim_msg msg;
01424 __db_get_re_delim_reply *replyp = NULL;
01425 int ret;
01426 DB_ENV *dbenv;
01427
01428 ret = 0;
01429 dbenv = dbp->dbenv;
01430 if (dbenv == NULL || !RPC_ON(dbenv))
01431 return (__dbcl_noserver(NULL));
01432
01433 cl = (CLIENT *)dbenv->cl_handle;
01434
01435 if (dbp == NULL)
01436 msg.dbpcl_id = 0;
01437 else
01438 msg.dbpcl_id = dbp->cl_id;
01439
01440 replyp = __db_db_get_re_delim_4004(&msg, cl);
01441 if (replyp == NULL) {
01442 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01443 ret = DB_NOSERVER;
01444 goto out;
01445 }
01446 ret = replyp->status;
01447 if (delimp != NULL)
01448 *delimp = replyp->delim;
01449 out:
01450 if (replyp != NULL)
01451 xdr_free((xdrproc_t)xdr___db_get_re_delim_reply, (void *)replyp);
01452 return (ret);
01453 }
01454
01455
01456
01457
01458 int
01459 __dbcl_db_get_re_len(dbp, lenp)
01460 DB * dbp;
01461 u_int32_t * lenp;
01462 {
01463 CLIENT *cl;
01464 __db_get_re_len_msg msg;
01465 __db_get_re_len_reply *replyp = NULL;
01466 int ret;
01467 DB_ENV *dbenv;
01468
01469 ret = 0;
01470 dbenv = dbp->dbenv;
01471 if (dbenv == NULL || !RPC_ON(dbenv))
01472 return (__dbcl_noserver(NULL));
01473
01474 cl = (CLIENT *)dbenv->cl_handle;
01475
01476 if (dbp == NULL)
01477 msg.dbpcl_id = 0;
01478 else
01479 msg.dbpcl_id = dbp->cl_id;
01480
01481 replyp = __db_db_get_re_len_4004(&msg, cl);
01482 if (replyp == NULL) {
01483 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01484 ret = DB_NOSERVER;
01485 goto out;
01486 }
01487 ret = replyp->status;
01488 if (lenp != NULL)
01489 *lenp = replyp->len;
01490 out:
01491 if (replyp != NULL)
01492 xdr_free((xdrproc_t)xdr___db_get_re_len_reply, (void *)replyp);
01493 return (ret);
01494 }
01495
01496
01497
01498
01499 int
01500 __dbcl_db_get_re_pad(dbp, padp)
01501 DB * dbp;
01502 int * padp;
01503 {
01504 CLIENT *cl;
01505 __db_get_re_pad_msg msg;
01506 __db_get_re_pad_reply *replyp = NULL;
01507 int ret;
01508 DB_ENV *dbenv;
01509
01510 ret = 0;
01511 dbenv = dbp->dbenv;
01512 if (dbenv == NULL || !RPC_ON(dbenv))
01513 return (__dbcl_noserver(NULL));
01514
01515 cl = (CLIENT *)dbenv->cl_handle;
01516
01517 if (dbp == NULL)
01518 msg.dbpcl_id = 0;
01519 else
01520 msg.dbpcl_id = dbp->cl_id;
01521
01522 replyp = __db_db_get_re_pad_4004(&msg, cl);
01523 if (replyp == NULL) {
01524 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01525 ret = DB_NOSERVER;
01526 goto out;
01527 }
01528 ret = replyp->status;
01529 if (padp != NULL)
01530 *padp = replyp->pad;
01531 out:
01532 if (replyp != NULL)
01533 xdr_free((xdrproc_t)xdr___db_get_re_pad_reply, (void *)replyp);
01534 return (ret);
01535 }
01536
01537
01538
01539
01540 int
01541 __dbcl_db_join(dbp, curs, dbcp, flags)
01542 DB * dbp;
01543 DBC ** curs;
01544 DBC ** dbcp;
01545 u_int32_t flags;
01546 {
01547 CLIENT *cl;
01548 __db_join_msg msg;
01549 __db_join_reply *replyp = NULL;
01550 int ret;
01551 DB_ENV *dbenv;
01552 DBC ** cursp;
01553 int cursi;
01554 u_int32_t * cursq;
01555
01556 ret = 0;
01557 dbenv = dbp->dbenv;
01558 if (dbenv == NULL || !RPC_ON(dbenv))
01559 return (__dbcl_noserver(NULL));
01560
01561 cl = (CLIENT *)dbenv->cl_handle;
01562
01563 if (dbp == NULL)
01564 msg.dbpcl_id = 0;
01565 else
01566 msg.dbpcl_id = dbp->cl_id;
01567 for (cursi = 0, cursp = curs; *cursp != 0; cursi++, cursp++)
01568 ;
01569 msg.curs.curs_len = cursi;
01570 if ((ret = __os_calloc(dbenv,
01571 msg.curs.curs_len, sizeof(u_int32_t), &msg.curs.curs_val)) != 0)
01572 return (ret);
01573 for (cursq = msg.curs.curs_val, cursp = curs; cursi--; cursq++, cursp++)
01574 *cursq = (*cursp)->cl_id;
01575 msg.flags = flags;
01576
01577 replyp = __db_db_join_4004(&msg, cl);
01578 __os_free(dbenv, msg.curs.curs_val);
01579 if (replyp == NULL) {
01580 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01581 ret = DB_NOSERVER;
01582 goto out;
01583 }
01584 ret = __dbcl_db_join_ret(dbp, curs, dbcp, flags, replyp);
01585 out:
01586 if (replyp != NULL)
01587 xdr_free((xdrproc_t)xdr___db_join_reply, (void *)replyp);
01588 return (ret);
01589 }
01590
01591
01592
01593
01594
01595 int
01596 __dbcl_db_key_range(dbp, txnp, key, range, flags)
01597 DB * dbp;
01598 DB_TXN * txnp;
01599 DBT * key;
01600 DB_KEY_RANGE * range;
01601 u_int32_t flags;
01602 {
01603 CLIENT *cl;
01604 __db_key_range_msg msg;
01605 __db_key_range_reply *replyp = NULL;
01606 int ret;
01607 DB_ENV *dbenv;
01608
01609 ret = 0;
01610 dbenv = dbp->dbenv;
01611 if (dbenv == NULL || !RPC_ON(dbenv))
01612 return (__dbcl_noserver(NULL));
01613
01614 cl = (CLIENT *)dbenv->cl_handle;
01615
01616 if (dbp == NULL)
01617 msg.dbpcl_id = 0;
01618 else
01619 msg.dbpcl_id = dbp->cl_id;
01620 if (txnp == NULL)
01621 msg.txnpcl_id = 0;
01622 else
01623 msg.txnpcl_id = txnp->txnid;
01624 msg.keydlen = key->dlen;
01625 msg.keydoff = key->doff;
01626 msg.keyulen = key->ulen;
01627 msg.keyflags = key->flags;
01628 msg.keydata.keydata_val = key->data;
01629 msg.keydata.keydata_len = key->size;
01630 msg.flags = flags;
01631
01632 replyp = __db_db_key_range_4004(&msg, cl);
01633 if (replyp == NULL) {
01634 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01635 ret = DB_NOSERVER;
01636 goto out;
01637 }
01638 ret = __dbcl_db_key_range_ret(dbp, txnp, key, range, flags, replyp);
01639 out:
01640 if (replyp != NULL)
01641 xdr_free((xdrproc_t)xdr___db_key_range_reply, (void *)replyp);
01642 return (ret);
01643 }
01644
01645
01646
01647
01648
01649 int
01650 __dbcl_db_open(dbp, txnp, name, subdb, type, flags, mode)
01651 DB * dbp;
01652 DB_TXN * txnp;
01653 const char * name;
01654 const char * subdb;
01655 DBTYPE type;
01656 u_int32_t flags;
01657 int mode;
01658 {
01659 CLIENT *cl;
01660 __db_open_msg msg;
01661 __db_open_reply *replyp = NULL;
01662 int ret;
01663 DB_ENV *dbenv;
01664
01665 ret = 0;
01666 dbenv = dbp->dbenv;
01667 if (dbenv == NULL || !RPC_ON(dbenv))
01668 return (__dbcl_noserver(NULL));
01669
01670 cl = (CLIENT *)dbenv->cl_handle;
01671
01672 if (dbp == NULL)
01673 msg.dbpcl_id = 0;
01674 else
01675 msg.dbpcl_id = dbp->cl_id;
01676 if (txnp == NULL)
01677 msg.txnpcl_id = 0;
01678 else
01679 msg.txnpcl_id = txnp->txnid;
01680 if (name == NULL)
01681 msg.name = "";
01682 else
01683 msg.name = (char *)name;
01684 if (subdb == NULL)
01685 msg.subdb = "";
01686 else
01687 msg.subdb = (char *)subdb;
01688 msg.type = type;
01689 msg.flags = flags;
01690 msg.mode = mode;
01691
01692 replyp = __db_db_open_4004(&msg, cl);
01693 if (replyp == NULL) {
01694 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01695 ret = DB_NOSERVER;
01696 goto out;
01697 }
01698 ret = __dbcl_db_open_ret(dbp, txnp, name, subdb, type, flags, mode, replyp);
01699 out:
01700 if (replyp != NULL)
01701 xdr_free((xdrproc_t)xdr___db_open_reply, (void *)replyp);
01702 return (ret);
01703 }
01704
01705
01706
01707
01708
01709 int
01710 __dbcl_db_pget(dbp, txnp, skey, pkey, data, flags)
01711 DB * dbp;
01712 DB_TXN * txnp;
01713 DBT * skey;
01714 DBT * pkey;
01715 DBT * data;
01716 u_int32_t flags;
01717 {
01718 CLIENT *cl;
01719 __db_pget_msg msg;
01720 __db_pget_reply *replyp = NULL;
01721 int ret;
01722 DB_ENV *dbenv;
01723
01724 ret = 0;
01725 dbenv = dbp->dbenv;
01726 if (dbenv == NULL || !RPC_ON(dbenv))
01727 return (__dbcl_noserver(NULL));
01728
01729 cl = (CLIENT *)dbenv->cl_handle;
01730
01731 if (dbp == NULL)
01732 msg.dbpcl_id = 0;
01733 else
01734 msg.dbpcl_id = dbp->cl_id;
01735 if (txnp == NULL)
01736 msg.txnpcl_id = 0;
01737 else
01738 msg.txnpcl_id = txnp->txnid;
01739 msg.skeydlen = skey->dlen;
01740 msg.skeydoff = skey->doff;
01741 msg.skeyulen = skey->ulen;
01742 msg.skeyflags = skey->flags;
01743 msg.skeydata.skeydata_val = skey->data;
01744 msg.skeydata.skeydata_len = skey->size;
01745 msg.pkeydlen = pkey->dlen;
01746 msg.pkeydoff = pkey->doff;
01747 msg.pkeyulen = pkey->ulen;
01748 msg.pkeyflags = pkey->flags;
01749 msg.pkeydata.pkeydata_val = pkey->data;
01750 msg.pkeydata.pkeydata_len = pkey->size;
01751 msg.datadlen = data->dlen;
01752 msg.datadoff = data->doff;
01753 msg.dataulen = data->ulen;
01754 msg.dataflags = data->flags;
01755 msg.datadata.datadata_val = data->data;
01756 msg.datadata.datadata_len = data->size;
01757 msg.flags = flags;
01758
01759 replyp = __db_db_pget_4004(&msg, cl);
01760 if (replyp == NULL) {
01761 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01762 ret = DB_NOSERVER;
01763 goto out;
01764 }
01765 ret = __dbcl_db_pget_ret(dbp, txnp, skey, pkey, data, flags, replyp);
01766 out:
01767 if (replyp != NULL)
01768 xdr_free((xdrproc_t)xdr___db_pget_reply, (void *)replyp);
01769 return (ret);
01770 }
01771
01772
01773
01774
01775 int
01776 __dbcl_db_put(dbp, txnp, key, data, flags)
01777 DB * dbp;
01778 DB_TXN * txnp;
01779 DBT * key;
01780 DBT * data;
01781 u_int32_t flags;
01782 {
01783 CLIENT *cl;
01784 __db_put_msg msg;
01785 __db_put_reply *replyp = NULL;
01786 int ret;
01787 DB_ENV *dbenv;
01788
01789 ret = 0;
01790 dbenv = dbp->dbenv;
01791 if (dbenv == NULL || !RPC_ON(dbenv))
01792 return (__dbcl_noserver(NULL));
01793
01794 cl = (CLIENT *)dbenv->cl_handle;
01795
01796 if (dbp == NULL)
01797 msg.dbpcl_id = 0;
01798 else
01799 msg.dbpcl_id = dbp->cl_id;
01800 if (txnp == NULL)
01801 msg.txnpcl_id = 0;
01802 else
01803 msg.txnpcl_id = txnp->txnid;
01804 msg.keydlen = key->dlen;
01805 msg.keydoff = key->doff;
01806 msg.keyulen = key->ulen;
01807 msg.keyflags = key->flags;
01808 msg.keydata.keydata_val = key->data;
01809 msg.keydata.keydata_len = key->size;
01810 msg.datadlen = data->dlen;
01811 msg.datadoff = data->doff;
01812 msg.dataulen = data->ulen;
01813 msg.dataflags = data->flags;
01814 msg.datadata.datadata_val = data->data;
01815 msg.datadata.datadata_len = data->size;
01816 msg.flags = flags;
01817
01818 replyp = __db_db_put_4004(&msg, cl);
01819 if (replyp == NULL) {
01820 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01821 ret = DB_NOSERVER;
01822 goto out;
01823 }
01824 ret = __dbcl_db_put_ret(dbp, txnp, key, data, flags, replyp);
01825 out:
01826 if (replyp != NULL)
01827 xdr_free((xdrproc_t)xdr___db_put_reply, (void *)replyp);
01828 return (ret);
01829 }
01830
01831
01832
01833
01834
01835 int
01836 __dbcl_db_remove(dbp, name, subdb, flags)
01837 DB * dbp;
01838 const char * name;
01839 const char * subdb;
01840 u_int32_t flags;
01841 {
01842 CLIENT *cl;
01843 __db_remove_msg msg;
01844 __db_remove_reply *replyp = NULL;
01845 int ret;
01846 DB_ENV *dbenv;
01847
01848 ret = 0;
01849 dbenv = dbp->dbenv;
01850 if (dbenv == NULL || !RPC_ON(dbenv))
01851 return (__dbcl_noserver(NULL));
01852
01853 cl = (CLIENT *)dbenv->cl_handle;
01854
01855 if (dbp == NULL)
01856 msg.dbpcl_id = 0;
01857 else
01858 msg.dbpcl_id = dbp->cl_id;
01859 if (name == NULL)
01860 msg.name = "";
01861 else
01862 msg.name = (char *)name;
01863 if (subdb == NULL)
01864 msg.subdb = "";
01865 else
01866 msg.subdb = (char *)subdb;
01867 msg.flags = flags;
01868
01869 replyp = __db_db_remove_4004(&msg, cl);
01870 if (replyp == NULL) {
01871 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01872 ret = DB_NOSERVER;
01873 goto out;
01874 }
01875 ret = __dbcl_db_remove_ret(dbp, name, subdb, flags, replyp);
01876 out:
01877 if (replyp != NULL)
01878 xdr_free((xdrproc_t)xdr___db_remove_reply, (void *)replyp);
01879 return (ret);
01880 }
01881
01882
01883
01884
01885
01886 int
01887 __dbcl_db_rename(dbp, name, subdb, newname, flags)
01888 DB * dbp;
01889 const char * name;
01890 const char * subdb;
01891 const char * newname;
01892 u_int32_t flags;
01893 {
01894 CLIENT *cl;
01895 __db_rename_msg msg;
01896 __db_rename_reply *replyp = NULL;
01897 int ret;
01898 DB_ENV *dbenv;
01899
01900 ret = 0;
01901 dbenv = dbp->dbenv;
01902 if (dbenv == NULL || !RPC_ON(dbenv))
01903 return (__dbcl_noserver(NULL));
01904
01905 cl = (CLIENT *)dbenv->cl_handle;
01906
01907 if (dbp == NULL)
01908 msg.dbpcl_id = 0;
01909 else
01910 msg.dbpcl_id = dbp->cl_id;
01911 if (name == NULL)
01912 msg.name = "";
01913 else
01914 msg.name = (char *)name;
01915 if (subdb == NULL)
01916 msg.subdb = "";
01917 else
01918 msg.subdb = (char *)subdb;
01919 if (newname == NULL)
01920 msg.newname = "";
01921 else
01922 msg.newname = (char *)newname;
01923 msg.flags = flags;
01924
01925 replyp = __db_db_rename_4004(&msg, cl);
01926 if (replyp == NULL) {
01927 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01928 ret = DB_NOSERVER;
01929 goto out;
01930 }
01931 ret = __dbcl_db_rename_ret(dbp, name, subdb, newname, flags, replyp);
01932 out:
01933 if (replyp != NULL)
01934 xdr_free((xdrproc_t)xdr___db_rename_reply, (void *)replyp);
01935 return (ret);
01936 }
01937
01938
01939
01940
01941 int
01942 __dbcl_db_set_bt_minkey(dbp, minkey)
01943 DB * dbp;
01944 u_int32_t minkey;
01945 {
01946 CLIENT *cl;
01947 __db_set_bt_minkey_msg msg;
01948 __db_set_bt_minkey_reply *replyp = NULL;
01949 int ret;
01950 DB_ENV *dbenv;
01951
01952 ret = 0;
01953 dbenv = dbp->dbenv;
01954 if (dbenv == NULL || !RPC_ON(dbenv))
01955 return (__dbcl_noserver(NULL));
01956
01957 cl = (CLIENT *)dbenv->cl_handle;
01958
01959 if (dbp == NULL)
01960 msg.dbpcl_id = 0;
01961 else
01962 msg.dbpcl_id = dbp->cl_id;
01963 msg.minkey = minkey;
01964
01965 replyp = __db_db_set_bt_minkey_4004(&msg, cl);
01966 if (replyp == NULL) {
01967 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
01968 ret = DB_NOSERVER;
01969 goto out;
01970 }
01971 ret = replyp->status;
01972 out:
01973 if (replyp != NULL)
01974 xdr_free((xdrproc_t)xdr___db_set_bt_minkey_reply, (void *)replyp);
01975 return (ret);
01976 }
01977
01978
01979
01980
01981 int
01982 __dbcl_db_set_encrypt(dbp, passwd, flags)
01983 DB * dbp;
01984 const char * passwd;
01985 u_int32_t flags;
01986 {
01987 CLIENT *cl;
01988 __db_set_encrypt_msg msg;
01989 __db_set_encrypt_reply *replyp = NULL;
01990 int ret;
01991 DB_ENV *dbenv;
01992
01993 ret = 0;
01994 dbenv = dbp->dbenv;
01995 if (dbenv == NULL || !RPC_ON(dbenv))
01996 return (__dbcl_noserver(NULL));
01997
01998 cl = (CLIENT *)dbenv->cl_handle;
01999
02000 if (dbp == NULL)
02001 msg.dbpcl_id = 0;
02002 else
02003 msg.dbpcl_id = dbp->cl_id;
02004 if (passwd == NULL)
02005 msg.passwd = "";
02006 else
02007 msg.passwd = (char *)passwd;
02008 msg.flags = flags;
02009
02010 replyp = __db_db_set_encrypt_4004(&msg, cl);
02011 if (replyp == NULL) {
02012 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02013 ret = DB_NOSERVER;
02014 goto out;
02015 }
02016 ret = replyp->status;
02017 out:
02018 if (replyp != NULL)
02019 xdr_free((xdrproc_t)xdr___db_set_encrypt_reply, (void *)replyp);
02020 return (ret);
02021 }
02022
02023
02024
02025
02026 int
02027 __dbcl_db_set_flags(dbp, flags)
02028 DB * dbp;
02029 u_int32_t flags;
02030 {
02031 CLIENT *cl;
02032 __db_set_flags_msg msg;
02033 __db_set_flags_reply *replyp = NULL;
02034 int ret;
02035 DB_ENV *dbenv;
02036
02037 ret = 0;
02038 dbenv = dbp->dbenv;
02039 if (dbenv == NULL || !RPC_ON(dbenv))
02040 return (__dbcl_noserver(NULL));
02041
02042 cl = (CLIENT *)dbenv->cl_handle;
02043
02044 if (dbp == NULL)
02045 msg.dbpcl_id = 0;
02046 else
02047 msg.dbpcl_id = dbp->cl_id;
02048 msg.flags = flags;
02049
02050 replyp = __db_db_set_flags_4004(&msg, cl);
02051 if (replyp == NULL) {
02052 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02053 ret = DB_NOSERVER;
02054 goto out;
02055 }
02056 ret = replyp->status;
02057 out:
02058 if (replyp != NULL)
02059 xdr_free((xdrproc_t)xdr___db_set_flags_reply, (void *)replyp);
02060 return (ret);
02061 }
02062
02063
02064
02065
02066 int
02067 __dbcl_db_set_h_ffactor(dbp, ffactor)
02068 DB * dbp;
02069 u_int32_t ffactor;
02070 {
02071 CLIENT *cl;
02072 __db_set_h_ffactor_msg msg;
02073 __db_set_h_ffactor_reply *replyp = NULL;
02074 int ret;
02075 DB_ENV *dbenv;
02076
02077 ret = 0;
02078 dbenv = dbp->dbenv;
02079 if (dbenv == NULL || !RPC_ON(dbenv))
02080 return (__dbcl_noserver(NULL));
02081
02082 cl = (CLIENT *)dbenv->cl_handle;
02083
02084 if (dbp == NULL)
02085 msg.dbpcl_id = 0;
02086 else
02087 msg.dbpcl_id = dbp->cl_id;
02088 msg.ffactor = ffactor;
02089
02090 replyp = __db_db_set_h_ffactor_4004(&msg, cl);
02091 if (replyp == NULL) {
02092 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02093 ret = DB_NOSERVER;
02094 goto out;
02095 }
02096 ret = replyp->status;
02097 out:
02098 if (replyp != NULL)
02099 xdr_free((xdrproc_t)xdr___db_set_h_ffactor_reply, (void *)replyp);
02100 return (ret);
02101 }
02102
02103
02104
02105
02106 int
02107 __dbcl_db_set_h_nelem(dbp, nelem)
02108 DB * dbp;
02109 u_int32_t nelem;
02110 {
02111 CLIENT *cl;
02112 __db_set_h_nelem_msg msg;
02113 __db_set_h_nelem_reply *replyp = NULL;
02114 int ret;
02115 DB_ENV *dbenv;
02116
02117 ret = 0;
02118 dbenv = dbp->dbenv;
02119 if (dbenv == NULL || !RPC_ON(dbenv))
02120 return (__dbcl_noserver(NULL));
02121
02122 cl = (CLIENT *)dbenv->cl_handle;
02123
02124 if (dbp == NULL)
02125 msg.dbpcl_id = 0;
02126 else
02127 msg.dbpcl_id = dbp->cl_id;
02128 msg.nelem = nelem;
02129
02130 replyp = __db_db_set_h_nelem_4004(&msg, cl);
02131 if (replyp == NULL) {
02132 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02133 ret = DB_NOSERVER;
02134 goto out;
02135 }
02136 ret = replyp->status;
02137 out:
02138 if (replyp != NULL)
02139 xdr_free((xdrproc_t)xdr___db_set_h_nelem_reply, (void *)replyp);
02140 return (ret);
02141 }
02142
02143
02144
02145
02146 int
02147 __dbcl_db_set_lorder(dbp, lorder)
02148 DB * dbp;
02149 int lorder;
02150 {
02151 CLIENT *cl;
02152 __db_set_lorder_msg msg;
02153 __db_set_lorder_reply *replyp = NULL;
02154 int ret;
02155 DB_ENV *dbenv;
02156
02157 ret = 0;
02158 dbenv = dbp->dbenv;
02159 if (dbenv == NULL || !RPC_ON(dbenv))
02160 return (__dbcl_noserver(NULL));
02161
02162 cl = (CLIENT *)dbenv->cl_handle;
02163
02164 if (dbp == NULL)
02165 msg.dbpcl_id = 0;
02166 else
02167 msg.dbpcl_id = dbp->cl_id;
02168 msg.lorder = lorder;
02169
02170 replyp = __db_db_set_lorder_4004(&msg, cl);
02171 if (replyp == NULL) {
02172 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02173 ret = DB_NOSERVER;
02174 goto out;
02175 }
02176 ret = replyp->status;
02177 out:
02178 if (replyp != NULL)
02179 xdr_free((xdrproc_t)xdr___db_set_lorder_reply, (void *)replyp);
02180 return (ret);
02181 }
02182
02183
02184
02185
02186 int
02187 __dbcl_db_set_pagesize(dbp, pagesize)
02188 DB * dbp;
02189 u_int32_t pagesize;
02190 {
02191 CLIENT *cl;
02192 __db_set_pagesize_msg msg;
02193 __db_set_pagesize_reply *replyp = NULL;
02194 int ret;
02195 DB_ENV *dbenv;
02196
02197 ret = 0;
02198 dbenv = dbp->dbenv;
02199 if (dbenv == NULL || !RPC_ON(dbenv))
02200 return (__dbcl_noserver(NULL));
02201
02202 cl = (CLIENT *)dbenv->cl_handle;
02203
02204 if (dbp == NULL)
02205 msg.dbpcl_id = 0;
02206 else
02207 msg.dbpcl_id = dbp->cl_id;
02208 msg.pagesize = pagesize;
02209
02210 replyp = __db_db_set_pagesize_4004(&msg, cl);
02211 if (replyp == NULL) {
02212 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02213 ret = DB_NOSERVER;
02214 goto out;
02215 }
02216 ret = replyp->status;
02217 out:
02218 if (replyp != NULL)
02219 xdr_free((xdrproc_t)xdr___db_set_pagesize_reply, (void *)replyp);
02220 return (ret);
02221 }
02222
02223
02224
02225
02226 int
02227 __dbcl_db_set_q_extentsize(dbp, extentsize)
02228 DB * dbp;
02229 u_int32_t extentsize;
02230 {
02231 CLIENT *cl;
02232 __db_set_q_extentsize_msg msg;
02233 __db_set_q_extentsize_reply *replyp = NULL;
02234 int ret;
02235 DB_ENV *dbenv;
02236
02237 ret = 0;
02238 dbenv = dbp->dbenv;
02239 if (dbenv == NULL || !RPC_ON(dbenv))
02240 return (__dbcl_noserver(NULL));
02241
02242 cl = (CLIENT *)dbenv->cl_handle;
02243
02244 if (dbp == NULL)
02245 msg.dbpcl_id = 0;
02246 else
02247 msg.dbpcl_id = dbp->cl_id;
02248 msg.extentsize = extentsize;
02249
02250 replyp = __db_db_set_q_extentsize_4004(&msg, cl);
02251 if (replyp == NULL) {
02252 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02253 ret = DB_NOSERVER;
02254 goto out;
02255 }
02256 ret = replyp->status;
02257 out:
02258 if (replyp != NULL)
02259 xdr_free((xdrproc_t)xdr___db_set_q_extentsize_reply, (void *)replyp);
02260 return (ret);
02261 }
02262
02263
02264
02265
02266 int
02267 __dbcl_db_set_re_delim(dbp, delim)
02268 DB * dbp;
02269 int delim;
02270 {
02271 CLIENT *cl;
02272 __db_set_re_delim_msg msg;
02273 __db_set_re_delim_reply *replyp = NULL;
02274 int ret;
02275 DB_ENV *dbenv;
02276
02277 ret = 0;
02278 dbenv = dbp->dbenv;
02279 if (dbenv == NULL || !RPC_ON(dbenv))
02280 return (__dbcl_noserver(NULL));
02281
02282 cl = (CLIENT *)dbenv->cl_handle;
02283
02284 if (dbp == NULL)
02285 msg.dbpcl_id = 0;
02286 else
02287 msg.dbpcl_id = dbp->cl_id;
02288 msg.delim = delim;
02289
02290 replyp = __db_db_set_re_delim_4004(&msg, cl);
02291 if (replyp == NULL) {
02292 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02293 ret = DB_NOSERVER;
02294 goto out;
02295 }
02296 ret = replyp->status;
02297 out:
02298 if (replyp != NULL)
02299 xdr_free((xdrproc_t)xdr___db_set_re_delim_reply, (void *)replyp);
02300 return (ret);
02301 }
02302
02303
02304
02305
02306 int
02307 __dbcl_db_set_re_len(dbp, len)
02308 DB * dbp;
02309 u_int32_t len;
02310 {
02311 CLIENT *cl;
02312 __db_set_re_len_msg msg;
02313 __db_set_re_len_reply *replyp = NULL;
02314 int ret;
02315 DB_ENV *dbenv;
02316
02317 ret = 0;
02318 dbenv = dbp->dbenv;
02319 if (dbenv == NULL || !RPC_ON(dbenv))
02320 return (__dbcl_noserver(NULL));
02321
02322 cl = (CLIENT *)dbenv->cl_handle;
02323
02324 if (dbp == NULL)
02325 msg.dbpcl_id = 0;
02326 else
02327 msg.dbpcl_id = dbp->cl_id;
02328 msg.len = len;
02329
02330 replyp = __db_db_set_re_len_4004(&msg, cl);
02331 if (replyp == NULL) {
02332 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02333 ret = DB_NOSERVER;
02334 goto out;
02335 }
02336 ret = replyp->status;
02337 out:
02338 if (replyp != NULL)
02339 xdr_free((xdrproc_t)xdr___db_set_re_len_reply, (void *)replyp);
02340 return (ret);
02341 }
02342
02343
02344
02345
02346 int
02347 __dbcl_db_set_re_pad(dbp, pad)
02348 DB * dbp;
02349 int pad;
02350 {
02351 CLIENT *cl;
02352 __db_set_re_pad_msg msg;
02353 __db_set_re_pad_reply *replyp = NULL;
02354 int ret;
02355 DB_ENV *dbenv;
02356
02357 ret = 0;
02358 dbenv = dbp->dbenv;
02359 if (dbenv == NULL || !RPC_ON(dbenv))
02360 return (__dbcl_noserver(NULL));
02361
02362 cl = (CLIENT *)dbenv->cl_handle;
02363
02364 if (dbp == NULL)
02365 msg.dbpcl_id = 0;
02366 else
02367 msg.dbpcl_id = dbp->cl_id;
02368 msg.pad = pad;
02369
02370 replyp = __db_db_set_re_pad_4004(&msg, cl);
02371 if (replyp == NULL) {
02372 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02373 ret = DB_NOSERVER;
02374 goto out;
02375 }
02376 ret = replyp->status;
02377 out:
02378 if (replyp != NULL)
02379 xdr_free((xdrproc_t)xdr___db_set_re_pad_reply, (void *)replyp);
02380 return (ret);
02381 }
02382
02383
02384
02385
02386 int
02387 __dbcl_db_stat(dbp, txnp, sp, flags)
02388 DB * dbp;
02389 DB_TXN * txnp;
02390 void * sp;
02391 u_int32_t flags;
02392 {
02393 CLIENT *cl;
02394 __db_stat_msg msg;
02395 __db_stat_reply *replyp = NULL;
02396 int ret;
02397 DB_ENV *dbenv;
02398
02399 ret = 0;
02400 dbenv = dbp->dbenv;
02401 if (dbenv == NULL || !RPC_ON(dbenv))
02402 return (__dbcl_noserver(NULL));
02403
02404 cl = (CLIENT *)dbenv->cl_handle;
02405
02406 if (dbp == NULL)
02407 msg.dbpcl_id = 0;
02408 else
02409 msg.dbpcl_id = dbp->cl_id;
02410 if (txnp == NULL)
02411 msg.txnpcl_id = 0;
02412 else
02413 msg.txnpcl_id = txnp->txnid;
02414 msg.flags = flags;
02415
02416 replyp = __db_db_stat_4004(&msg, cl);
02417 if (replyp == NULL) {
02418 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02419 ret = DB_NOSERVER;
02420 goto out;
02421 }
02422 ret = __dbcl_db_stat_ret(dbp, txnp, sp, flags, replyp);
02423 out:
02424 if (replyp != NULL)
02425 xdr_free((xdrproc_t)xdr___db_stat_reply, (void *)replyp);
02426 return (ret);
02427 }
02428
02429
02430
02431
02432 int
02433 __dbcl_db_sync(dbp, flags)
02434 DB * dbp;
02435 u_int32_t flags;
02436 {
02437 CLIENT *cl;
02438 __db_sync_msg msg;
02439 __db_sync_reply *replyp = NULL;
02440 int ret;
02441 DB_ENV *dbenv;
02442
02443 ret = 0;
02444 dbenv = dbp->dbenv;
02445 if (dbenv == NULL || !RPC_ON(dbenv))
02446 return (__dbcl_noserver(NULL));
02447
02448 cl = (CLIENT *)dbenv->cl_handle;
02449
02450 if (dbp == NULL)
02451 msg.dbpcl_id = 0;
02452 else
02453 msg.dbpcl_id = dbp->cl_id;
02454 msg.flags = flags;
02455
02456 replyp = __db_db_sync_4004(&msg, cl);
02457 if (replyp == NULL) {
02458 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02459 ret = DB_NOSERVER;
02460 goto out;
02461 }
02462 ret = replyp->status;
02463 out:
02464 if (replyp != NULL)
02465 xdr_free((xdrproc_t)xdr___db_sync_reply, (void *)replyp);
02466 return (ret);
02467 }
02468
02469
02470
02471
02472
02473 int
02474 __dbcl_db_truncate(dbp, txnp, countp, flags)
02475 DB * dbp;
02476 DB_TXN * txnp;
02477 u_int32_t * countp;
02478 u_int32_t flags;
02479 {
02480 CLIENT *cl;
02481 __db_truncate_msg msg;
02482 __db_truncate_reply *replyp = NULL;
02483 int ret;
02484 DB_ENV *dbenv;
02485
02486 ret = 0;
02487 dbenv = dbp->dbenv;
02488 if (dbenv == NULL || !RPC_ON(dbenv))
02489 return (__dbcl_noserver(NULL));
02490
02491 cl = (CLIENT *)dbenv->cl_handle;
02492
02493 if (dbp == NULL)
02494 msg.dbpcl_id = 0;
02495 else
02496 msg.dbpcl_id = dbp->cl_id;
02497 if (txnp == NULL)
02498 msg.txnpcl_id = 0;
02499 else
02500 msg.txnpcl_id = txnp->txnid;
02501 msg.flags = flags;
02502
02503 replyp = __db_db_truncate_4004(&msg, cl);
02504 if (replyp == NULL) {
02505 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02506 ret = DB_NOSERVER;
02507 goto out;
02508 }
02509 ret = __dbcl_db_truncate_ret(dbp, txnp, countp, flags, replyp);
02510 out:
02511 if (replyp != NULL)
02512 xdr_free((xdrproc_t)xdr___db_truncate_reply, (void *)replyp);
02513 return (ret);
02514 }
02515
02516
02517
02518
02519 int
02520 __dbcl_dbc_c_close(dbc)
02521 DBC * dbc;
02522 {
02523 CLIENT *cl;
02524 __dbc_c_close_msg msg;
02525 __dbc_c_close_reply *replyp = NULL;
02526 int ret;
02527 DB_ENV *dbenv;
02528
02529 ret = 0;
02530 dbenv = dbc->dbp->dbenv;
02531 if (dbenv == NULL || !RPC_ON(dbenv))
02532 return (__dbcl_noserver(NULL));
02533
02534 cl = (CLIENT *)dbenv->cl_handle;
02535
02536 if (dbc == NULL)
02537 msg.dbccl_id = 0;
02538 else
02539 msg.dbccl_id = dbc->cl_id;
02540
02541 replyp = __db_dbc_c_close_4004(&msg, cl);
02542 if (replyp == NULL) {
02543 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02544 ret = DB_NOSERVER;
02545 goto out;
02546 }
02547 ret = __dbcl_dbc_c_close_ret(dbc, replyp);
02548 out:
02549 if (replyp != NULL)
02550 xdr_free((xdrproc_t)xdr___dbc_c_close_reply, (void *)replyp);
02551 return (ret);
02552 }
02553
02554
02555
02556
02557 int
02558 __dbcl_dbc_c_count(dbc, countp, flags)
02559 DBC * dbc;
02560 db_recno_t * countp;
02561 u_int32_t flags;
02562 {
02563 CLIENT *cl;
02564 __dbc_c_count_msg msg;
02565 __dbc_c_count_reply *replyp = NULL;
02566 int ret;
02567 DB_ENV *dbenv;
02568
02569 ret = 0;
02570 dbenv = dbc->dbp->dbenv;
02571 if (dbenv == NULL || !RPC_ON(dbenv))
02572 return (__dbcl_noserver(NULL));
02573
02574 cl = (CLIENT *)dbenv->cl_handle;
02575
02576 if (dbc == NULL)
02577 msg.dbccl_id = 0;
02578 else
02579 msg.dbccl_id = dbc->cl_id;
02580 msg.flags = flags;
02581
02582 replyp = __db_dbc_c_count_4004(&msg, cl);
02583 if (replyp == NULL) {
02584 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02585 ret = DB_NOSERVER;
02586 goto out;
02587 }
02588 ret = __dbcl_dbc_c_count_ret(dbc, countp, flags, replyp);
02589 out:
02590 if (replyp != NULL)
02591 xdr_free((xdrproc_t)xdr___dbc_c_count_reply, (void *)replyp);
02592 return (ret);
02593 }
02594
02595
02596
02597
02598 int
02599 __dbcl_dbc_c_del(dbc, flags)
02600 DBC * dbc;
02601 u_int32_t flags;
02602 {
02603 CLIENT *cl;
02604 __dbc_c_del_msg msg;
02605 __dbc_c_del_reply *replyp = NULL;
02606 int ret;
02607 DB_ENV *dbenv;
02608
02609 ret = 0;
02610 dbenv = dbc->dbp->dbenv;
02611 if (dbenv == NULL || !RPC_ON(dbenv))
02612 return (__dbcl_noserver(NULL));
02613
02614 cl = (CLIENT *)dbenv->cl_handle;
02615
02616 if (dbc == NULL)
02617 msg.dbccl_id = 0;
02618 else
02619 msg.dbccl_id = dbc->cl_id;
02620 msg.flags = flags;
02621
02622 replyp = __db_dbc_c_del_4004(&msg, cl);
02623 if (replyp == NULL) {
02624 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02625 ret = DB_NOSERVER;
02626 goto out;
02627 }
02628 ret = replyp->status;
02629 out:
02630 if (replyp != NULL)
02631 xdr_free((xdrproc_t)xdr___dbc_c_del_reply, (void *)replyp);
02632 return (ret);
02633 }
02634
02635
02636
02637
02638 int
02639 __dbcl_dbc_c_dup(dbc, dbcp, flags)
02640 DBC * dbc;
02641 DBC ** dbcp;
02642 u_int32_t flags;
02643 {
02644 CLIENT *cl;
02645 __dbc_c_dup_msg msg;
02646 __dbc_c_dup_reply *replyp = NULL;
02647 int ret;
02648 DB_ENV *dbenv;
02649
02650 ret = 0;
02651 dbenv = dbc->dbp->dbenv;
02652 if (dbenv == NULL || !RPC_ON(dbenv))
02653 return (__dbcl_noserver(NULL));
02654
02655 cl = (CLIENT *)dbenv->cl_handle;
02656
02657 if (dbc == NULL)
02658 msg.dbccl_id = 0;
02659 else
02660 msg.dbccl_id = dbc->cl_id;
02661 msg.flags = flags;
02662
02663 replyp = __db_dbc_c_dup_4004(&msg, cl);
02664 if (replyp == NULL) {
02665 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02666 ret = DB_NOSERVER;
02667 goto out;
02668 }
02669 ret = __dbcl_dbc_c_dup_ret(dbc, dbcp, flags, replyp);
02670 out:
02671 if (replyp != NULL)
02672 xdr_free((xdrproc_t)xdr___dbc_c_dup_reply, (void *)replyp);
02673 return (ret);
02674 }
02675
02676
02677
02678
02679 int
02680 __dbcl_dbc_c_get(dbc, key, data, flags)
02681 DBC * dbc;
02682 DBT * key;
02683 DBT * data;
02684 u_int32_t flags;
02685 {
02686 CLIENT *cl;
02687 __dbc_c_get_msg msg;
02688 __dbc_c_get_reply *replyp = NULL;
02689 int ret;
02690 DB_ENV *dbenv;
02691
02692 ret = 0;
02693 dbenv = dbc->dbp->dbenv;
02694 if (dbenv == NULL || !RPC_ON(dbenv))
02695 return (__dbcl_noserver(NULL));
02696
02697 cl = (CLIENT *)dbenv->cl_handle;
02698
02699 if (dbc == NULL)
02700 msg.dbccl_id = 0;
02701 else
02702 msg.dbccl_id = dbc->cl_id;
02703 msg.keydlen = key->dlen;
02704 msg.keydoff = key->doff;
02705 msg.keyulen = key->ulen;
02706 msg.keyflags = key->flags;
02707 msg.keydata.keydata_val = key->data;
02708 msg.keydata.keydata_len = key->size;
02709 msg.datadlen = data->dlen;
02710 msg.datadoff = data->doff;
02711 msg.dataulen = data->ulen;
02712 msg.dataflags = data->flags;
02713 msg.datadata.datadata_val = data->data;
02714 msg.datadata.datadata_len = data->size;
02715 msg.flags = flags;
02716
02717 replyp = __db_dbc_c_get_4004(&msg, cl);
02718 if (replyp == NULL) {
02719 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02720 ret = DB_NOSERVER;
02721 goto out;
02722 }
02723 ret = __dbcl_dbc_c_get_ret(dbc, key, data, flags, replyp);
02724 out:
02725 if (replyp != NULL)
02726 xdr_free((xdrproc_t)xdr___dbc_c_get_reply, (void *)replyp);
02727 return (ret);
02728 }
02729
02730
02731
02732
02733 int
02734 __dbcl_dbc_c_pget(dbc, skey, pkey, data, flags)
02735 DBC * dbc;
02736 DBT * skey;
02737 DBT * pkey;
02738 DBT * data;
02739 u_int32_t flags;
02740 {
02741 CLIENT *cl;
02742 __dbc_c_pget_msg msg;
02743 __dbc_c_pget_reply *replyp = NULL;
02744 int ret;
02745 DB_ENV *dbenv;
02746
02747 ret = 0;
02748 dbenv = dbc->dbp->dbenv;
02749 if (dbenv == NULL || !RPC_ON(dbenv))
02750 return (__dbcl_noserver(NULL));
02751
02752 cl = (CLIENT *)dbenv->cl_handle;
02753
02754 if (dbc == NULL)
02755 msg.dbccl_id = 0;
02756 else
02757 msg.dbccl_id = dbc->cl_id;
02758 msg.skeydlen = skey->dlen;
02759 msg.skeydoff = skey->doff;
02760 msg.skeyulen = skey->ulen;
02761 msg.skeyflags = skey->flags;
02762 msg.skeydata.skeydata_val = skey->data;
02763 msg.skeydata.skeydata_len = skey->size;
02764 msg.pkeydlen = pkey->dlen;
02765 msg.pkeydoff = pkey->doff;
02766 msg.pkeyulen = pkey->ulen;
02767 msg.pkeyflags = pkey->flags;
02768 msg.pkeydata.pkeydata_val = pkey->data;
02769 msg.pkeydata.pkeydata_len = pkey->size;
02770 msg.datadlen = data->dlen;
02771 msg.datadoff = data->doff;
02772 msg.dataulen = data->ulen;
02773 msg.dataflags = data->flags;
02774 msg.datadata.datadata_val = data->data;
02775 msg.datadata.datadata_len = data->size;
02776 msg.flags = flags;
02777
02778 replyp = __db_dbc_c_pget_4004(&msg, cl);
02779 if (replyp == NULL) {
02780 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02781 ret = DB_NOSERVER;
02782 goto out;
02783 }
02784 ret = __dbcl_dbc_c_pget_ret(dbc, skey, pkey, data, flags, replyp);
02785 out:
02786 if (replyp != NULL)
02787 xdr_free((xdrproc_t)xdr___dbc_c_pget_reply, (void *)replyp);
02788 return (ret);
02789 }
02790
02791
02792
02793
02794 int
02795 __dbcl_dbc_c_put(dbc, key, data, flags)
02796 DBC * dbc;
02797 DBT * key;
02798 DBT * data;
02799 u_int32_t flags;
02800 {
02801 CLIENT *cl;
02802 __dbc_c_put_msg msg;
02803 __dbc_c_put_reply *replyp = NULL;
02804 int ret;
02805 DB_ENV *dbenv;
02806
02807 ret = 0;
02808 dbenv = dbc->dbp->dbenv;
02809 if (dbenv == NULL || !RPC_ON(dbenv))
02810 return (__dbcl_noserver(NULL));
02811
02812 cl = (CLIENT *)dbenv->cl_handle;
02813
02814 if (dbc == NULL)
02815 msg.dbccl_id = 0;
02816 else
02817 msg.dbccl_id = dbc->cl_id;
02818 msg.keydlen = key->dlen;
02819 msg.keydoff = key->doff;
02820 msg.keyulen = key->ulen;
02821 msg.keyflags = key->flags;
02822 msg.keydata.keydata_val = key->data;
02823 msg.keydata.keydata_len = key->size;
02824 msg.datadlen = data->dlen;
02825 msg.datadoff = data->doff;
02826 msg.dataulen = data->ulen;
02827 msg.dataflags = data->flags;
02828 msg.datadata.datadata_val = data->data;
02829 msg.datadata.datadata_len = data->size;
02830 msg.flags = flags;
02831
02832 replyp = __db_dbc_c_put_4004(&msg, cl);
02833 if (replyp == NULL) {
02834 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02835 ret = DB_NOSERVER;
02836 goto out;
02837 }
02838 ret = __dbcl_dbc_c_put_ret(dbc, key, data, flags, replyp);
02839 out:
02840 if (replyp != NULL)
02841 xdr_free((xdrproc_t)xdr___dbc_c_put_reply, (void *)replyp);
02842 return (ret);
02843 }
02844
02845
02846
02847
02848 int
02849 __dbcl_txn_abort(txnp)
02850 DB_TXN * txnp;
02851 {
02852 CLIENT *cl;
02853 __txn_abort_msg msg;
02854 __txn_abort_reply *replyp = NULL;
02855 int ret;
02856 DB_ENV *dbenv;
02857
02858 ret = 0;
02859 dbenv = txnp->mgrp->dbenv;
02860 if (dbenv == NULL || !RPC_ON(dbenv))
02861 return (__dbcl_noserver(NULL));
02862
02863 cl = (CLIENT *)dbenv->cl_handle;
02864
02865 if (txnp == NULL)
02866 msg.txnpcl_id = 0;
02867 else
02868 msg.txnpcl_id = txnp->txnid;
02869
02870 replyp = __db_txn_abort_4004(&msg, cl);
02871 if (replyp == NULL) {
02872 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02873 ret = DB_NOSERVER;
02874 goto out;
02875 }
02876 ret = __dbcl_txn_abort_ret(txnp, replyp);
02877 out:
02878 if (replyp != NULL)
02879 xdr_free((xdrproc_t)xdr___txn_abort_reply, (void *)replyp);
02880 return (ret);
02881 }
02882
02883
02884
02885
02886 int
02887 __dbcl_txn_commit(txnp, flags)
02888 DB_TXN * txnp;
02889 u_int32_t flags;
02890 {
02891 CLIENT *cl;
02892 __txn_commit_msg msg;
02893 __txn_commit_reply *replyp = NULL;
02894 int ret;
02895 DB_ENV *dbenv;
02896
02897 ret = 0;
02898 dbenv = txnp->mgrp->dbenv;
02899 if (dbenv == NULL || !RPC_ON(dbenv))
02900 return (__dbcl_noserver(NULL));
02901
02902 cl = (CLIENT *)dbenv->cl_handle;
02903
02904 if (txnp == NULL)
02905 msg.txnpcl_id = 0;
02906 else
02907 msg.txnpcl_id = txnp->txnid;
02908 msg.flags = flags;
02909
02910 replyp = __db_txn_commit_4004(&msg, cl);
02911 if (replyp == NULL) {
02912 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02913 ret = DB_NOSERVER;
02914 goto out;
02915 }
02916 ret = __dbcl_txn_commit_ret(txnp, flags, replyp);
02917 out:
02918 if (replyp != NULL)
02919 xdr_free((xdrproc_t)xdr___txn_commit_reply, (void *)replyp);
02920 return (ret);
02921 }
02922
02923
02924
02925
02926 int
02927 __dbcl_txn_discard(txnp, flags)
02928 DB_TXN * txnp;
02929 u_int32_t flags;
02930 {
02931 CLIENT *cl;
02932 __txn_discard_msg msg;
02933 __txn_discard_reply *replyp = NULL;
02934 int ret;
02935 DB_ENV *dbenv;
02936
02937 ret = 0;
02938 dbenv = txnp->mgrp->dbenv;
02939 if (dbenv == NULL || !RPC_ON(dbenv))
02940 return (__dbcl_noserver(NULL));
02941
02942 cl = (CLIENT *)dbenv->cl_handle;
02943
02944 if (txnp == NULL)
02945 msg.txnpcl_id = 0;
02946 else
02947 msg.txnpcl_id = txnp->txnid;
02948 msg.flags = flags;
02949
02950 replyp = __db_txn_discard_4004(&msg, cl);
02951 if (replyp == NULL) {
02952 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02953 ret = DB_NOSERVER;
02954 goto out;
02955 }
02956 ret = __dbcl_txn_discard_ret(txnp, flags, replyp);
02957 out:
02958 if (replyp != NULL)
02959 xdr_free((xdrproc_t)xdr___txn_discard_reply, (void *)replyp);
02960 return (ret);
02961 }
02962
02963
02964
02965
02966 int
02967 __dbcl_txn_prepare(txnp, gid)
02968 DB_TXN * txnp;
02969 u_int8_t * gid;
02970 {
02971 CLIENT *cl;
02972 __txn_prepare_msg msg;
02973 __txn_prepare_reply *replyp = NULL;
02974 int ret;
02975 DB_ENV *dbenv;
02976
02977 ret = 0;
02978 dbenv = txnp->mgrp->dbenv;
02979 if (dbenv == NULL || !RPC_ON(dbenv))
02980 return (__dbcl_noserver(NULL));
02981
02982 cl = (CLIENT *)dbenv->cl_handle;
02983
02984 if (txnp == NULL)
02985 msg.txnpcl_id = 0;
02986 else
02987 msg.txnpcl_id = txnp->txnid;
02988 memcpy(msg.gid, gid, 128);
02989
02990 replyp = __db_txn_prepare_4004(&msg, cl);
02991 if (replyp == NULL) {
02992 __db_err(dbenv, clnt_sperror(cl, "Berkeley DB"));
02993 ret = DB_NOSERVER;
02994 goto out;
02995 }
02996 ret = replyp->status;
02997 out:
02998 if (replyp != NULL)
02999 xdr_free((xdrproc_t)xdr___txn_prepare_reply, (void *)replyp);
03000 return (ret);
03001 }
03002
03003
03004
03005
03006
03007
03008
03009 void
03010 __dbcl_dbp_init(dbp)
03011 DB *dbp;
03012 {
03013 dbp->associate = __dbcl_db_associate;
03014 dbp->close = __dbcl_db_close;
03015 dbp->compact =
03016 (int (*)(DB *, DB_TXN *, DBT *, DBT *, DB_COMPACT *, u_int32_t, DBT *))
03017 __dbcl_dbp_illegal;
03018 dbp->cursor = __dbcl_db_cursor;
03019 dbp->del = __dbcl_db_del;
03020 dbp->fd =
03021 (int (*)(DB *, int *))
03022 __dbcl_dbp_illegal;
03023 dbp->get = __dbcl_db_get;
03024 dbp->get_bt_minkey = __dbcl_db_get_bt_minkey;
03025 dbp->get_cachesize =
03026 (int (*)(DB *, u_int32_t *, u_int32_t *, int *))
03027 __dbcl_dbp_illegal;
03028 dbp->get_dbname = __dbcl_db_get_dbname;
03029 dbp->get_encrypt_flags = __dbcl_db_get_encrypt_flags;
03030 dbp->get_flags = __dbcl_db_get_flags;
03031 dbp->get_h_ffactor = __dbcl_db_get_h_ffactor;
03032 dbp->get_h_nelem = __dbcl_db_get_h_nelem;
03033 dbp->get_lorder = __dbcl_db_get_lorder;
03034 dbp->get_mpf =
03035 (DB_MPOOLFILE * (*)(DB *))
03036 __dbcl_dbp_illegal;
03037 dbp->get_open_flags = __dbcl_db_get_open_flags;
03038 dbp->get_pagesize = __dbcl_db_get_pagesize;
03039 dbp->get_q_extentsize = __dbcl_db_get_q_extentsize;
03040 dbp->get_re_delim = __dbcl_db_get_re_delim;
03041 dbp->get_re_len = __dbcl_db_get_re_len;
03042 dbp->get_re_pad = __dbcl_db_get_re_pad;
03043 dbp->get_re_source =
03044 (int (*)(DB *, const char **))
03045 __dbcl_dbp_illegal;
03046 dbp->join = __dbcl_db_join;
03047 dbp->key_range = __dbcl_db_key_range;
03048 dbp->open = __dbcl_db_open;
03049 dbp->pget = __dbcl_db_pget;
03050 dbp->put = __dbcl_db_put;
03051 dbp->remove = __dbcl_db_remove;
03052 dbp->rename = __dbcl_db_rename;
03053 dbp->set_alloc =
03054 (int (*)(DB *, void *(*)(size_t), void *(*)(void *, size_t), void (*)(void *)))
03055 __dbcl_dbp_illegal;
03056 dbp->set_append_recno =
03057 (int (*)(DB *, int (*)(DB *, DBT *, db_recno_t)))
03058 __dbcl_dbp_illegal;
03059 dbp->set_bt_compare =
03060 (int (*)(DB *, int (*)(DB *, const DBT *, const DBT *)))
03061 __dbcl_dbp_illegal;
03062 dbp->set_bt_minkey = __dbcl_db_set_bt_minkey;
03063 dbp->set_bt_prefix =
03064 (int (*)(DB *, size_t(*)(DB *, const DBT *, const DBT *)))
03065 __dbcl_dbp_illegal;
03066 dbp->set_cachesize =
03067 (int (*)(DB *, u_int32_t, u_int32_t, int))
03068 __dbcl_dbp_illegal;
03069 dbp->set_dup_compare =
03070 (int (*)(DB *, int (*)(DB *, const DBT *, const DBT *)))
03071 __dbcl_dbp_illegal;
03072 dbp->set_encrypt = __dbcl_db_set_encrypt;
03073 dbp->set_feedback =
03074 (int (*)(DB *, void (*)(DB *, int, int)))
03075 __dbcl_dbp_illegal;
03076 dbp->set_flags = __dbcl_db_set_flags;
03077 dbp->set_h_ffactor = __dbcl_db_set_h_ffactor;
03078 dbp->set_h_hash =
03079 (int (*)(DB *, u_int32_t(*)(DB *, const void *, u_int32_t)))
03080 __dbcl_dbp_illegal;
03081 dbp->set_h_nelem = __dbcl_db_set_h_nelem;
03082 dbp->set_lorder = __dbcl_db_set_lorder;
03083 dbp->set_pagesize = __dbcl_db_set_pagesize;
03084 dbp->set_paniccall =
03085 (int (*)(DB *, void (*)(DB_ENV *, int)))
03086 __dbcl_dbp_illegal;
03087 dbp->set_q_extentsize = __dbcl_db_set_q_extentsize;
03088 dbp->set_re_delim = __dbcl_db_set_re_delim;
03089 dbp->set_re_len = __dbcl_db_set_re_len;
03090 dbp->set_re_pad = __dbcl_db_set_re_pad;
03091 dbp->set_re_source =
03092 (int (*)(DB *, const char *))
03093 __dbcl_dbp_illegal;
03094 dbp->stat = __dbcl_db_stat;
03095 dbp->stat_print =
03096 (int (*)(DB *, u_int32_t))
03097 __dbcl_dbp_illegal;
03098 dbp->sync = __dbcl_db_sync;
03099 dbp->truncate = __dbcl_db_truncate;
03100 dbp->upgrade =
03101 (int (*)(DB *, const char *, u_int32_t))
03102 __dbcl_dbp_illegal;
03103 dbp->verify =
03104 (int (*)(DB *, const char *, const char *, FILE *, u_int32_t))
03105 __dbcl_dbp_illegal;
03106 return;
03107 }
03108
03109
03110
03111
03112
03113
03114
03115 void
03116 __dbcl_dbc_init(dbc)
03117 DBC *dbc;
03118 {
03119 dbc->c_close = __dbcl_dbc_c_close;
03120 dbc->c_count = __dbcl_dbc_c_count;
03121 dbc->c_del = __dbcl_dbc_c_del;
03122 dbc->c_dup = __dbcl_dbc_c_dup;
03123 dbc->c_get = __dbcl_dbc_c_get;
03124 dbc->c_pget = __dbcl_dbc_c_pget;
03125 dbc->c_put = __dbcl_dbc_c_put;
03126 return;
03127 }
03128
03129
03130
03131
03132
03133
03134
03135 void
03136 __dbcl_dbenv_init(dbenv)
03137 DB_ENV *dbenv;
03138 {
03139 dbenv->close = __dbcl_env_close;
03140 dbenv->dbremove = __dbcl_env_dbremove;
03141 dbenv->dbrename = __dbcl_env_dbrename;
03142 dbenv->failchk =
03143 (int (*)(DB_ENV *, u_int32_t))
03144 __dbcl_dbenv_illegal;
03145 dbenv->fileid_reset =
03146 (int (*)(DB_ENV *, const char *, u_int32_t))
03147 __dbcl_dbenv_illegal;
03148 dbenv->get_cachesize = __dbcl_env_get_cachesize;
03149 dbenv->get_data_dirs =
03150 (int (*)(DB_ENV *, const char ***))
03151 __dbcl_dbenv_illegal;
03152 dbenv->get_encrypt_flags = __dbcl_env_get_encrypt_flags;
03153 dbenv->get_flags = __dbcl_env_get_flags;
03154 dbenv->get_home = __dbcl_env_get_home;
03155 dbenv->get_lg_bsize =
03156 (int (*)(DB_ENV *, u_int32_t *))
03157 __dbcl_dbenv_illegal;
03158 dbenv->get_lg_dir =
03159 (int (*)(DB_ENV *, const char **))
03160 __dbcl_dbenv_illegal;
03161 dbenv->get_lg_filemode =
03162 (int (*)(DB_ENV *, int *))
03163 __dbcl_dbenv_illegal;
03164 dbenv->get_lg_max =
03165 (int (*)(DB_ENV *, u_int32_t *))
03166 __dbcl_dbenv_illegal;
03167 dbenv->get_lg_regionmax =
03168 (int (*)(DB_ENV *, u_int32_t *))
03169 __dbcl_dbenv_illegal;
03170 dbenv->get_lk_conflicts =
03171 (int (*)(DB_ENV *, const u_int8_t **, int *))
03172 __dbcl_dbenv_illegal;
03173 dbenv->get_lk_detect =
03174 (int (*)(DB_ENV *, u_int32_t *))
03175 __dbcl_dbenv_illegal;
03176 dbenv->get_lk_max_lockers =
03177 (int (*)(DB_ENV *, u_int32_t *))
03178 __dbcl_dbenv_illegal;
03179 dbenv->get_lk_max_locks =
03180 (int (*)(DB_ENV *, u_int32_t *))
03181 __dbcl_dbenv_illegal;
03182 dbenv->get_lk_max_objects =
03183 (int (*)(DB_ENV *, u_int32_t *))
03184 __dbcl_dbenv_illegal;
03185 dbenv->get_mp_max_openfd =
03186 (int (*)(DB_ENV *, int *))
03187 __dbcl_dbenv_illegal;
03188 dbenv->get_mp_max_write =
03189 (int (*)(DB_ENV *, int *, int *))
03190 __dbcl_dbenv_illegal;
03191 dbenv->get_mp_mmapsize =
03192 (int (*)(DB_ENV *, size_t *))
03193 __dbcl_dbenv_illegal;
03194 dbenv->get_open_flags = __dbcl_env_get_open_flags;
03195 dbenv->get_rep_limit =
03196 (int (*)(DB_ENV *, u_int32_t *, u_int32_t *))
03197 __dbcl_dbenv_illegal;
03198 dbenv->get_shm_key =
03199 (int (*)(DB_ENV *, long *))
03200 __dbcl_dbenv_illegal;
03201 dbenv->get_timeout =
03202 (int (*)(DB_ENV *, db_timeout_t *, u_int32_t))
03203 __dbcl_dbenv_illegal;
03204 dbenv->get_tmp_dir =
03205 (int (*)(DB_ENV *, const char **))
03206 __dbcl_dbenv_illegal;
03207 dbenv->get_tx_max =
03208 (int (*)(DB_ENV *, u_int32_t *))
03209 __dbcl_dbenv_illegal;
03210 dbenv->get_tx_timestamp =
03211 (int (*)(DB_ENV *, time_t *))
03212 __dbcl_dbenv_illegal;
03213 dbenv->get_verbose =
03214 (int (*)(DB_ENV *, u_int32_t, int *))
03215 __dbcl_dbenv_illegal;
03216 dbenv->lock_detect =
03217 (int (*)(DB_ENV *, u_int32_t, u_int32_t, int *))
03218 __dbcl_dbenv_illegal;
03219 dbenv->lock_get =
03220 (int (*)(DB_ENV *, u_int32_t, u_int32_t, const DBT *, db_lockmode_t, DB_LOCK *))
03221 __dbcl_dbenv_illegal;
03222 dbenv->lock_id =
03223 (int (*)(DB_ENV *, u_int32_t *))
03224 __dbcl_dbenv_illegal;
03225 dbenv->lock_id_free =
03226 (int (*)(DB_ENV *, u_int32_t))
03227 __dbcl_dbenv_illegal;
03228 dbenv->lock_put =
03229 (int (*)(DB_ENV *, DB_LOCK *))
03230 __dbcl_dbenv_illegal;
03231 dbenv->lock_stat =
03232 (int (*)(DB_ENV *, DB_LOCK_STAT **, u_int32_t))
03233 __dbcl_dbenv_illegal;
03234 dbenv->lock_stat_print =
03235 (int (*)(DB_ENV *, u_int32_t))
03236 __dbcl_dbenv_illegal;
03237 dbenv->lock_vec =
03238 (int (*)(DB_ENV *, u_int32_t, u_int32_t, DB_LOCKREQ *, int, DB_LOCKREQ **))
03239 __dbcl_dbenv_illegal;
03240 dbenv->log_archive =
03241 (int (*)(DB_ENV *, char ***, u_int32_t))
03242 __dbcl_dbenv_illegal;
03243 dbenv->log_cursor =
03244 (int (*)(DB_ENV *, DB_LOGC **, u_int32_t))
03245 __dbcl_dbenv_illegal;
03246 dbenv->log_file =
03247 (int (*)(DB_ENV *, const DB_LSN *, char *, size_t))
03248 __dbcl_dbenv_illegal;
03249 dbenv->log_flush =
03250 (int (*)(DB_ENV *, const DB_LSN *))
03251 __dbcl_dbenv_illegal;
03252 dbenv->log_printf =
03253 (int (*)(DB_ENV *, DB_TXN *, const char *, ...))
03254 __dbcl_dbenv_illegal;
03255 dbenv->log_put =
03256 (int (*)(DB_ENV *, DB_LSN *, const DBT *, u_int32_t))
03257 __dbcl_dbenv_illegal;
03258 dbenv->log_stat =
03259 (int (*)(DB_ENV *, DB_LOG_STAT **, u_int32_t))
03260 __dbcl_dbenv_illegal;
03261 dbenv->log_stat_print =
03262 (int (*)(DB_ENV *, u_int32_t))
03263 __dbcl_dbenv_illegal;
03264 dbenv->lsn_reset =
03265 (int (*)(DB_ENV *, const char *, u_int32_t))
03266 __dbcl_dbenv_illegal;
03267 dbenv->memp_fcreate =
03268 (int (*)(DB_ENV *, DB_MPOOLFILE **, u_int32_t))
03269 __dbcl_dbenv_illegal;
03270 dbenv->memp_register =
03271 (int (*)(DB_ENV *, int, int (*)(DB_ENV *, db_pgno_t, void *, DBT *), int (*)(DB_ENV *, db_pgno_t, void *, DBT *)))
03272 __dbcl_dbenv_illegal;
03273 dbenv->memp_stat =
03274 (int (*)(DB_ENV *, DB_MPOOL_STAT **, DB_MPOOL_FSTAT ***, u_int32_t))
03275 __dbcl_dbenv_illegal;
03276 dbenv->memp_stat_print =
03277 (int (*)(DB_ENV *, u_int32_t))
03278 __dbcl_dbenv_illegal;
03279 dbenv->memp_sync =
03280 (int (*)(DB_ENV *, DB_LSN *))
03281 __dbcl_dbenv_illegal;
03282 dbenv->memp_trickle =
03283 (int (*)(DB_ENV *, int, int *))
03284 __dbcl_dbenv_illegal;
03285 dbenv->mutex_alloc =
03286 (int (*)(DB_ENV *, u_int32_t, u_int32_t *))
03287 __dbcl_dbenv_illegal;
03288 dbenv->mutex_free =
03289 (int (*)(DB_ENV *, u_int32_t))
03290 __dbcl_dbenv_illegal;
03291 dbenv->mutex_get_align =
03292 (int (*)(DB_ENV *, u_int32_t *))
03293 __dbcl_dbenv_illegal;
03294 dbenv->mutex_get_increment =
03295 (int (*)(DB_ENV *, u_int32_t *))
03296 __dbcl_dbenv_illegal;
03297 dbenv->mutex_get_max =
03298 (int (*)(DB_ENV *, u_int32_t *))
03299 __dbcl_dbenv_illegal;
03300 dbenv->mutex_get_tas_spins =
03301 (int (*)(DB_ENV *, u_int32_t *))
03302 __dbcl_dbenv_illegal;
03303 dbenv->mutex_lock =
03304 (int (*)(DB_ENV *, u_int32_t))
03305 __dbcl_dbenv_illegal;
03306 dbenv->mutex_set_align =
03307 (int (*)(DB_ENV *, u_int32_t))
03308 __dbcl_dbenv_illegal;
03309 dbenv->mutex_set_increment =
03310 (int (*)(DB_ENV *, u_int32_t))
03311 __dbcl_dbenv_illegal;
03312 dbenv->mutex_set_max =
03313 (int (*)(DB_ENV *, u_int32_t))
03314 __dbcl_dbenv_illegal;
03315 dbenv->mutex_set_tas_spins =
03316 (int (*)(DB_ENV *, u_int32_t))
03317 __dbcl_dbenv_illegal;
03318 dbenv->mutex_stat =
03319 (int (*)(DB_ENV *, DB_MUTEX_STAT **, u_int32_t))
03320 __dbcl_dbenv_illegal;
03321 dbenv->mutex_stat_print =
03322 (int (*)(DB_ENV *, u_int32_t))
03323 __dbcl_dbenv_illegal;
03324 dbenv->mutex_unlock =
03325 (int (*)(DB_ENV *, u_int32_t))
03326 __dbcl_dbenv_illegal;
03327 dbenv->open = __dbcl_env_open;
03328 dbenv->remove = __dbcl_env_remove;
03329 dbenv->rep_elect =
03330 (int (*)(DB_ENV *, int, int, int, u_int32_t, int *, u_int32_t))
03331 __dbcl_dbenv_illegal;
03332 dbenv->rep_flush =
03333 (int (*)(DB_ENV *))
03334 __dbcl_dbenv_illegal;
03335 dbenv->rep_get_config =
03336 (int (*)(DB_ENV *, u_int32_t, int *))
03337 __dbcl_dbenv_illegal;
03338 dbenv->rep_process_message =
03339 (int (*)(DB_ENV *, DBT *, DBT *, int *, DB_LSN *))
03340 __dbcl_dbenv_illegal;
03341 dbenv->rep_set_config =
03342 (int (*)(DB_ENV *, u_int32_t, int))
03343 __dbcl_dbenv_illegal;
03344 dbenv->rep_start =
03345 (int (*)(DB_ENV *, DBT *, u_int32_t))
03346 __dbcl_dbenv_illegal;
03347 dbenv->rep_stat =
03348 (int (*)(DB_ENV *, DB_REP_STAT **, u_int32_t))
03349 __dbcl_dbenv_illegal;
03350 dbenv->rep_stat_print =
03351 (int (*)(DB_ENV *, u_int32_t))
03352 __dbcl_dbenv_illegal;
03353 dbenv->rep_sync =
03354 (int (*)(DB_ENV *, u_int32_t))
03355 __dbcl_dbenv_illegal;
03356 dbenv->set_alloc =
03357 (int (*)(DB_ENV *, void *(*)(size_t), void *(*)(void *, size_t), void (*)(void *)))
03358 __dbcl_dbenv_illegal;
03359 dbenv->set_app_dispatch =
03360 (int (*)(DB_ENV *, int (*)(DB_ENV *, DBT *, DB_LSN *, db_recops)))
03361 __dbcl_dbenv_illegal;
03362 dbenv->set_cachesize = __dbcl_env_set_cachesize;
03363 dbenv->set_data_dir =
03364 (int (*)(DB_ENV *, const char *))
03365 __dbcl_dbenv_illegal;
03366 dbenv->set_encrypt = __dbcl_env_set_encrypt;
03367 dbenv->set_feedback =
03368 (int (*)(DB_ENV *, void (*)(DB_ENV *, int, int)))
03369 __dbcl_dbenv_illegal;
03370 dbenv->set_flags = __dbcl_env_set_flags;
03371 dbenv->set_intermediate_dir =
03372 (int (*)(DB_ENV *, int, u_int32_t))
03373 __dbcl_dbenv_illegal;
03374 dbenv->set_isalive =
03375 (int (*)(DB_ENV *, int (*)(DB_ENV *, pid_t, db_threadid_t)))
03376 __dbcl_dbenv_illegal;
03377 dbenv->set_lg_bsize =
03378 (int (*)(DB_ENV *, u_int32_t))
03379 __dbcl_dbenv_illegal;
03380 dbenv->set_lg_dir =
03381 (int (*)(DB_ENV *, const char *))
03382 __dbcl_dbenv_illegal;
03383 dbenv->set_lg_filemode =
03384 (int (*)(DB_ENV *, int))
03385 __dbcl_dbenv_illegal;
03386 dbenv->set_lg_max =
03387 (int (*)(DB_ENV *, u_int32_t))
03388 __dbcl_dbenv_illegal;
03389 dbenv->set_lg_regionmax =
03390 (int (*)(DB_ENV *, u_int32_t))
03391 __dbcl_dbenv_illegal;
03392 dbenv->set_lk_conflicts =
03393 (int (*)(DB_ENV *, u_int8_t *, int))
03394 __dbcl_dbenv_illegal;
03395 dbenv->set_lk_detect =
03396 (int (*)(DB_ENV *, u_int32_t))
03397 __dbcl_dbenv_illegal;
03398 dbenv->set_lk_max =
03399 (int (*)(DB_ENV *, u_int32_t))
03400 __dbcl_dbenv_illegal;
03401 dbenv->set_lk_max_lockers =
03402 (int (*)(DB_ENV *, u_int32_t))
03403 __dbcl_dbenv_illegal;
03404 dbenv->set_lk_max_locks =
03405 (int (*)(DB_ENV *, u_int32_t))
03406 __dbcl_dbenv_illegal;
03407 dbenv->set_lk_max_objects =
03408 (int (*)(DB_ENV *, u_int32_t))
03409 __dbcl_dbenv_illegal;
03410 dbenv->set_mp_max_openfd =
03411 (int (*)(DB_ENV *, int))
03412 __dbcl_dbenv_illegal;
03413 dbenv->set_mp_max_write =
03414 (int (*)(DB_ENV *, int, int))
03415 __dbcl_dbenv_illegal;
03416 dbenv->set_mp_mmapsize =
03417 (int (*)(DB_ENV *, size_t))
03418 __dbcl_dbenv_illegal;
03419 dbenv->set_paniccall =
03420 (int (*)(DB_ENV *, void (*)(DB_ENV *, int)))
03421 __dbcl_dbenv_illegal;
03422 dbenv->set_rep_limit =
03423 (int (*)(DB_ENV *, u_int32_t, u_int32_t))
03424 __dbcl_dbenv_illegal;
03425 dbenv->set_rep_request =
03426 (int (*)(DB_ENV *, u_int32_t, u_int32_t))
03427 __dbcl_dbenv_illegal;
03428 dbenv->set_rep_transport =
03429 (int (*)(DB_ENV *, int, int (*)(DB_ENV *, const DBT *, const DBT *, const DB_LSN *, int, u_int32_t)))
03430 __dbcl_dbenv_illegal;
03431 dbenv->set_rpc_server = __dbcl_env_set_rpc_server;
03432 dbenv->set_shm_key =
03433 (int (*)(DB_ENV *, long))
03434 __dbcl_dbenv_illegal;
03435 dbenv->set_thread_count =
03436 (int (*)(DB_ENV *, u_int32_t))
03437 __dbcl_dbenv_illegal;
03438 dbenv->set_thread_id =
03439 (int (*)(DB_ENV *, void (*)(DB_ENV *, pid_t *, db_threadid_t*)))
03440 __dbcl_dbenv_illegal;
03441 dbenv->set_thread_id_string =
03442 (int (*)(DB_ENV *, char *(*)(DB_ENV *, pid_t, db_threadid_t, char *)))
03443 __dbcl_dbenv_illegal;
03444 dbenv->set_timeout =
03445 (int (*)(DB_ENV *, u_int32_t, u_int32_t))
03446 __dbcl_dbenv_illegal;
03447 dbenv->set_tmp_dir =
03448 (int (*)(DB_ENV *, const char *))
03449 __dbcl_dbenv_illegal;
03450 dbenv->set_tx_max =
03451 (int (*)(DB_ENV *, u_int32_t))
03452 __dbcl_dbenv_illegal;
03453 dbenv->set_tx_timestamp =
03454 (int (*)(DB_ENV *, time_t *))
03455 __dbcl_dbenv_illegal;
03456 dbenv->set_verbose =
03457 (int (*)(DB_ENV *, u_int32_t, int))
03458 __dbcl_dbenv_illegal;
03459 dbenv->stat_print =
03460 (int (*)(DB_ENV *, u_int32_t))
03461 __dbcl_dbenv_illegal;
03462 dbenv->txn_begin = __dbcl_env_txn_begin;
03463 dbenv->txn_checkpoint =
03464 (int (*)(DB_ENV *, u_int32_t, u_int32_t, u_int32_t))
03465 __dbcl_dbenv_illegal;
03466 dbenv->txn_recover = __dbcl_env_txn_recover;
03467 dbenv->txn_stat =
03468 (int (*)(DB_ENV *, DB_TXN_STAT **, u_int32_t))
03469 __dbcl_dbenv_illegal;
03470 dbenv->txn_stat_print =
03471 (int (*)(DB_ENV *, u_int32_t))
03472 __dbcl_dbenv_illegal;
03473 return;
03474 }
03475
03476
03477
03478
03479
03480
03481
03482 void
03483 __dbcl_txn_init(txn)
03484 DB_TXN *txn;
03485 {
03486 txn->abort = __dbcl_txn_abort;
03487 txn->commit = __dbcl_txn_commit;
03488 txn->discard = __dbcl_txn_discard;
03489 txn->get_name =
03490 (int (*)(DB_TXN *, const char **))
03491 __dbcl_txn_illegal;
03492 txn->prepare = __dbcl_txn_prepare;
03493 txn->set_name =
03494 (int (*)(DB_TXN *, const char *))
03495 __dbcl_txn_illegal;
03496 return;
03497 }
03498