summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/rpc/rpc-lib/src/rpc-clnt.h
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-06-23 02:55:21 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-06-24 10:32:11 -0700
commite82ca8fc5164f4ba2ff396da86b4a490d9a47370 (patch)
tree1c92b4d4c0a4ad42b2213f17c92ededc45ae89a2 /xlators/protocol/rpc/rpc-lib/src/rpc-clnt.h
parent487e9f1d59bbf7b37a30ceef5dbfd8ca77b94988 (diff)
minor improvements in protocol
* rpc_clnt_submit() now takes 'cbkfn' as an argument. * readdir xdr now uses dirent structure directly instead of using 'opaque' buffer through which it was serializing / unserializing the dirent structure. * 'gfs_id' field (currently used for debugging) is properly updated Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'xlators/protocol/rpc/rpc-lib/src/rpc-clnt.h')
-rw-r--r--xlators/protocol/rpc/rpc-lib/src/rpc-clnt.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/xlators/protocol/rpc/rpc-lib/src/rpc-clnt.h b/xlators/protocol/rpc/rpc-lib/src/rpc-clnt.h
index 89942ce7f57..efc256cd261 100644
--- a/xlators/protocol/rpc/rpc-lib/src/rpc-clnt.h
+++ b/xlators/protocol/rpc/rpc-lib/src/rpc-clnt.h
@@ -45,8 +45,7 @@ typedef int (*rpc_clnt_notify_t) (struct rpc_clnt *rpc, void *mydata,
typedef int (*fop_cbk_fn_t) (struct rpc_req *req, struct iovec *iov, int count,
void *myframe);
-typedef int (*clnt_fn_t) (call_frame_t *, xlator_t *,
- struct rpc_clnt_program *, void *args);
+typedef int (*clnt_fn_t) (call_frame_t *fr, xlator_t *xl, void *args);
struct saved_frame {
union {
@@ -61,37 +60,29 @@ struct saved_frame {
struct timeval saved_at;
int32_t procnum;
struct rpc_clnt_program *prog;
+ fop_cbk_fn_t cbkfn;
uint64_t callid;
rpc_transport_rsp_t rsp;
};
-
struct saved_frames {
int64_t count;
struct saved_frame sf;
};
-/* TODO: */
-struct xptr_clnt {
- int remote_port;
- char * remote_host;
-
- /* xptr specific */
- peer_info_t peerinfo;
-};
/* Initialized by procnum */
typedef struct rpc_clnt_procedure {
char *procname;
clnt_fn_t fn;
- fop_cbk_fn_t cbkfn;
} rpc_clnt_procedure_t;
typedef struct rpc_clnt_program {
char *progname;
int prognum;
int progver;
- rpc_clnt_procedure_t *actor;
+ rpc_clnt_procedure_t *proctable;
+ char **procnames;
int numproc;
} rpc_clnt_prog_t;
@@ -158,7 +149,8 @@ struct rpc_clnt * rpc_clnt_init (struct rpc_clnt_config *config,
int rpc_clnt_register_notify (struct rpc_clnt *rpc, rpc_clnt_notify_t fn,
void *mydata);
-int rpc_clnt_submit (struct rpc_clnt *rpc, rpc_clnt_prog_t *prog, int procnum,
+int rpc_clnt_submit (struct rpc_clnt *rpc, rpc_clnt_prog_t *prog,
+ int procnum, fop_cbk_fn_t cbkfn,
struct iovec *proghdr, int proghdrcount,
struct iovec *progpayload, int progpayloadcount,
struct iobref *iobref, void *frame);