summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/xdr/src')
-rw-r--r--rpc/xdr/src/cli1-xdr.c40
-rw-r--r--rpc/xdr/src/cli1-xdr.h40
-rw-r--r--rpc/xdr/src/cli1-xdr.x24
-rw-r--r--rpc/xdr/src/cli1.c30
-rw-r--r--rpc/xdr/src/cli1.h12
5 files changed, 142 insertions, 4 deletions
diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c
index ba58992d8..c51546a8e 100644
--- a/rpc/xdr/src/cli1-xdr.c
+++ b/rpc/xdr/src/cli1-xdr.c
@@ -45,6 +45,15 @@ xdr_gf1_cli_replace_op (XDR *xdrs, gf1_cli_replace_op *objp)
}
bool_t
+xdr_gf_quota_type (XDR *xdrs, gf_quota_type *objp)
+{
+
+ if (!xdr_enum (xdrs, (enum_t *) objp))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_gf1_cli_friends_list (XDR *xdrs, gf1_cli_friends_list *objp)
{
@@ -114,7 +123,6 @@ xdr_gf1_cli_probe_rsp (XDR *xdrs, gf1_cli_probe_rsp *objp)
{
register int32_t *buf;
-
if (xdrs->x_op == XDR_ENCODE) {
buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
if (buf == NULL) {
@@ -530,6 +538,36 @@ xdr_gf1_cli_reset_vol_rsp (XDR *xdrs, gf1_cli_reset_vol_rsp *objp)
}
bool_t
+xdr_gf1_cli_quota_req (XDR *xdrs, gf1_cli_quota_req *objp)
+{
+
+ if (!xdr_string (xdrs, &objp->volname, ~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_quota_rsp (XDR *xdrs, gf1_cli_quota_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->volname, ~0))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->op_errstr, ~0))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->limit_list, ~0))
+ return FALSE;
+ if (!xdr_gf_quota_type (xdrs, &objp->type))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_gf1_cli_set_vol_req (XDR *xdrs, gf1_cli_set_vol_req *objp)
{
diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h
index fc84e48dd..865eb793a 100644
--- a/rpc/xdr/src/cli1-xdr.h
+++ b/rpc/xdr/src/cli1-xdr.h
@@ -16,8 +16,6 @@
along with this program. If not, see
<http://www.gnu.org/licenses/>.
*/
-
-
/*
* Please do not edit this file.
* It was generated using rpcgen.
@@ -27,7 +25,7 @@
#define _CLI1_XDR_H_RPCGEN
#include <rpc/rpc.h>
-#include "xdr-common.h"
+
#ifdef __cplusplus
extern "C" {
@@ -52,6 +50,17 @@ enum gf1_cli_replace_op {
};
typedef enum gf1_cli_replace_op gf1_cli_replace_op;
+enum gf_quota_type {
+ GF_QUOTA_OPTION_TYPE_NONE = 0,
+ GF_QUOTA_OPTION_TYPE_ENABLE = 0 + 1,
+ GF_QUOTA_OPTION_TYPE_DISABLE = 0 + 2,
+ GF_QUOTA_OPTION_TYPE_LIMIT_USAGE = 0 + 3,
+ GF_QUOTA_OPTION_TYPE_REMOVE = 0 + 4,
+ GF_QUOTA_OPTION_TYPE_LIST = 0 + 5,
+ GF_QUOTA_OPTION_TYPE_VERSION = 0 + 6,
+};
+typedef enum gf_quota_type gf_quota_type;
+
enum gf1_cli_friends_list {
GF_CLI_LIST_ALL = 1,
};
@@ -331,6 +340,25 @@ struct gf1_cli_reset_vol_rsp {
};
typedef struct gf1_cli_reset_vol_rsp gf1_cli_reset_vol_rsp;
+struct gf1_cli_quota_req {
+ char *volname;
+ struct {
+ u_int dict_len;
+ char *dict_val;
+ } dict;
+};
+typedef struct gf1_cli_quota_req gf1_cli_quota_req;
+
+struct gf1_cli_quota_rsp {
+ int op_ret;
+ int op_errno;
+ char *volname;
+ char *op_errstr;
+ char *limit_list;
+ gf_quota_type type;
+};
+typedef struct gf1_cli_quota_rsp gf1_cli_quota_rsp;
+
struct gf1_cli_set_vol_req {
char *volname;
struct {
@@ -472,6 +500,7 @@ extern bool_t xdr_gf1_cli_sync_volume (XDR *, gf1_cli_sync_volume*);
extern bool_t xdr_gf1_cli_op_flags (XDR *, gf1_cli_op_flags*);
extern bool_t xdr_gf1_cli_gsync_set (XDR *, gf1_cli_gsync_set*);
extern bool_t xdr_gf1_cli_stats_op (XDR *, gf1_cli_stats_op*);
+extern bool_t xdr_gf_quota_type (XDR *, gf_quota_type*);
extern bool_t xdr_gf1_cli_probe_req (XDR *, gf1_cli_probe_req*);
extern bool_t xdr_gf1_cli_probe_rsp (XDR *, gf1_cli_probe_rsp*);
extern bool_t xdr_gf1_cli_deprobe_req (XDR *, gf1_cli_deprobe_req*);
@@ -501,6 +530,8 @@ extern bool_t xdr_gf1_cli_replace_brick_req (XDR *, gf1_cli_replace_brick_req*)
extern bool_t xdr_gf1_cli_replace_brick_rsp (XDR *, gf1_cli_replace_brick_rsp*);
extern bool_t xdr_gf1_cli_reset_vol_req (XDR *, gf1_cli_reset_vol_req*);
extern bool_t xdr_gf1_cli_reset_vol_rsp (XDR *, gf1_cli_reset_vol_rsp*);
+extern bool_t xdr_gf1_cli_quota_req (XDR *, gf1_cli_quota_req*);
+extern bool_t xdr_gf1_cli_quota_rsp (XDR *, gf1_cli_quota_rsp*);
extern bool_t xdr_gf1_cli_set_vol_req (XDR *, gf1_cli_set_vol_req*);
extern bool_t xdr_gf1_cli_set_vol_rsp (XDR *, gf1_cli_set_vol_rsp*);
extern bool_t xdr_gf1_cli_log_filename_req (XDR *, gf1_cli_log_filename_req*);
@@ -527,6 +558,7 @@ extern bool_t xdr_gf1_cli_sync_volume ();
extern bool_t xdr_gf1_cli_op_flags ();
extern bool_t xdr_gf1_cli_gsync_set ();
extern bool_t xdr_gf1_cli_stats_op ();
+extern bool_t xdr_gf_quota_type ();
extern bool_t xdr_gf1_cli_probe_req ();
extern bool_t xdr_gf1_cli_probe_rsp ();
extern bool_t xdr_gf1_cli_deprobe_req ();
@@ -556,6 +588,8 @@ extern bool_t xdr_gf1_cli_replace_brick_req ();
extern bool_t xdr_gf1_cli_replace_brick_rsp ();
extern bool_t xdr_gf1_cli_reset_vol_req ();
extern bool_t xdr_gf1_cli_reset_vol_rsp ();
+extern bool_t xdr_gf1_cli_quota_req ();
+extern bool_t xdr_gf1_cli_quota_rsp ();
extern bool_t xdr_gf1_cli_set_vol_req ();
extern bool_t xdr_gf1_cli_set_vol_rsp ();
extern bool_t xdr_gf1_cli_log_filename_req ();
diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x
index f47d18d88..f352b6f36 100644
--- a/rpc/xdr/src/cli1-xdr.x
+++ b/rpc/xdr/src/cli1-xdr.x
@@ -14,6 +14,16 @@
GF_REPLACE_OP_COMMIT_FORCE
} ;
+enum gf_quota_type {
+ GF_QUOTA_OPTION_TYPE_NONE = 0,
+ GF_QUOTA_OPTION_TYPE_ENABLE,
+ GF_QUOTA_OPTION_TYPE_DISABLE,
+ GF_QUOTA_OPTION_TYPE_LIMIT_USAGE,
+ GF_QUOTA_OPTION_TYPE_REMOVE,
+ GF_QUOTA_OPTION_TYPE_LIST,
+ GF_QUOTA_OPTION_TYPE_VERSION
+};
+
enum gf1_cli_friends_list {
GF_CLI_LIST_ALL = 1
} ;
@@ -338,3 +348,17 @@ struct gf1_cli_stats_volume_rsp {
string op_errstr<>;
opaque stats_info<>;
};
+
+struct gf1_cli_quota_req {
+ string volname<>;
+ opaque dict<>;
+} ;
+
+struct gf1_cli_quota_rsp {
+ int op_ret;
+ int op_errno;
+ string volname<>;
+ string op_errstr<>;
+ string limit_list<>;
+ gf_quota_type type;
+};
diff --git a/rpc/xdr/src/cli1.c b/rpc/xdr/src/cli1.c
index df77c6f7a..bd3cbf0c7 100644
--- a/rpc/xdr/src/cli1.c
+++ b/rpc/xdr/src/cli1.c
@@ -483,6 +483,36 @@ gf_xdr_from_cli_gsync_set_req (struct iovec outmsg, void *req)
}
ssize_t
+gf_xdr_serialize_cli_quota_rsp (struct iovec outmsg, void *rsp)
+{
+ return xdr_serialize_generic (outmsg, (void *)rsp,
+ (xdrproc_t)xdr_gf1_cli_quota_rsp);
+
+}
+
+ssize_t
+gf_xdr_to_cli_quota_req (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_quota_req);
+}
+
+ssize_t
+gf_xdr_to_cli_quota_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_quota_rsp);
+}
+
+
+ssize_t
+gf_xdr_from_cli_quota_req (struct iovec outmsg, void *req)
+{
+ return xdr_serialize_generic (outmsg, (void *)req,
+ (xdrproc_t)xdr_gf1_cli_quota_req);
+}
+
+ssize_t
gf_xdr_serialize_cli_set_vol_rsp (struct iovec outmsg, void *rsp)
{
return xdr_serialize_generic (outmsg, (void *)rsp,
diff --git a/rpc/xdr/src/cli1.h b/rpc/xdr/src/cli1.h
index c22c38749..9bc3a196a 100644
--- a/rpc/xdr/src/cli1.h
+++ b/rpc/xdr/src/cli1.h
@@ -208,6 +208,18 @@ ssize_t
gf_xdr_from_cli_gsync_set_req (struct iovec outmsg, void *req);
ssize_t
+gf_xdr_serialize_cli_quota_rsp (struct iovec outmsg, void *rsp);
+
+ssize_t
+gf_xdr_to_cli_quota_req (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_to_cli_quota_rsp (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_from_cli_quota_req (struct iovec outmsg, void *req);
+
+ssize_t
gf_xdr_serialize_cli_set_vol_rsp (struct iovec outmsg, void *rsp);
ssize_t