summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/protocol-common.h2
-rw-r--r--rpc/xdr/src/cli1-xdr.c42
-rw-r--r--rpc/xdr/src/cli1-xdr.h36
-rw-r--r--rpc/xdr/src/cli1-xdr.x21
4 files changed, 101 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h
index 216429e79a6..3c4c8fc444f 100644
--- a/rpc/rpc-lib/src/protocol-common.h
+++ b/rpc/rpc-lib/src/protocol-common.h
@@ -203,6 +203,8 @@ enum gluster_cli_procnum {
GLUSTER_CLI_GETWD,
GLUSTER_CLI_LOG_LEVEL,
GLUSTER_CLI_STATUS_VOLUME,
+ GLUSTER_CLI_MOUNT,
+ GLUSTER_CLI_UMOUNT,
GLUSTER_CLI_MAXVALUE,
};
diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c
index d7d541eb07d..250efc93575 100644
--- a/rpc/xdr/src/cli1-xdr.c
+++ b/rpc/xdr/src/cli1-xdr.c
@@ -992,3 +992,45 @@ xdr_gf1_cli_status_volume_rsp (XDR *xdrs, gf1_cli_status_volume_rsp *objp)
return FALSE;
return TRUE;
}
+
+bool_t
+xdr_gf1_cli_mount_req (XDR *xdrs, gf1_cli_mount_req *objp)
+{
+ if (!xdr_string (xdrs, &objp->label, ~0))
+ return FALSE;
+ if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_mount_rsp (XDR *xdrs, gf1_cli_mount_rsp *objp)
+{
+ if (!xdr_int (xdrs, &objp->op_ret))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->op_errno))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->path, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_umount_req (XDR *xdrs, gf1_cli_umount_req *objp)
+{
+ if (!xdr_int (xdrs, &objp->lazy))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->path, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_umount_rsp (XDR *xdrs, gf1_cli_umount_rsp *objp)
+{
+ if (!xdr_int (xdrs, &objp->op_ret))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->op_errno))
+ return FALSE;
+ return TRUE;
+}
diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h
index 085b9f28565..0d606e79ff6 100644
--- a/rpc/xdr/src/cli1-xdr.h
+++ b/rpc/xdr/src/cli1-xdr.h
@@ -561,6 +561,34 @@ struct gf1_cli_status_volume_rsp {
};
typedef struct gf1_cli_status_volume_rsp gf1_cli_status_volume_rsp;
+struct gf1_cli_mount_req {
+ char *label;
+ struct {
+ u_int dict_len;
+ char *dict_val;
+ } dict;
+};
+typedef struct gf1_cli_mount_req gf1_cli_mount_req;
+
+struct gf1_cli_mount_rsp {
+ int op_ret;
+ int op_errno;
+ char *path;
+};
+typedef struct gf1_cli_mount_rsp gf1_cli_mount_rsp;
+
+struct gf1_cli_umount_req {
+ int lazy;
+ char *path;
+};
+typedef struct gf1_cli_umount_req gf1_cli_umount_req;
+
+struct gf1_cli_umount_rsp {
+ int op_ret;
+ int op_errno;
+};
+typedef struct gf1_cli_umount_rsp gf1_cli_umount_rsp;
+
/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
@@ -628,6 +656,10 @@ extern bool_t xdr_gf1_cli_log_level_req (XDR *, gf1_cli_log_level_req*);
extern bool_t xdr_gf1_cli_log_level_rsp (XDR *, gf1_cli_log_level_rsp*);
extern bool_t xdr_gf1_cli_status_volume_req (XDR *, gf1_cli_status_volume_req*);
extern bool_t xdr_gf1_cli_status_volume_rsp (XDR *, gf1_cli_status_volume_rsp*);
+extern bool_t xdr_gf1_cli_mount_req (XDR *, gf1_cli_mount_req*);
+extern bool_t xdr_gf1_cli_mount_rsp (XDR *, gf1_cli_mount_rsp*);
+extern bool_t xdr_gf1_cli_umount_req (XDR *, gf1_cli_umount_req*);
+extern bool_t xdr_gf1_cli_umount_rsp (XDR *, gf1_cli_umount_rsp*);
#else /* K&R C */
extern bool_t xdr_gf_cli_defrag_type ();
@@ -694,6 +726,10 @@ extern bool_t xdr_gf1_cli_log_level_req ();
extern bool_t xdr_gf1_cli_log_level_rsp ();
extern bool_t xdr_gf1_cli_status_volume_req ();
extern bool_t xdr_gf1_cli_status_volume_rsp ();
+extern bool_t xdr_gf1_cli_mount_req ();
+extern bool_t xdr_gf1_cli_mount_rsp ();
+extern bool_t xdr_gf1_cli_umount_req ();
+extern bool_t xdr_gf1_cli_umount_rsp ();
#endif /* K&R C */
diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x
index 70d221cbb3b..9fc9f02d29d 100644
--- a/rpc/xdr/src/cli1-xdr.x
+++ b/rpc/xdr/src/cli1-xdr.x
@@ -411,3 +411,24 @@ struct gf1_cli_status_volume_rsp {
string op_errstr<>;
opaque dict<>;
};
+
+struct gf1_cli_mount_req {
+ string label<>;
+ opaque dict<>;
+};
+
+struct gf1_cli_mount_rsp {
+ int op_ret;
+ int op_errno;
+ string path<>;
+};
+
+struct gf1_cli_umount_req {
+ int lazy;
+ string path<>;
+};
+
+struct gf1_cli_mount_rsp {
+ int op_ret;
+ int op_errno;
+};