summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-transport.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-08-17 05:35:42 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-18 00:37:03 -0700
commit4e01a54eaa6da1bd6817d62dcc51a75e22699e2b (patch)
tree7832f4070729ef43f0ee1560bf3c737b2e123d49 /rpc/rpc-lib/src/rpc-transport.h
parentd8a8a66523e06abc0f44e1cdfe528cbf28d881a9 (diff)
rpc - cleanup and changes related to rdma
- remove rpc_conn_state structure. - add a member to point struct rpc_req in rpc_transport_req structure. This is needed for rdma to store rdma specific per request data. Signed-off-by: Raghavendra G <raghavendra@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 'rpc/rpc-lib/src/rpc-transport.h')
-rw-r--r--rpc/rpc-lib/src/rpc-transport.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h
index 7ef3abb7320..a6a3441dcdd 100644
--- a/rpc/rpc-lib/src/rpc-transport.h
+++ b/rpc/rpc-lib/src/rpc-transport.h
@@ -125,8 +125,9 @@ struct rpc_transport_rsp {
typedef struct rpc_transport_rsp rpc_transport_rsp_t;
struct rpc_transport_req {
- rpc_transport_msg_t msg;
- rpc_transport_rsp_t rsp;
+ rpc_transport_msg_t msg;
+ rpc_transport_rsp_t rsp;
+ struct rpc_req *rpc_req;
};
typedef struct rpc_transport_req rpc_transport_req_t;
@@ -168,6 +169,11 @@ typedef int (*rpc_transport_notify_t) (rpc_transport_t *, void *mydata,
rpc_transport_event_t, void *data, ...);
struct rpc_transport {
struct rpc_transport_ops *ops;
+ rpc_transport_t *listener; /* listener transport to which
+ * request for creation of this
+ * transport came from. valid only
+ * on server process.
+ */
void *private;
void *xl_private;
void *xl; /* Used for THIS */
@@ -202,12 +208,12 @@ struct rpc_transport_ops {
int32_t (*get_peername) (rpc_transport_t *this, char *hostname,
int hostlen);
int32_t (*get_peeraddr) (rpc_transport_t *this, char *peeraddr,
- int addrlen, struct sockaddr *sa,
+ int addrlen, struct sockaddr_storage *sa,
socklen_t sasize);
int32_t (*get_myname) (rpc_transport_t *this, char *hostname,
int hostlen);
int32_t (*get_myaddr) (rpc_transport_t *this, char *peeraddr,
- int addrlen, struct sockaddr *sa,
+ int addrlen, struct sockaddr_storage *sa,
socklen_t sasize);
};
@@ -253,14 +259,14 @@ rpc_transport_get_peername (rpc_transport_t *this, char *hostname, int hostlen);
int32_t
rpc_transport_get_peeraddr (rpc_transport_t *this, char *peeraddr, int addrlen,
- struct sockaddr *sa, size_t salen);
+ struct sockaddr_storage *sa, size_t salen);
int32_t
rpc_transport_get_myname (rpc_transport_t *this, char *hostname, int hostlen);
int32_t
rpc_transport_get_myaddr (rpc_transport_t *this, char *peeraddr, int addrlen,
- struct sockaddr *sa, size_t salen);
+ struct sockaddr_storage *sa, size_t salen);
rpc_transport_pollin_t *
rpc_transport_pollin_alloc (rpc_transport_t *this, struct iovec *vector,