summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-clnt.h
diff options
context:
space:
mode:
authorAnand V. Avati <avati@blackhole.gluster.com>2010-08-12 05:05:02 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-12 03:55:16 -0700
commit12ce6a962aee3674eb722a09241b43923712ee8e (patch)
tree61b9e822a8dc398e24c654378fcfd886ce51c447 /rpc/rpc-lib/src/rpc-clnt.h
parentb69a4f1e31726260a07f883cefac28ed29cc6a12 (diff)
rpc-clnt/socket: rpc_clnt_reconfig() API to support overriding of port numbers
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1314 (portmapper functionality) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1314
Diffstat (limited to 'rpc/rpc-lib/src/rpc-clnt.h')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.h41
1 files changed, 23 insertions, 18 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.h b/rpc/rpc-lib/src/rpc-clnt.h
index b9d39b3320a..0e7dfa39613 100644
--- a/rpc/rpc-lib/src/rpc-clnt.h
+++ b/rpc/rpc-lib/src/rpc-clnt.h
@@ -90,21 +90,30 @@ typedef struct rpc_auth_data {
char authdata[RPC_MAX_AUTH_BYTES];
} rpc_auth_data_t;
+
+struct rpc_clnt_config {
+ int rpc_timeout;
+ int remote_port;
+ char * remote_host;
+};
+
+
#define rpc_auth_flavour(au) ((au).flavour)
struct rpc_clnt_connection {
- pthread_mutex_t lock;
- rpc_transport_t *trans;
- gf_timer_t *reconnect;
- gf_timer_t *timer;
- gf_timer_t *ping_timer;
- struct rpc_clnt *rpc_clnt;
- char connected;
- struct saved_frames *saved_frames;
- int32_t frame_timeout;
- struct timeval last_sent;
- struct timeval last_received;
- int32_t ping_started;
+ pthread_mutex_t lock;
+ rpc_transport_t *trans;
+ struct rpc_clnt_config config;
+ gf_timer_t *reconnect;
+ gf_timer_t *timer;
+ gf_timer_t *ping_timer;
+ struct rpc_clnt *rpc_clnt;
+ char connected;
+ struct saved_frames *saved_frames;
+ int32_t frame_timeout;
+ struct timeval last_sent;
+ struct timeval last_received;
+ int32_t ping_started;
};
typedef struct rpc_clnt_connection rpc_clnt_connection_t;
@@ -140,12 +149,6 @@ struct rpc_clnt {
glusterfs_ctx_t *ctx;
};
-struct rpc_clnt_config {
- int rpc_timeout;
- int remote_port;
- char * remote_host;
-};
-
struct rpc_clnt * rpc_clnt_init (struct rpc_clnt_config *config,
dict_t *options, glusterfs_ctx_t *ctx,
@@ -185,4 +188,6 @@ void rpc_clnt_unset_connected (rpc_clnt_connection_t *conn);
void rpc_clnt_reconnect (void *trans_ptr);
+void rpc_clnt_reconfig (struct rpc_clnt *rpc, struct rpc_clnt_config *config);
+
#endif /* !_RPC_CLNT_H */