00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <memory.h>
00023 #include "gateway_prot.h"
00024
00025
00026 static struct timeval TIMEOUT = { 25, 0 };
00027
00028 void *
00029 bamboo_dht_proc_null_2(void *argp, CLIENT *clnt)
00030 {
00031 static char clnt_res;
00032
00033 memset((char *)&clnt_res, 0, sizeof(clnt_res));
00034 if (clnt_call (clnt, BAMBOO_DHT_PROC_NULL,
00035 (xdrproc_t) xdr_void, (caddr_t) argp,
00036 (xdrproc_t) xdr_void, (caddr_t) &clnt_res,
00037 TIMEOUT) != RPC_SUCCESS) {
00038 return (NULL);
00039 }
00040 return ((void *)&clnt_res);
00041 }
00042
00043 bamboo_stat *
00044 bamboo_dht_proc_put_2(bamboo_put_args *argp, CLIENT *clnt)
00045 {
00046 static bamboo_stat clnt_res;
00047
00048 memset((char *)&clnt_res, 0, sizeof(clnt_res));
00049 if (clnt_call (clnt, BAMBOO_DHT_PROC_PUT,
00050 (xdrproc_t) xdr_bamboo_put_args, (caddr_t) argp,
00051 (xdrproc_t) xdr_bamboo_stat, (caddr_t) &clnt_res,
00052 TIMEOUT) != RPC_SUCCESS) {
00053 return (NULL);
00054 }
00055 return (&clnt_res);
00056 }
00057
00058 bamboo_get_res *
00059 bamboo_dht_proc_get_2(bamboo_get_args *argp, CLIENT *clnt)
00060 {
00061 static bamboo_get_res clnt_res;
00062
00063 memset((char *)&clnt_res, 0, sizeof(clnt_res));
00064 if (clnt_call (clnt, BAMBOO_DHT_PROC_GET,
00065 (xdrproc_t) xdr_bamboo_get_args, (caddr_t) argp,
00066 (xdrproc_t) xdr_bamboo_get_res, (caddr_t) &clnt_res,
00067 TIMEOUT) != RPC_SUCCESS) {
00068 return (NULL);
00069 }
00070 return (&clnt_res);
00071 }