summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/Makefile.am2
-rw-r--r--rpc/rpc-lib/src/Makefile.am4
-rw-r--r--rpc/rpc-lib/src/protocol-common.h4
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c7
-rw-r--r--rpc/rpc-lib/src/rpc-drc.c16
-rw-r--r--rpc/rpc-lib/src/rpcsvc.c200
-rw-r--r--rpc/rpc-lib/src/xdr-common.h15
-rw-r--r--rpc/rpc-lib/src/xdr-rpc.h17
-rw-r--r--rpc/rpc-transport/rdma/src/Makefile.am4
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.c6
-rw-r--r--rpc/rpc-transport/socket/src/socket.c4
-rw-r--r--rpc/xdr/src/.gitignore21
-rw-r--r--rpc/xdr/src/Makefile.am120
-rw-r--r--rpc/xdr/src/acl3-xdr.c94
-rw-r--r--rpc/xdr/src/acl3-xdr.h107
-rw-r--r--rpc/xdr/src/acl3-xdr.x (renamed from rpc/xdr/src/acl.x)5
-rw-r--r--rpc/xdr/src/cli1-xdr.c376
-rw-r--r--rpc/xdr/src/cli1-xdr.h386
-rw-r--r--rpc/xdr/src/cli1-xdr.x54
-rw-r--r--rpc/xdr/src/glusterd1-xdr.c923
-rw-r--r--rpc/xdr/src/glusterd1-xdr.h418
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.x128
-rw-r--r--rpc/xdr/src/nlm4-xdr.c245
-rw-r--r--rpc/xdr/src/nlm4-xdr.h258
-rw-r--r--rpc/xdr/src/nlm4-xdr.x (renamed from rpc/xdr/src/nlm4.x)42
-rw-r--r--rpc/xdr/src/nlmcbk-xdr.c28
-rw-r--r--rpc/xdr/src/nlmcbk-xdr.h65
-rw-r--r--rpc/xdr/src/nlmcbk.x24
-rw-r--r--rpc/xdr/src/nsm-xdr.c96
-rw-r--r--rpc/xdr/src/nsm-xdr.h95
-rw-r--r--rpc/xdr/src/nsm-xdr.x (renamed from rpc/xdr/src/nsm.x)0
-rw-r--r--rpc/xdr/src/portmap-xdr.c237
-rw-r--r--rpc/xdr/src/portmap-xdr.h130
-rw-r--r--rpc/xdr/src/rpc-common-xdr.c223
-rw-r--r--rpc/xdr/src/rpc-common-xdr.h104
-rw-r--r--rpc/xdr/src/rpc-common-xdr.x10
-rw-r--r--rpc/xdr/src/xdr-generic.c6
-rw-r--r--rpc/xdr/src/xdr-generic.h1
-rw-r--r--rpc/xdr/src/xdr-nfs3.c9
-rw-r--r--rpc/xdr/src/xdr-nfs3.h1
40 files changed, 471 insertions, 4014 deletions
diff --git a/rpc/Makefile.am b/rpc/Makefile.am
index ffb76e9..183b7a0 100644
--- a/rpc/Makefile.am
+++ b/rpc/Makefile.am
@@ -1 +1 @@
-SUBDIRS = rpc-lib rpc-transport xdr
+SUBDIRS = xdr rpc-lib rpc-transport
diff --git a/rpc/rpc-lib/src/Makefile.am b/rpc/rpc-lib/src/Makefile.am
index 4cdeaad..ee2f27b 100644
--- a/rpc/rpc-lib/src/Makefile.am
+++ b/rpc/rpc-lib/src/Makefile.am
@@ -2,10 +2,10 @@ lib_LTLIBRARIES = libgfrpc.la
libgfrpc_la_SOURCES = auth-unix.c rpcsvc-auth.c rpcsvc.c auth-null.c \
rpc-transport.c xdr-rpc.c xdr-rpcclnt.c rpc-clnt.c auth-glusterfs.c \
- rpc-drc.c
+ rpc-drc.c $(CONTRIBDIR)/sunrpc/xdr_sizeof.c
libgfrpc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
-libgfrpc_la_LDFLAGS = -version-info $(LIBGFRPC_LT_VERSION)
+libgfrpc_la_LDFLAGS = -version-info $(LIBGFRPC_LT_VERSION) $(GF_LDFLAGS)
noinst_HEADERS = rpcsvc.h rpc-transport.h xdr-common.h xdr-rpc.h xdr-rpcclnt.h \
rpc-clnt.h rpcsvc-common.h protocol-common.h rpc-drc.h
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h
index 90c16f9..99d5a62 100644
--- a/rpc/rpc-lib/src/protocol-common.h
+++ b/rpc/rpc-lib/src/protocol-common.h
@@ -108,7 +108,9 @@ enum gf_probe_resp {
GF_PROBE_SAME_UUID,
GF_PROBE_UNKNOWN_PEER,
GF_PROBE_ADD_FAILED,
- GF_PROBE_QUORUM_NOT_MET
+ GF_PROBE_QUORUM_NOT_MET,
+ GF_PROBE_MISSED_SNAP_CONFLICT,
+ GF_PROBE_SNAP_CONFLICT,
};
enum gf_deprobe_resp {
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index e095c55..3106342 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -717,8 +717,9 @@ rpc_clnt_handle_cbk (struct rpc_clnt *clnt, rpc_transport_pollin_t *msg)
}
gf_log (clnt->conn.name, GF_LOG_TRACE,
- "received rpc message (XID: 0x%lx, "
- "Ver: %ld, Program: %ld, ProgVers: %ld, Proc: %ld) "
+ "receivd rpc message (XID: 0x%" GF_PRI_RPC_XID ", "
+ "Ver: %" GF_PRI_RPC_VERSION ", Program: %" GF_PRI_RPC_PROG_ID ", "
+ "ProgVers: %" GF_PRI_RPC_PROG_VERS ", Proc: %" GF_PRI_RPC_PROC ") "
"from rpc-transport (%s)", rpc_call_xid (&rpcmsg),
rpc_call_rpcvers (&rpcmsg), rpc_call_program (&rpcmsg),
rpc_call_progver (&rpcmsg), rpc_call_progproc (&rpcmsg),
@@ -1141,7 +1142,7 @@ xdr_serialize_glusterfs_auth (char *dest, struct auth_glusterfs_parms_v2 *au)
{
ssize_t ret = -1;
XDR xdr;
- uint64_t ngroups = 0;
+ u_long ngroups = 0;
int max_groups = 0;
if ((!dest) || (!au))
diff --git a/rpc/rpc-lib/src/rpc-drc.c b/rpc/rpc-lib/src/rpc-drc.c
index 7e77e03..bc37324 100644
--- a/rpc/rpc-lib/src/rpc-drc.c
+++ b/rpc/rpc-lib/src/rpc-drc.c
@@ -127,14 +127,14 @@ int
drc_compare_reqs (const void *item, const void *rb_node_data, void *param)
{
int ret = -1;
- rpcsvc_request_t *req = NULL;
+ drc_cached_op_t *req = NULL;
drc_cached_op_t *reply = NULL;
GF_ASSERT (item);
GF_ASSERT (rb_node_data);
GF_ASSERT (param);
- req = (rpcsvc_request_t *)item;
+ req = (drc_cached_op_t *)item;
reply = (drc_cached_op_t *)rb_node_data;
ret = req->xid - reply->xid;
@@ -143,7 +143,7 @@ drc_compare_reqs (const void *item, const void *rb_node_data, void *param)
if (req->prognum == reply->prognum &&
req->procnum == reply->procnum &&
- req->progver == reply->progversion)
+ req->progversion == reply->progversion)
return 0;
return 1;
@@ -331,6 +331,12 @@ rpcsvc_drc_lookup (rpcsvc_request_t *req)
{
drc_client_t *client = NULL;
drc_cached_op_t *reply = NULL;
+ drc_cached_op_t new = {
+ .xid = req->xid,
+ .prognum = req->prognum,
+ .progversion = req->progver,
+ .procnum = req->procnum,
+ };
GF_ASSERT (req);
@@ -347,7 +353,7 @@ rpcsvc_drc_lookup (rpcsvc_request_t *req)
if (client->op_count == 0)
goto out;
- reply = rb_find (client->rbtree, req);
+ reply = rb_find (client->rbtree, &new);
out:
if (client)
@@ -460,7 +466,7 @@ rpcsvc_vacate_drc_entries (rpcsvc_drc_globals_t *drc)
client = reply->client;
- (void *)rb_delete (client->rbtree, reply);
+ rb_delete (client->rbtree, reply);
rpcsvc_drc_op_destroy (drc, reply);
rpcsvc_drc_client_unref (drc, client);
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c
index 8be64c1..1c13048 100644
--- a/rpc/rpc-lib/src/rpcsvc.c
+++ b/rpc/rpc-lib/src/rpcsvc.c
@@ -29,6 +29,7 @@
#include "rpc-common-xdr.h"
#include "syncop.h"
#include "rpc-drc.h"
+#include "protocol-common.h"
#include <errno.h>
#include <pthread.h>
@@ -59,6 +60,9 @@ int
rpcsvc_notify (rpc_transport_t *trans, void *mydata,
rpc_transport_event_t event, void *data, ...);
+static int
+match_subnet_v4 (const char *addrtok, const char *ipaddr);
+
rpcsvc_notify_wrapper_t *
rpcsvc_notify_wrapper_alloc (void)
{
@@ -129,32 +133,67 @@ rpcsvc_get_program_vector_sizer (rpcsvc_t *svc, uint32_t prognum,
return NULL;
}
+gf_boolean_t
+rpcsvc_can_outstanding_req_be_ignored (rpcsvc_request_t *req)
+{
+ /*
+ * If outstanding_rpc_limit is reached because of blocked locks and
+ * throttling is attempted then no unlock requests will be received. So
+ * the outstanding request count will never change i.e. it will always
+ * be equal to the limit. This also leads to ping timer expiry on
+ * client.
+ */
+
+ /*
+ * This is a hack and a necessity until grantedlock == fop completion.
+ * Ideally if we get a blocking lock request which cannot be granted
+ * right now, we should unwind the fop saying “request registered, will
+ * notify you when granted”, which is very hard to implement at the
+ * moment. Until we bring in such mechanism, we will need to live with
+ * not rate-limiting INODELK/ENTRYLK/LK fops
+ */
+
+ if ((req->prognum == GLUSTER_FOP_PROGRAM) &&
+ (req->progver == GLUSTER_FOP_VERSION)) {
+ if ((req->procnum == GFS3_OP_INODELK) ||
+ (req->procnum == GFS3_OP_FINODELK) ||
+ (req->procnum == GFS3_OP_ENTRYLK) ||
+ (req->procnum == GFS3_OP_FENTRYLK) ||
+ (req->procnum == GFS3_OP_LK))
+ return _gf_true;
+ }
+ return _gf_false;
+}
+
int
-rpcsvc_request_outstanding (rpcsvc_t *svc, rpc_transport_t *trans, int delta)
+rpcsvc_request_outstanding (rpcsvc_request_t *req, int delta)
{
int ret = 0;
int old_count = 0;
int new_count = 0;
int limit = 0;
- pthread_mutex_lock (&trans->lock);
+ if (rpcsvc_can_outstanding_req_be_ignored (req))
+ return 0;
+
+ pthread_mutex_lock (&req->trans->lock);
{
- limit = svc->outstanding_rpc_limit;
+ limit = req->svc->outstanding_rpc_limit;
if (!limit)
goto unlock;
- old_count = trans->outstanding_rpc_count;
- trans->outstanding_rpc_count += delta;
- new_count = trans->outstanding_rpc_count;
+ old_count = req->trans->outstanding_rpc_count;
+ req->trans->outstanding_rpc_count += delta;
+ new_count = req->trans->outstanding_rpc_count;
if (old_count <= limit && new_count > limit)
- ret = rpc_transport_throttle (trans, _gf_true);
+ ret = rpc_transport_throttle (req->trans, _gf_true);
if (old_count > limit && new_count <= limit)
- ret = rpc_transport_throttle (trans, _gf_false);
+ ret = rpc_transport_throttle (req->trans, _gf_false);
}
unlock:
- pthread_mutex_unlock (&trans->lock);
+ pthread_mutex_unlock (&req->trans->lock);
return ret;
}
@@ -315,7 +354,8 @@ rpcsvc_request_destroy (rpcsvc_request_t *req)
to the client. It is time to decrement the
outstanding request counter by 1.
*/
- rpcsvc_request_outstanding (req->svc, req->trans, -1);
+ if (req->prognum) //Only for initialized requests
+ rpcsvc_request_outstanding (req, -1);
rpc_transport_unref (req->trans);
@@ -397,12 +437,6 @@ rpcsvc_request_create (rpcsvc_t *svc, rpc_transport_t *trans,
goto err;
}
- /* We just received a new request from the wire. Account for
- it in the outsanding request counter to make sure we don't
- ingest too many concurrent requests from the same client.
- */
- ret = rpcsvc_request_outstanding (svc, trans, +1);
-
msgbuf = msg->vector[0].iov_base;
msglen = msg->vector[0].iov_len;
@@ -420,19 +454,28 @@ rpcsvc_request_create (rpcsvc_t *svc, rpc_transport_t *trans,
ret = -1;
rpcsvc_request_init (svc, trans, &rpcmsg, progmsg, msg, req);
- gf_log (GF_RPCSVC, GF_LOG_TRACE, "received rpc-message (XID: 0x%lx, "
- "Ver: %ld, Program: %ld, ProgVers: %ld, Proc: %ld) from"
- " rpc-transport (%s)", rpc_call_xid (&rpcmsg),
+ gf_log (GF_RPCSVC, GF_LOG_TRACE, "received rpc-message "
+ "(XID: 0x%" GF_PRI_RPC_XID ", Ver: %" GF_PRI_RPC_VERSION ", Program: %" GF_PRI_RPC_PROG_ID ", "
+ "ProgVers: %" GF_PRI_RPC_PROG_VERS ", Proc: %" GF_PRI_RPC_PROC ") "
+ "from rpc-transport (%s)", rpc_call_xid (&rpcmsg),
rpc_call_rpcvers (&rpcmsg), rpc_call_program (&rpcmsg),
rpc_call_progver (&rpcmsg), rpc_call_progproc (&rpcmsg),
trans->name);
+ /* We just received a new request from the wire. Account for
+ it in the outsanding request counter to make sure we don't
+ ingest too many concurrent requests from the same client.
+ */
+ if (req->prognum) //Only for initialized requests
+ ret = rpcsvc_request_outstanding (req, +1);
+
if (rpc_call_rpcvers (&rpcmsg) != 2) {
/* LOG- TODO: print rpc version, also print the peerinfo
from transport */
gf_log (GF_RPCSVC, GF_LOG_ERROR, "RPC version not supported "
- "(XID: 0x%lx, Ver: %ld, Prog: %ld, ProgVers: %ld, "
- "Proc: %ld) from trans (%s)", rpc_call_xid (&rpcmsg),
+ "(XID: 0x%" GF_PRI_RPC_XID ", Ver: %" GF_PRI_RPC_VERSION ", Program: %" GF_PRI_RPC_PROG_ID ", "
+ "ProgVers: %" GF_PRI_RPC_PROG_VERS ", Proc: %" GF_PRI_RPC_PROC ") "
+ "from trans (%s)", rpc_call_xid (&rpcmsg),
rpc_call_rpcvers (&rpcmsg), rpc_call_program (&rpcmsg),
rpc_call_progver (&rpcmsg), rpc_call_progproc (&rpcmsg),
trans->name);
@@ -448,8 +491,9 @@ rpcsvc_request_create (rpcsvc_t *svc, rpc_transport_t *trans,
*/
rpcsvc_request_seterr (req, AUTH_ERROR);
gf_log (GF_RPCSVC, GF_LOG_ERROR, "auth failed on request. "
- "(XID: 0x%lx, Ver: %ld, Prog: %ld, ProgVers: %ld, "
- "Proc: %ld) from trans (%s)", rpc_call_xid (&rpcmsg),
+ "(XID: 0x%" GF_PRI_RPC_XID ", Ver: %" GF_PRI_RPC_VERSION ", Program: %" GF_PRI_RPC_PROG_ID ", "
+ "ProgVers: %" GF_PRI_RPC_PROG_VERS ", Proc: %" GF_PRI_RPC_PROC ") "
+ "from trans (%s)", rpc_call_xid (&rpcmsg),
rpc_call_rpcvers (&rpcmsg), rpc_call_program (&rpcmsg),
rpc_call_progver (&rpcmsg), rpc_call_progproc (&rpcmsg),
trans->name);
@@ -794,15 +838,9 @@ err:
return txrecord;
}
-static inline int
-rpcsvc_get_callid (rpcsvc_t *rpc)
-{
- return GF_UNIVERSAL_ANSWER;
-}
-
int
rpcsvc_fill_callback (int prognum, int progver, int procnum, int payload,
- uint64_t xid, struct rpc_msg *request)
+ uint32_t xid, struct rpc_msg *request)
{
int ret = -1;
@@ -867,9 +905,9 @@ out:
return txrecord;
}
-struct iobuf *
+static struct iobuf *
rpcsvc_callback_build_record (rpcsvc_t *rpc, int prognum, int progver,
- int procnum, size_t payload, uint64_t xid,
+ int procnum, size_t payload, u_long xid,
struct iovec *recbuf)
{
struct rpc_msg request = {0, };
@@ -889,7 +927,7 @@ rpcsvc_callback_build_record (rpcsvc_t *rpc, int prognum, int progver,
&request);
if (ret == -1) {
gf_log ("rpcsvc", GF_LOG_WARNING, "cannot build a rpc-request "
- "xid (%"PRIu64")", xid);
+ "xid (%" GF_PRI_RPC_XID ")", xid);
goto out;
}
@@ -936,7 +974,6 @@ rpcsvc_callback_submit (rpcsvc_t *rpc, rpc_transport_t *trans,
rpc_transport_req_t req;
int ret = -1;
int proglen = 0;
- uint64_t callid = 0;
if (!rpc) {
goto out;
@@ -944,15 +981,14 @@ rpcsvc_callback_submit (rpcsvc_t *rpc, rpc_transport_t *trans,
memset (&req, 0, sizeof (req));
- callid = rpcsvc_get_callid (rpc);
-
if (proghdr) {
proglen += iov_length (proghdr, proghdrcount);
}
request_iob = rpcsvc_callback_build_record (rpc, prog->prognum,
prog->progver, procnum,
- proglen, callid,
+ proglen,
+ GF_UNIVERSAL_ANSWER,
&rpchdr);
if (!request_iob) {
gf_log ("rpcsvc", GF_LOG_WARNING,
@@ -1253,7 +1289,7 @@ rpcsvc_program_register_portmap (rpcsvc_program_t *newprog, uint32_t port)
if (!(pmap_set (newprog->prognum, newprog->progver, IPPROTO_TCP,
port))) {
gf_log (GF_RPCSVC, GF_LOG_ERROR, "Could not register with"
- " portmap");
+ " portmap %d %d %u", newprog->prognum, newprog->progver, port);
goto out;
}
@@ -2181,6 +2217,13 @@ rpcsvc_transport_peer_check_search (dict_t *options, char *pattern,
goto err;
}
+ /* Compare IPv4 subnetwork */
+ if (strchr (addrtok, '/')) {
+ ret = match_subnet_v4 (addrtok, ip);
+ if (ret == 0)
+ goto err;
+ }
+
addrtok = strtok_r (NULL, ",", &svptr);
}
@@ -2327,8 +2370,20 @@ rpcsvc_auth_check (rpcsvc_t *svc, char *volname,
ret = dict_get_str (options, srchstr, &reject_str);
GF_FREE (srchstr);
- if (reject_str == NULL && !strcmp ("*", allow_str))
- return RPCSVC_AUTH_ACCEPT;
+
+ /*
+ * If "reject_str" is being set as '*' (anonymous), then NFS-server
+ * would reject everything. If the "reject_str" is not set and
+ * "allow_str" is set as '*' (anonymous), then NFS-server would
+ * accept mount requests from all clients.
+ */
+ if (reject_str != NULL) {
+ if (!strcmp ("*", reject_str))
+ return RPCSVC_AUTH_REJECT;
+ } else {
+ if (!strcmp ("*", allow_str))
+ return RPCSVC_AUTH_ACCEPT;
+ }
/* Non-default rule, authenticate */
if (!get_host_name (client_ip, &ip))
@@ -2461,6 +2516,71 @@ out:
return addrstr;
}
+/*
+ * match_subnet_v4() takes subnetwork address pattern and checks
+ * if the target IPv4 address has the same network address with
+ * the help of network mask.
+ *
+ * Returns 0 for SUCCESS and -1 otherwise.
+ *
+ * NB: Validation of subnetwork address pattern is not required
+ * as it's already being done at the time of CLI SET.
+ */
+static int
+match_subnet_v4 (const char *addrtok, const char *ipaddr)
+{
+ char *slash = NULL;
+ char *netaddr = NULL;
+ long prefixlen = -1;
+ int ret = -1;
+ uint32_t shift = 0;
+ struct sockaddr_in sin1 = {0, };
+ struct sockaddr_in sin2 = {0, };
+ struct sockaddr_in mask = {0, };
+
+ /* Copy the input */
+ netaddr = gf_strdup (addrtok);
+ if (netaddr == NULL) /* ENOMEM */
+ goto out;
+
+ /* Find the network socket addr of target */
+ if (inet_pton (AF_INET, ipaddr, &sin1.sin_addr) == 0)
+ goto out;
+
+ /* Find the network socket addr of subnet pattern */
+ slash = strchr (netaddr, '/');
+ *slash = '\0';
+ if (inet_pton (AF_INET, netaddr, &sin2.sin_addr) == 0)
+ goto out;
+
+ /*
+ * Find the network mask in network byte order.
+ * NB: 32 : Max len of IPv4 address.
+ */
+ prefixlen = atoi (slash + 1);
+ shift = 32 - (uint32_t)prefixlen;
+ mask.sin_addr.s_addr = htonl ((uint32_t)~0 << shift);
+
+ /*
+ * Check if both have same network address.
+ * Extract the network address from the IP addr by applying the
+ * network mask. If they match, return SUCCESS. i.e.
+ *
+ * (x == y) <=> (x ^ y == 0)
+ * (x & y) ^ (x & z) <=> x & (y ^ z)
+ *
+ * ((ip1 & mask) == (ip2 & mask)) <=> ((mask & (ip1 ^ ip2)) == 0)
+ */
+ if (((mask.sin_addr.s_addr) &
+ (sin1.sin_addr.s_addr ^ sin2.sin_addr.s_addr)) != 0)
+ goto out;
+
+ ret = 0; /* SUCCESS */
+out:
+ GF_FREE (netaddr);
+ return ret;
+}
+
rpcsvc_actor_t gluster_dump_actors[] = {
[GF_DUMP_NULL] = {"NULL", GF_DUMP_NULL, NULL, NULL, 0, DRC_NA},
diff --git a/rpc/rpc-lib/src/xdr-common.h b/rpc/rpc-lib/src/xdr-common.h
index f221192..631f4b2 100644
--- a/rpc/rpc-lib/src/xdr-common.h
+++ b/rpc/rpc-lib/src/xdr-common.h
@@ -18,8 +18,8 @@
#include <rpc/types.h>
#include <sys/types.h>
-#include <rpc/auth.h>
#include <rpc/xdr.h>
+#include <rpc/auth.h>
#include <sys/uio.h>
#ifdef __NetBSD__
@@ -64,11 +64,18 @@ enum gf_dump_procnum {
#define GF_AUTH_GLUSTERFS_MAX_LKOWNER(groups_len) \
(95 - groups_len)
-#if GF_DARWIN_HOST_OS
+#ifdef GF_LINUX_HOST_OS
+#define xdr_u_int32_t xdr_uint32_t
+#define xdr_u_int64_t xdr_uint64_t
+#endif
+
+#ifdef GF_DARWIN_HOST_OS
#define xdr_u_quad_t xdr_u_int64_t
#define xdr_quad_t xdr_int64_t
#define xdr_uint32_t xdr_u_int32_t
+#define xdr_uint64_t xdr_u_int64_t
#define uint64_t u_int64_t
+unsigned long xdr_sizeof (xdrproc_t func, void *data);
#endif
#if defined(__NetBSD__)
@@ -78,13 +85,11 @@ enum gf_dump_procnum {
#define xdr_uint64_t xdr_u_int64_t
#endif
-
-#if GF_SOLARIS_HOST_OS
+#ifdef GF_SOLARIS_HOST_OS
#define u_quad_t uint64_t
#define quad_t int64_t
#define xdr_u_quad_t xdr_uint64_t
#define xdr_quad_t xdr_int64_t
-#define xdr_uint32_t xdr_uint32_t
#endif
/* Returns the address of the byte that follows the
diff --git a/rpc/rpc-lib/src/xdr-rpc.h b/rpc/rpc-lib/src/xdr-rpc.h
index f5f4a94..4663ef7 100644
--- a/rpc/rpc-lib/src/xdr-rpc.h
+++ b/rpc/rpc-lib/src/xdr-rpc.h
@@ -78,4 +78,21 @@ xdr_to_auth_unix_cred (char *msgbuf, int msglen, struct authunix_parms *au,
#define rpc_call_verf_flavour(call) (rpc_opaque_auth_flavour ((&(call)->ru.RM_cmb.cb_verf)))
#define rpc_call_verf_len(call) (rpc_opaque_auth_len ((&(call)->ru.RM_cmb.cb_verf)))
+
+#ifdef GF_DARWIN_HOST_OS
+#define GF_PRI_RPC_XID PRIu32
+#define GF_PRI_RPC_VERSION PRIu32
+#define GF_PRI_RPC_PROG_ID PRIu32
+#define GF_PRI_RPC_PROG_VERS PRIu32
+#define GF_PRI_RPC_PROC PRIu32
+#define GF_PRI_RPC_PROC_VERSION PRIu32
+#else
+#define GF_PRI_RPC_XID PRIu64
+#define GF_PRI_RPC_VERSION PRIu64
+#define GF_PRI_RPC_PROG_ID PRIu64
+#define GF_PRI_RPC_PROG_VERS PRIu64
+#define GF_PRI_RPC_PROC PRIu64
+#define GF_PRI_RPC_PROC_VERSION PRIu64
+#endif
+
#endif
diff --git a/rpc/rpc-transport/rdma/src/Makefile.am b/rpc/rpc-transport/rdma/src/Makefile.am
index 2bf7cf2..e66006e 100644
--- a/rpc/rpc-transport/rdma/src/Makefile.am
+++ b/rpc/rpc-transport/rdma/src/Makefile.am
@@ -3,7 +3,7 @@
transport_LTLIBRARIES = rdma.la
transportdir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport
-rdma_la_LDFLAGS = -module -avoid-version
+rdma_la_LDFLAGS = -module -avoid-version -nostartfiles
rdma_la_SOURCES = rdma.c name.c
rdma_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
@@ -11,7 +11,7 @@ rdma_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
noinst_HEADERS = rdma.h name.h
-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src/ \
- -I$(top_srcdir)/xlators/protocol/lib/src/ -shared -nostartfiles $(GF_CFLAGS)
+ -I$(top_srcdir)/xlators/protocol/lib/src/ -shared $(GF_CFLAGS)
AM_CPPFLAGS = $(GF_CPPFLAGS) \
-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src/ \
diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c
index 701abdb..c7510f6 100644
--- a/rpc/rpc-transport/rdma/src/rdma.c
+++ b/rpc/rpc-transport/rdma/src/rdma.c
@@ -2027,7 +2027,7 @@ out:
}
-inline int32_t
+static inline int32_t
__gf_rdma_register_local_mr_for_rdma (gf_rdma_peer_t *peer,
struct iovec *vector, int count,
gf_rdma_post_context_t *ctx)
@@ -3074,7 +3074,7 @@ out:
}
-inline int32_t
+static inline int32_t
gf_rdma_decode_error_msg (gf_rdma_peer_t *peer, gf_rdma_post_t *post,
size_t bytes_in_post)
{
@@ -3616,7 +3616,7 @@ out:
}
-inline int32_t
+static inline int32_t
gf_rdma_recv_request (gf_rdma_peer_t *peer, gf_rdma_post_t *post,
gf_rdma_read_chunk_t *readch)
{
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index c5e8b88..6f566e4 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -3346,7 +3346,7 @@ reconfigure (rpc_transport_t *this, dict_t *options)
optstr = NULL;
if (dict_get_str (this->options, "tcp-window-size",
&optstr) == 0) {
- if (gf_string2bytesize (optstr, &windowsize) != 0) {
+ if (gf_string2uint64 (optstr, &windowsize) != 0) {
gf_log (this->name, GF_LOG_ERROR,
"invalid number format: %s", optstr);
goto out;
@@ -3467,7 +3467,7 @@ socket_init (rpc_transport_t *this)
optstr = NULL;
if (dict_get_str (this->options, "tcp-window-size",
&optstr) == 0) {
- if (gf_string2bytesize (optstr, &windowsize) != 0) {
+ if (gf_string2uint64 (optstr, &windowsize) != 0) {
gf_log (this->name, GF_LOG_ERROR,
"invalid number format: %s", optstr);
return -1;
diff --git a/rpc/xdr/src/.gitignore b/rpc/xdr/src/.gitignore
new file mode 100644
index 0000000..f9eab16
--- /dev/null
+++ b/rpc/xdr/src/.gitignore
@@ -0,0 +1,21 @@
+acl3-xdr.c
+acl3-xdr.h
+nlmcbk-xdr.c
+nlmcbk-xdr.h
+nsm-xdr.c
+nsm-xdr.h
+cli1-xdr.c
+cli1-xdr.h
+glusterd1-xdr.c
+glusterd1-xdr.h
+glusterfs3-xdr.c
+glusterfs3-xdr.h
+nlm4-xdr.c
+nlm4-xdr.h
+portmap-xdr.c
+portmap-xdr.h
+rpc-common-xdr.c
+rpc-common-xdr.h
+mount3udp.c
+mount3udp.h
+*-e
diff --git a/rpc/xdr/src/Makefile.am b/rpc/xdr/src/Makefile.am
index 0ec96e4..1c70dc9 100644
--- a/rpc/xdr/src/Makefile.am
+++ b/rpc/xdr/src/Makefile.am
@@ -1,3 +1,8 @@
+XDRSOURCES = glusterfs3-xdr.c cli1-xdr.c nlm4-xdr.c nsm-xdr.c \
+ rpc-common-xdr.c glusterd1-xdr.c acl3-xdr.c portmap-xdr.c mount3udp.c
+XDRHEADERS = $(XDRSOURCES:.c=.h)
+XDRGENFILES = $(XDRSOURCES:.c=.x)
+
lib_LTLIBRARIES = libgfxdr.la
libgfxdr_la_CFLAGS = -Wall $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS)
@@ -5,23 +10,104 @@ libgfxdr_la_CFLAGS = -Wall $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS)
libgfxdr_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 \
-I$(top_srcdir)/libglusterfs/src -I$(top_srcdir)/rpc/rpc-lib/src
-libgfxdr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
- $(top_builddir)/rpc/rpc-lib/src/libgfrpc.la
+libgfxdr_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
libgfxdr_la_LDFLAGS = -version-info $(LIBGFXDR_LT_VERSION)
-libgfxdr_la_SOURCES = xdr-generic.c rpc-common-xdr.c \
- glusterfs3-xdr.c \
- cli1-xdr.c \
- glusterd1-xdr.c \
- portmap-xdr.c \
- nlm4-xdr.c xdr-nfs3.c msg-nfs3.c nsm-xdr.c \
- nlmcbk-xdr.c acl3-xdr.c
-
-noinst_HEADERS = xdr-generic.h rpc-common-xdr.h \
- glusterfs3-xdr.h glusterfs3.h \
- cli1-xdr.h \
- glusterd1-xdr.h \
- portmap-xdr.h \
- nlm4-xdr.h xdr-nfs3.h msg-nfs3.h nsm-xdr.h \
- nlmcbk-xdr.h acl3-xdr.h
+libgfxdr_la_SOURCES = $(XDRSOURCES) xdr-generic.c xdr-nfs3.c msg-nfs3.c
+
+noinst_HEADERS = $(XDRHEADERS) xdr-generic.h xdr-nfs3.h msg-nfs3.h glusterfs3.h
+
+CLEANFILES = $(XDRSOURCES) $(XDRHEADERS)
+
+EXTRA_DIST = $(XDRGENFILES)
+
+glusterfs3-xdr.c: glusterfs3-xdr.x glusterfs3-xdr.h
+ @if test -f $<; then \
+ $(top_srcdir)/build-aux/xdrgen source $< ; \
+ fi
+
+glusterfs3-xdr.h: glusterfs3-xdr.x
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen header $< ; \
+ fi
+
+cli1-xdr.c: cli1-xdr.x cli1-xdr.h
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen source $< ; \
+ fi
+
+cli1-xdr.h: cli1-xdr.x
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen header $< ; \
+ fi
+
+nlm4-xdr.c: nlm4-xdr.x nlm4-xdr.h
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen source $< ; \
+ fi
+
+nlm4-xdr.h: nlm4-xdr.x
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen header $< ; \
+ fi
+
+nsm-xdr.c: nsm-xdr.x nsm-xdr.h
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen source $< ; \
+ fi
+
+nsm-xdr.h: nsm-xdr.x
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen header $< ; \
+ fi
+
+rpc-common-xdr.c: rpc-common-xdr.x rpc-common-xdr.h
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen source $< ; \
+ fi
+
+rpc-common-xdr.h: rpc-common-xdr.x
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen header $< ; \
+ fi
+
+glusterd1-xdr.c: glusterd1-xdr.x glusterd1-xdr.h
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen source $< ; \
+ fi
+
+glusterd1-xdr.h: glusterd1-xdr.x
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen header $< ; \
+ fi
+
+acl3-xdr.c: acl3-xdr.x acl3-xdr.h
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen source $< ; \
+ fi
+
+acl3-xdr.h: acl3-xdr.x
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen header $< ; \
+ fi
+
+portmap-xdr.c: portmap-xdr.x portmap-xdr.h
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen source $< ; \
+ fi
+
+portmap-xdr.h: portmap-xdr.x
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen header $< ; \
+ fi
+
+mount3udp.c: mount3udp.x mount3udp.h
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen source $< ; \
+ fi
+
+mount3udp.h: mount3udp.x
+ @if test -f $< ; then \
+ $(top_srcdir)/build-aux/xdrgen header $< ; \
+ fi
diff --git a/rpc/xdr/src/acl3-xdr.c b/rpc/xdr/src/acl3-xdr.c
deleted file mode 100644
index 8fbaeff..0000000
--- a/rpc/xdr/src/acl3-xdr.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
- * This file is part of GlusterFS.
- *
- * This file is licensed to you under your choice of the GNU Lesser
- * General Public License, version 3 or any later version (LGPLv3 or
- * later), or the GNU General Public License, version 2 (GPLv2), in all
- * cases as published by the Free Software Foundation.
- */
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include "acl3-xdr.h"
-
-bool_t
-xdr_aclentry (XDR *xdrs, aclentry *objp)
-{
- if (!xdr_int (xdrs, &objp->type))
- return FALSE;
- if (!xdr_int (xdrs, &objp->uid))
- return FALSE;
- if (!xdr_int (xdrs, &objp->perm))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_getaclargs (XDR *xdrs, getaclargs *objp)
-{
- if (!xdr_netobj (xdrs, &objp->fh))
- return FALSE;
- if (!xdr_int (xdrs, &objp->mask))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_getaclreply (XDR *xdrs, getaclreply *objp)
-{
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
- if (!xdr_int (xdrs, &objp->attr_follows))
- return FALSE;
- if (!xdr_fattr3 (xdrs, &objp->attr))
- return FALSE;
- if (!xdr_int (xdrs, &objp->mask))
- return FALSE;
- if (!xdr_int (xdrs, &objp->aclcount))
- return FALSE;
- if (!xdr_array (xdrs, (char **)&objp->aclentry.aclentry_val, (u_int *) &objp->aclentry.aclentry_len, ~0,
- sizeof (aclentry), (xdrproc_t) xdr_aclentry))
- return FALSE;
- if (!xdr_int (xdrs, &objp->daclcount))
- return FALSE;
- if (!xdr_array (xdrs, (char **)&objp->daclentry.daclentry_val, (u_int *) &objp->daclentry.daclentry_len, ~0,
- sizeof (aclentry), (xdrproc_t) xdr_aclentry))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_setaclargs (XDR *xdrs, setaclargs *objp)
-{
- if (!xdr_netobj (xdrs, &objp->fh))
- return FALSE;
- if (!xdr_int (xdrs, &objp->mask))
- return FALSE;
- if (!xdr_int (xdrs, &objp->aclcount))
- return FALSE;
- if (!xdr_array (xdrs, (char **)&objp->aclentry.aclentry_val, (u_int *) &objp->aclentry.aclentry_len, ~0,
- sizeof (aclentry), (xdrproc_t) xdr_aclentry))
- return FALSE;
- if (!xdr_int (xdrs, &objp->daclcount))
- return FALSE;
- if (!xdr_array (xdrs, (char **)&objp->daclentry.daclentry_val, (u_int *) &objp->daclentry.daclentry_len, ~0,
- sizeof (aclentry), (xdrproc_t) xdr_aclentry))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_setaclreply (XDR *xdrs, setaclreply *objp)
-{
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
- if (!xdr_int (xdrs, &objp->attr_follows))
- return FALSE;
- if (!xdr_fattr3 (xdrs, &objp->attr))
- return FALSE;
- return TRUE;
-}
diff --git a/rpc/xdr/src/acl3-xdr.h b/rpc/xdr/src/acl3-xdr.h
deleted file mode 100644
index 7cebaed..0000000
--- a/rpc/xdr/src/acl3-xdr.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 2012 Red Hat, Inc. <http://www.redhat.com>
- * This file is part of GlusterFS.
- *
- * This file is licensed to you under your choice of the GNU Lesser
- * General Public License, version 3 or any later version (LGPLv3 or
- * later), or the GNU General Public License, version 2 (GPLv2), in all
- * cases as published by the Free Software Foundation.
- */
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _ACL_H_RPCGEN
-#define _ACL_H_RPCGEN
-
-#include <rpc/rpc.h>
-#include "xdr-nfs3.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-struct aclentry {
- int type;
- int uid;
- int perm;
-};
-typedef struct aclentry aclentry;
-
-struct getaclargs {
- netobj fh;
- int mask;
-};
-typedef struct getaclargs getaclargs;
-
-struct getaclreply {
- int status;
- int attr_follows;
- struct fattr3 attr;
- int mask;
- int aclcount;
- struct {
- u_int aclentry_len;
- struct aclentry *aclentry_val;
- } aclentry;
- int daclcount;
- struct {
- u_int daclentry_len;
- struct aclentry *daclentry_val;
- } daclentry;
-};
-typedef struct getaclreply getaclreply;
-
-struct setaclargs {
- netobj fh;
- int mask;
- int aclcount;
- struct {
- u_int aclentry_len;
- struct aclentry *aclentry_val;
- } aclentry;
- int daclcount;
- struct {
- u_int daclentry_len;
- struct aclentry *daclentry_val;
- } daclentry;
-};
-typedef struct setaclargs setaclargs;
-
-struct setaclreply {
- int status;
- int attr_follows;
- struct fattr3 attr;
-};
-typedef struct setaclreply setaclreply;
-
-#define ACL3_NULL 0
-#define ACL3_GETACL 1
-#define ACL3_SETACL 2
-#define ACL3_PROC_COUNT 3
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern bool_t xdr_aclentry (XDR *, aclentry*);
-extern bool_t xdr_getaclargs (XDR *, getaclargs*);
-extern bool_t xdr_getaclreply (XDR *, getaclreply*);
-extern bool_t xdr_setaclargs (XDR *, setaclargs*);
-extern bool_t xdr_setaclreply (XDR *, setaclreply*);
-
-#else /* K&R C */
-extern bool_t xdr_aclentry ();
-extern bool_t xdr_getaclargs ();
-extern bool_t xdr_getaclreply ();
-extern bool_t xdr_setaclargs ();
-extern bool_t xdr_setaclreply ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_ACL_H_RPCGEN */
diff --git a/rpc/xdr/src/acl.x b/rpc/xdr/src/acl3-xdr.x
index 6cf4f1d..8ca6e84 100644
--- a/rpc/xdr/src/acl.x
+++ b/rpc/xdr/src/acl3-xdr.x
@@ -16,8 +16,8 @@ struct aclentry {
};
struct getaclargs {
- netobj fh;
- int mask;
+ netobj fh;
+ int mask;
};
struct getaclreply {
@@ -45,4 +45,3 @@ struct setaclreply {
int attr_follows;
struct fattr3 attr;
};
-
diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c
deleted file mode 100644
index cbb2485..0000000
--- a/rpc/xdr/src/cli1-xdr.c
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-#include "xdr-common.h"
-#include "compat.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ >= 4
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
-#endif
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include "cli1-xdr.h"
-
-bool_t
-xdr_gf_cli_defrag_type (XDR *xdrs, gf_cli_defrag_type *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf_defrag_status_t (XDR *xdrs, gf_defrag_status_t *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cluster_type (XDR *xdrs, gf1_cluster_type *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_replace_op (XDR *xdrs, gf1_cli_replace_op *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_op_commands (XDR *xdrs, gf1_op_commands *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf_quota_type (XDR *xdrs, gf_quota_type *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- 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)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_get_volume (XDR *xdrs, gf1_cli_get_volume *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_sync_volume (XDR *xdrs, gf1_cli_sync_volume *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_op_flags (XDR *xdrs, gf1_cli_op_flags *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_gsync_set (XDR *xdrs, gf1_cli_gsync_set *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_stats_op (XDR *xdrs, gf1_cli_stats_op *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_info_op (XDR *xdrs, gf1_cli_info_op *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_top_op (XDR *xdrs, gf1_cli_top_op *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf_cli_status_type (XDR *xdrs, gf_cli_status_type *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_snapshot (XDR *xdrs, gf1_cli_snapshot *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_snapshot_config (XDR *xdrs, gf1_cli_snapshot_config *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf_cli_req (XDR *xdrs, gf_cli_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf_cli_rsp (XDR *xdrs, gf_cli_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~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_peer_list_req (XDR *xdrs, gf1_cli_peer_list_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_int (xdrs, &objp->flags))
- 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_peer_list_rsp (XDR *xdrs, gf1_cli_peer_list_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->friends.friends_val, (u_int *) &objp->friends.friends_len, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_fsm_log_req (XDR *xdrs, gf1_cli_fsm_log_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_string (xdrs, &objp->name, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_fsm_log_rsp (XDR *xdrs, gf1_cli_fsm_log_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->fsm_log.fsm_log_val, (u_int *) &objp->fsm_log.fsm_log_len, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_getwd_req (XDR *xdrs, gf1_cli_getwd_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_int (xdrs, &objp->unused))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_getwd_rsp (XDR *xdrs, gf1_cli_getwd_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_string (xdrs, &objp->wd, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf1_cli_mount_req (XDR *xdrs, gf1_cli_mount_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- 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)
-{
- register int32_t *buf;
- buf = NULL;
-
- 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)
-{
- register int32_t *buf;
- buf = NULL;
-
- 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)
-{
- register int32_t *buf;
- buf = NULL;
-
- 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
deleted file mode 100644
index f4251e6..0000000
--- a/rpc/xdr/src/cli1-xdr.h
+++ /dev/null
@@ -1,386 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-#include "xdr-common.h"
-#include "compat.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ >= 4
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
-#endif
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _CLI1_XDR_H_RPCGEN
-#define _CLI1_XDR_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-enum gf_cli_defrag_type {
- GF_DEFRAG_CMD_START = 1,
- GF_DEFRAG_CMD_STOP = 1 + 1,
- GF_DEFRAG_CMD_STATUS = 1 + 2,
- GF_DEFRAG_CMD_START_LAYOUT_FIX = 1 + 3,
- GF_DEFRAG_CMD_START_FORCE = 1 + 4,
-};
-typedef enum gf_cli_defrag_type gf_cli_defrag_type;
-
-enum gf_defrag_status_t {
- GF_DEFRAG_STATUS_NOT_STARTED = 0,
- GF_DEFRAG_STATUS_STARTED = 1,
- GF_DEFRAG_STATUS_STOPPED = 2,
- GF_DEFRAG_STATUS_COMPLETE = 3,
- GF_DEFRAG_STATUS_FAILED = 4,
- GF_DEFRAG_STATUS_LAYOUT_FIX_STARTED = 5,
- GF_DEFRAG_STATUS_LAYOUT_FIX_STOPPED = 6,
- GF_DEFRAG_STATUS_LAYOUT_FIX_COMPLETE = 7,
- GF_DEFRAG_STATUS_LAYOUT_FIX_FAILED = 8,
- GF_DEFRAG_STATUS_MAX = 9,
-};
-typedef enum gf_defrag_status_t gf_defrag_status_t;
-
-enum gf1_cluster_type {
- GF_CLUSTER_TYPE_NONE = 0,
- GF_CLUSTER_TYPE_STRIPE = 0 + 1,
- GF_CLUSTER_TYPE_REPLICATE = 0 + 2,
- GF_CLUSTER_TYPE_STRIPE_REPLICATE = 0 + 3,
-};
-typedef enum gf1_cluster_type gf1_cluster_type;
-
-enum gf1_cli_replace_op {
- GF_REPLACE_OP_NONE = 0,
- GF_REPLACE_OP_START = 0 + 1,
- GF_REPLACE_OP_COMMIT = 0 + 2,
- GF_REPLACE_OP_PAUSE = 0 + 3,
- GF_REPLACE_OP_ABORT = 0 + 4,
- GF_REPLACE_OP_STATUS = 0 + 5,
- GF_REPLACE_OP_COMMIT_FORCE = 0 + 6,
-};
-typedef enum gf1_cli_replace_op gf1_cli_replace_op;
-
-enum gf1_op_commands {
- GF_OP_CMD_NONE = 0,
- GF_OP_CMD_START = 0 + 1,
- GF_OP_CMD_COMMIT = 0 + 2,
- GF_OP_CMD_STOP = 0 + 3,
- GF_OP_CMD_STATUS = 0 + 4,
- GF_OP_CMD_COMMIT_FORCE = 0 + 5,
-};
-typedef enum gf1_op_commands gf1_op_commands;
-
-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,
- GF_QUOTA_OPTION_TYPE_ALERT_TIME = 0 + 7,
- GF_QUOTA_OPTION_TYPE_SOFT_TIMEOUT = 0 + 8,
- GF_QUOTA_OPTION_TYPE_HARD_TIMEOUT = 0 + 9,
- GF_QUOTA_OPTION_TYPE_DEFAULT_SOFT_LIMIT = 0 + 10,
-};
-typedef enum gf_quota_type gf_quota_type;
-
-enum gf1_cli_friends_list {
- GF_CLI_LIST_PEERS = 1,
- GF_CLI_LIST_POOL_NODES = 2,
-};
-typedef enum gf1_cli_friends_list gf1_cli_friends_list;
-
-enum gf1_cli_get_volume {
- GF_CLI_GET_VOLUME_ALL = 1,
- GF_CLI_GET_VOLUME = 1 + 1,
- GF_CLI_GET_NEXT_VOLUME = 1 + 2,
-};
-typedef enum gf1_cli_get_volume gf1_cli_get_volume;
-
-enum gf1_cli_sync_volume {
- GF_CLI_SYNC_ALL = 1,
-};
-typedef enum gf1_cli_sync_volume gf1_cli_sync_volume;
-
-enum gf1_cli_op_flags {
- GF_CLI_FLAG_OP_FORCE = 1,
-};
-typedef enum gf1_cli_op_flags gf1_cli_op_flags;
-
-enum gf1_cli_gsync_set {
- GF_GSYNC_OPTION_TYPE_NONE = 0,
- GF_GSYNC_OPTION_TYPE_START = 1,
- GF_GSYNC_OPTION_TYPE_STOP = 2,
- GF_GSYNC_OPTION_TYPE_CONFIG = 3,
- GF_GSYNC_OPTION_TYPE_STATUS = 4,
- GF_GSYNC_OPTION_TYPE_ROTATE = 5,
- GF_GSYNC_OPTION_TYPE_CREATE = 6,
- GF_GSYNC_OPTION_TYPE_DELETE = 7,
-};
-typedef enum gf1_cli_gsync_set gf1_cli_gsync_set;
-
-enum gf1_cli_stats_op {
- GF_CLI_STATS_NONE = 0,
- GF_CLI_STATS_START = 1,
- GF_CLI_STATS_STOP = 2,
- GF_CLI_STATS_INFO = 3,
- GF_CLI_STATS_TOP = 4,
-};
-typedef enum gf1_cli_stats_op gf1_cli_stats_op;
-
-enum gf1_cli_info_op {
- GF_CLI_INFO_NONE = 0,
- GF_CLI_INFO_ALL = 1,
- GF_CLI_INFO_INCREMENTAL = 2,
- GF_CLI_INFO_CUMULATIVE = 3,
- GF_CLI_INFO_CLEAR = 4,
-};
-typedef enum gf1_cli_info_op gf1_cli_info_op;
-
-enum gf1_cli_top_op {
- GF_CLI_TOP_NONE = 0,
- GF_CLI_TOP_OPEN = 0 + 1,
- GF_CLI_TOP_READ = 0 + 2,
- GF_CLI_TOP_WRITE = 0 + 3,
- GF_CLI_TOP_OPENDIR = 0 + 4,
- GF_CLI_TOP_READDIR = 0 + 5,
- GF_CLI_TOP_READ_PERF = 0 + 6,
- GF_CLI_TOP_WRITE_PERF = 0 + 7,
-};
-typedef enum gf1_cli_top_op gf1_cli_top_op;
-
-enum gf_cli_status_type {
- GF_CLI_STATUS_NONE = 0x0000,
- GF_CLI_STATUS_MEM = 0x0001,
- GF_CLI_STATUS_CLIENTS = 0x0002,
- GF_CLI_STATUS_INODE = 0x0004,
- GF_CLI_STATUS_FD = 0x0008,
- GF_CLI_STATUS_CALLPOOL = 0x0010,
- GF_CLI_STATUS_DETAIL = 0x0020,
- GF_CLI_STATUS_TASKS = 0x0040,
- GF_CLI_STATUS_MASK = 0x00FF,
- GF_CLI_STATUS_VOL = 0x0100,
- GF_CLI_STATUS_ALL = 0x0200,
- GF_CLI_STATUS_BRICK = 0x0400,
- GF_CLI_STATUS_NFS = 0x0800,
- GF_CLI_STATUS_SHD = 0x1000,
- GF_CLI_STATUS_QUOTAD = 0x2000,
-};
-typedef enum gf_cli_status_type gf_cli_status_type;
-
-enum gf1_cli_snapshot {
- GF_SNAP_OPTION_TYPE_NONE = 0,
- GF_SNAP_OPTION_TYPE_CREATE = 1,
- GF_SNAP_OPTION_TYPE_DELETE = 2,
- GF_SNAP_OPTION_TYPE_RESTORE = 3,
- GF_SNAP_OPTION_TYPE_START = 4,
- GF_SNAP_OPTION_TYPE_STOP = 5,
- GF_SNAP_OPTION_TYPE_LIST = 6,
- GF_SNAP_OPTION_TYPE_STATUS = 7,
- GF_SNAP_OPTION_TYPE_CONFIG = 8,
- GF_SNAP_OPTION_TYPE_INFO = 9,
-};
-typedef enum gf1_cli_snapshot gf1_cli_snapshot;
-
-enum gf1_cli_snapshot_info {
- GF_SNAP_INFO_TYPE_ALL = 0,
- GF_SNAP_INFO_TYPE_SNAP = 1,
- GF_SNAP_INFO_TYPE_VOL = 2,
-};
-typedef enum gf1_cli_snapshot_info gf1_cli_snapshot_info;
-
-enum gf1_cli_snapshot_config {
- GF_SNAP_CONFIG_TYPE_NONE = 0,
- GF_SNAP_CONFIG_TYPE_SET = 1,
- GF_SNAP_CONFIG_DISPLAY = 2,
-};
-typedef enum gf1_cli_snapshot_config gf1_cli_snapshot_config;
-
-enum gf1_cli_snapshot_status {
- GF_SNAP_STATUS_TYPE_ALL = 0,
- GF_SNAP_STATUS_TYPE_SNAP = 1,
- GF_SNAP_STATUS_TYPE_VOL = 2,
-};
-typedef enum gf1_cli_snapshot_status gf1_cli_snapshot_status;
-
-struct gf_cli_req {
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gf_cli_req gf_cli_req;
-
-struct gf_cli_rsp {
- int op_ret;
- int op_errno;
- char *op_errstr;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gf_cli_rsp gf_cli_rsp;
-
-struct gf1_cli_peer_list_req {
- int flags;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gf1_cli_peer_list_req gf1_cli_peer_list_req;
-
-struct gf1_cli_peer_list_rsp {
- int op_ret;
- int op_errno;
- struct {
- u_int friends_len;
- char *friends_val;
- } friends;
-};
-typedef struct gf1_cli_peer_list_rsp gf1_cli_peer_list_rsp;
-
-struct gf1_cli_fsm_log_req {
- char *name;
-};
-typedef struct gf1_cli_fsm_log_req gf1_cli_fsm_log_req;
-
-struct gf1_cli_fsm_log_rsp {
- int op_ret;
- int op_errno;
- char *op_errstr;
- struct {
- u_int fsm_log_len;
- char *fsm_log_val;
- } fsm_log;
-};
-typedef struct gf1_cli_fsm_log_rsp gf1_cli_fsm_log_rsp;
-
-struct gf1_cli_getwd_req {
- int unused;
-};
-typedef struct gf1_cli_getwd_req gf1_cli_getwd_req;
-
-struct gf1_cli_getwd_rsp {
- int op_ret;
- int op_errno;
- char *wd;
-};
-typedef struct gf1_cli_getwd_rsp gf1_cli_getwd_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)
-extern bool_t xdr_gf_cli_defrag_type (XDR *, gf_cli_defrag_type*);
-extern bool_t xdr_gf_defrag_status_t (XDR *, gf_defrag_status_t*);
-extern bool_t xdr_gf1_cluster_type (XDR *, gf1_cluster_type*);
-extern bool_t xdr_gf1_cli_replace_op (XDR *, gf1_cli_replace_op*);
-extern bool_t xdr_gf1_op_commands (XDR *, gf1_op_commands*);
-extern bool_t xdr_gf_quota_type (XDR *, gf_quota_type*);
-extern bool_t xdr_gf1_cli_friends_list (XDR *, gf1_cli_friends_list*);
-extern bool_t xdr_gf1_cli_get_volume (XDR *, gf1_cli_get_volume*);
-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_gf1_cli_info_op (XDR *, gf1_cli_info_op*);
-extern bool_t xdr_gf1_cli_top_op (XDR *, gf1_cli_top_op*);
-extern bool_t xdr_gf_cli_status_type (XDR *, gf_cli_status_type*);
-extern bool_t xdr_gf1_cli_snapshot (XDR *, gf1_cli_snapshot*);
-extern bool_t xdr_gf1_cli_snapshot_config (XDR *, gf1_cli_snapshot_config*);
-extern bool_t xdr_gf_cli_req (XDR *, gf_cli_req*);
-extern bool_t xdr_gf_cli_rsp (XDR *, gf_cli_rsp*);
-extern bool_t xdr_gf1_cli_peer_list_req (XDR *, gf1_cli_peer_list_req*);
-extern bool_t xdr_gf1_cli_peer_list_rsp (XDR *, gf1_cli_peer_list_rsp*);
-extern bool_t xdr_gf1_cli_fsm_log_req (XDR *, gf1_cli_fsm_log_req*);
-extern bool_t xdr_gf1_cli_fsm_log_rsp (XDR *, gf1_cli_fsm_log_rsp*);
-extern bool_t xdr_gf1_cli_getwd_req (XDR *, gf1_cli_getwd_req*);
-extern bool_t xdr_gf1_cli_getwd_rsp (XDR *, gf1_cli_getwd_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 ();
-extern bool_t xdr_gf_defrag_status_t ();
-extern bool_t xdr_gf1_cluster_type ();
-extern bool_t xdr_gf1_cli_replace_op ();
-extern bool_t xdr_gf1_op_commands ();
-extern bool_t xdr_gf_quota_type ();
-extern bool_t xdr_gf1_cli_friends_list ();
-extern bool_t xdr_gf1_cli_get_volume ();
-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_gf1_cli_info_op ();
-extern bool_t xdr_gf1_cli_top_op ();
-extern bool_t xdr_gf_cli_status_type ();
-extern bool_t xdr_gf1_cli_snapshot ();
-extern bool_t xdr_gf1_cli_snapshot_config ();
-extern bool_t xdr_gf_cli_req ();
-extern bool_t xdr_gf_cli_rsp ();
-extern bool_t xdr_gf1_cli_peer_list_req ();
-extern bool_t xdr_gf1_cli_peer_list_rsp ();
-extern bool_t xdr_gf1_cli_fsm_log_req ();
-extern bool_t xdr_gf1_cli_fsm_log_rsp ();
-extern bool_t xdr_gf1_cli_getwd_req ();
-extern bool_t xdr_gf1_cli_getwd_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 */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_CLI1_XDR_H_RPCGEN */
diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x
index 6e5e444..0e4e037 100644
--- a/rpc/xdr/src/cli1-xdr.x
+++ b/rpc/xdr/src/cli1-xdr.x
@@ -4,7 +4,7 @@
GF_DEFRAG_CMD_STATUS,
GF_DEFRAG_CMD_START_LAYOUT_FIX,
GF_DEFRAG_CMD_START_FORCE /* used by remove-brick data migration */
-} ;
+};
enum gf_defrag_status_t {
GF_DEFRAG_STATUS_NOT_STARTED,
@@ -17,14 +17,14 @@
GF_DEFRAG_STATUS_LAYOUT_FIX_COMPLETE,
GF_DEFRAG_STATUS_LAYOUT_FIX_FAILED,
GF_DEFRAG_STATUS_MAX
-} ;
+};
enum gf1_cluster_type {
GF_CLUSTER_TYPE_NONE = 0,
GF_CLUSTER_TYPE_STRIPE,
GF_CLUSTER_TYPE_REPLICATE,
GF_CLUSTER_TYPE_STRIPE_REPLICATE
-} ;
+};
enum gf1_cli_replace_op {
GF_REPLACE_OP_NONE = 0,
@@ -34,7 +34,7 @@
GF_REPLACE_OP_ABORT,
GF_REPLACE_OP_STATUS,
GF_REPLACE_OP_COMMIT_FORCE
-} ;
+};
enum gf1_op_commands {
GF_OP_CMD_NONE = 0,
@@ -43,7 +43,7 @@
GF_OP_CMD_STOP,
GF_OP_CMD_STATUS,
GF_OP_CMD_COMMIT_FORCE
-} ;
+};
enum gf_quota_type {
GF_QUOTA_OPTION_TYPE_NONE = 0,
@@ -62,17 +62,17 @@ enum gf_quota_type {
enum gf1_cli_friends_list {
GF_CLI_LIST_PEERS = 1,
GF_CLI_LIST_POOL_NODES = 2
-} ;
+};
enum gf1_cli_get_volume {
GF_CLI_GET_VOLUME_ALL = 1,
GF_CLI_GET_VOLUME,
GF_CLI_GET_NEXT_VOLUME
-} ;
+};
enum gf1_cli_sync_volume {
GF_CLI_SYNC_ALL = 1
-} ;
+};
enum gf1_cli_op_flags {
GF_CLI_FLAG_OP_FORCE = 1
@@ -98,11 +98,11 @@ enum gf1_cli_stats_op {
};
enum gf1_cli_info_op {
- GF_CLI_INFO_NONE = 0,
- GF_CLI_INFO_ALL = 1,
- GF_CLI_INFO_INCREMENTAL = 2,
- GF_CLI_INFO_CUMULATIVE = 3,
- GF_CLI_INFO_CLEAR = 4
+ GF_CLI_INFO_NONE = 0,
+ GF_CLI_INFO_ALL = 1,
+ GF_CLI_INFO_INCREMENTAL = 2,
+ GF_CLI_INFO_CUMULATIVE = 3,
+ GF_CLI_INFO_CLEAR = 4
};
enum gf1_cli_top_op {
@@ -146,37 +146,49 @@ enum gf1_cli_snapshot {
GF_SNAP_OPTION_TYPE_STOP,
GF_SNAP_OPTION_TYPE_LIST,
GF_SNAP_OPTION_TYPE_STATUS,
- GF_SNAP_OPTION_TYPE_CONFIG
+ GF_SNAP_OPTION_TYPE_CONFIG,
+ GF_SNAP_OPTION_TYPE_INFO
+};
+
+enum gf1_cli_snapshot_info {
+ GF_SNAP_INFO_TYPE_ALL = 0,
+ GF_SNAP_INFO_TYPE_SNAP = 1,
+ GF_SNAP_INFO_TYPE_VOL = 2
};
enum gf1_cli_snapshot_config {
GF_SNAP_CONFIG_TYPE_NONE = 0,
GF_SNAP_CONFIG_TYPE_SET,
- GF_SNAP_CONFIG_DISPLAY,
+ GF_SNAP_CONFIG_DISPLAY
+};
+enum gf1_cli_snapshot_status {
+ GF_SNAP_STATUS_TYPE_ALL = 0,
+ GF_SNAP_STATUS_TYPE_SNAP = 1,
+ GF_SNAP_STATUS_TYPE_VOL = 2
};
- struct gf_cli_req {
+struct gf_cli_req {
opaque dict<>;
-} ;
+};
struct gf_cli_rsp {
int op_ret;
int op_errno;
string op_errstr<>;
opaque dict<>;
-} ;
+};
struct gf1_cli_peer_list_req {
int flags;
opaque dict<>;
-} ;
+};
struct gf1_cli_peer_list_rsp {
int op_ret;
int op_errno;
opaque friends<>;
-} ;
+};
struct gf1_cli_fsm_log_req {
string name<>;
@@ -191,7 +203,7 @@ struct gf1_cli_fsm_log_rsp {
struct gf1_cli_getwd_req {
int unused;
-} ;
+};
struct gf1_cli_getwd_rsp {
int op_ret;
diff --git a/rpc/xdr/src/glusterd1-xdr.c b/rpc/xdr/src/glusterd1-xdr.c
deleted file mode 100644
index 7fa98aa..0000000
--- a/rpc/xdr/src/glusterd1-xdr.c
+++ /dev/null
@@ -1,923 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-#include "xdr-common.h"
-#include "compat.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ >= 4
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
-#endif
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include "glusterd1-xdr.h"
-
-bool_t
-xdr_glusterd_volume_status (XDR *xdrs, glusterd_volume_status *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_probe_req (XDR *xdrs, gd1_mgmt_probe_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_string (xdrs, &objp->hostname, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_probe_rsp (XDR *xdrs, gd1_mgmt_probe_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_string (xdrs, &objp->hostname, ~0))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- IXDR_PUT_LONG(buf, objp->port);
- IXDR_PUT_LONG(buf, objp->op_ret);
- IXDR_PUT_LONG(buf, objp->op_errno);
- }
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_string (xdrs, &objp->hostname, ~0))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- objp->port = IXDR_GET_LONG(buf);
- objp->op_ret = IXDR_GET_LONG(buf);
- objp->op_errno = IXDR_GET_LONG(buf);
- }
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- return TRUE;
- }
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_string (xdrs, &objp->hostname, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_friend_req (XDR *xdrs, gd1_mgmt_friend_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_string (xdrs, &objp->hostname, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->vols.vols_val, (u_int *) &objp->vols.vols_len, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_friend_rsp (XDR *xdrs, gd1_mgmt_friend_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_string (xdrs, &objp->hostname, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_unfriend_req (XDR *xdrs, gd1_mgmt_unfriend_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_string (xdrs, &objp->hostname, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_unfriend_rsp (XDR *xdrs, gd1_mgmt_unfriend_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_string (xdrs, &objp->hostname, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_cluster_lock_req (XDR *xdrs, gd1_mgmt_cluster_lock_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_cluster_lock_rsp (XDR *xdrs, gd1_mgmt_cluster_lock_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_cluster_unlock_req (XDR *xdrs, gd1_mgmt_cluster_unlock_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_cluster_unlock_rsp (XDR *xdrs, gd1_mgmt_cluster_unlock_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_stage_op_req (XDR *xdrs, gd1_mgmt_stage_op_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->buf.buf_val, (u_int *) &objp->buf.buf_len, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_stage_op_rsp (XDR *xdrs, gd1_mgmt_stage_op_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- IXDR_PUT_LONG(buf, objp->op);
- IXDR_PUT_LONG(buf, objp->op_ret);
- IXDR_PUT_LONG(buf, objp->op_errno);
- }
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- objp->op = IXDR_GET_LONG(buf);
- objp->op_ret = IXDR_GET_LONG(buf);
- objp->op_errno = IXDR_GET_LONG(buf);
- }
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- return TRUE;
- }
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~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_gd1_mgmt_commit_op_req (XDR *xdrs, gd1_mgmt_commit_op_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->buf.buf_val, (u_int *) &objp->buf.buf_len, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_commit_op_rsp (XDR *xdrs, gd1_mgmt_commit_op_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- IXDR_PUT_LONG(buf, objp->op);
- IXDR_PUT_LONG(buf, objp->op_ret);
- IXDR_PUT_LONG(buf, objp->op_errno);
- }
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- objp->op = IXDR_GET_LONG(buf);
- objp->op_ret = IXDR_GET_LONG(buf);
- objp->op_errno = IXDR_GET_LONG(buf);
- }
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- return TRUE;
- }
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_friend_update (XDR *xdrs, gd1_mgmt_friend_update *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->friends.friends_val, (u_int *) &objp->friends.friends_len, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_friend_update_rsp (XDR *xdrs, gd1_mgmt_friend_update_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_brick_op_req (XDR *xdrs, gd1_mgmt_brick_op_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_string (xdrs, &objp->name, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->input.input_val, (u_int *) &objp->input.input_len, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_brick_op_rsp (XDR *xdrs, gd1_mgmt_brick_op_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->output.output_val, (u_int *) &objp->output.output_len, ~0))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_v3_lock_req (XDR *xdrs, gd1_mgmt_v3_lock_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->txn_id, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- 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_gd1_mgmt_v3_lock_rsp (XDR *xdrs, gd1_mgmt_v3_lock_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->txn_id, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_v3_pre_val_req (XDR *xdrs, gd1_mgmt_v3_pre_val_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- 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_gd1_mgmt_v3_pre_val_rsp (XDR *xdrs, gd1_mgmt_v3_pre_val_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- IXDR_PUT_LONG(buf, objp->op);
- IXDR_PUT_LONG(buf, objp->op_ret);
- IXDR_PUT_LONG(buf, objp->op_errno);
- }
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- objp->op = IXDR_GET_LONG(buf);
- objp->op_ret = IXDR_GET_LONG(buf);
- objp->op_errno = IXDR_GET_LONG(buf);
- }
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- return TRUE;
- }
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~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_gd1_mgmt_v3_brick_op_req (XDR *xdrs, gd1_mgmt_v3_brick_op_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- 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_gd1_mgmt_v3_brick_op_rsp (XDR *xdrs, gd1_mgmt_v3_brick_op_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- IXDR_PUT_LONG(buf, objp->op);
- IXDR_PUT_LONG(buf, objp->op_ret);
- IXDR_PUT_LONG(buf, objp->op_errno);
- }
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- objp->op = IXDR_GET_LONG(buf);
- objp->op_ret = IXDR_GET_LONG(buf);
- objp->op_errno = IXDR_GET_LONG(buf);
- }
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- return TRUE;
- }
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~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_gd1_mgmt_v3_commit_req (XDR *xdrs, gd1_mgmt_v3_commit_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- 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_gd1_mgmt_v3_commit_rsp (XDR *xdrs, gd1_mgmt_v3_commit_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- IXDR_PUT_LONG(buf, objp->op);
- IXDR_PUT_LONG(buf, objp->op_ret);
- IXDR_PUT_LONG(buf, objp->op_errno);
- }
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- objp->op = IXDR_GET_LONG(buf);
- objp->op_ret = IXDR_GET_LONG(buf);
- objp->op_errno = IXDR_GET_LONG(buf);
- }
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- return TRUE;
- }
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gd1_mgmt_v3_post_val_req (XDR *xdrs, gd1_mgmt_v3_post_val_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- 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_gd1_mgmt_v3_post_val_rsp (XDR *xdrs, gd1_mgmt_v3_post_val_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- IXDR_PUT_LONG(buf, objp->op);
- IXDR_PUT_LONG(buf, objp->op_ret);
- IXDR_PUT_LONG(buf, objp->op_errno);
- }
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
-
- } else {
- objp->op = IXDR_GET_LONG(buf);
- objp->op_ret = IXDR_GET_LONG(buf);
- objp->op_errno = IXDR_GET_LONG(buf);
- }
- if (!xdr_string (xdrs, &objp->op_errstr, ~0))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- return TRUE;
- }
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_string (xdrs, &objp->op_errstr, ~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_gd1_mgmt_v3_unlock_req (XDR *xdrs, gd1_mgmt_v3_unlock_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->txn_id, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op))
- 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_gd1_mgmt_v3_unlock_rsp (XDR *xdrs, gd1_mgmt_v3_unlock_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_vector (xdrs, (char *)objp->uuid, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->txn_id, 16,
- sizeof (u_char), (xdrproc_t) xdr_u_char))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
- return FALSE;
- 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/glusterd1-xdr.h b/rpc/xdr/src/glusterd1-xdr.h
deleted file mode 100644
index b6be23d..0000000
--- a/rpc/xdr/src/glusterd1-xdr.h
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-#include "xdr-common.h"
-#include "compat.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ >= 4
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
-#endif
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _GLUSTERD1_XDR_H_RPCGEN
-#define _GLUSTERD1_XDR_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-enum glusterd_volume_status {
- GLUSTERD_STATUS_NONE = 0,
- GLUSTERD_STATUS_STARTED = 0 + 1,
- GLUSTERD_STATUS_STOPPED = 0 + 2,
-};
-typedef enum glusterd_volume_status glusterd_volume_status;
-
-struct gd1_mgmt_probe_req {
- u_char uuid[16];
- char *hostname;
- int port;
-};
-typedef struct gd1_mgmt_probe_req gd1_mgmt_probe_req;
-
-struct gd1_mgmt_probe_rsp {
- u_char uuid[16];
- char *hostname;
- int port;
- int op_ret;
- int op_errno;
- char *op_errstr;
-};
-typedef struct gd1_mgmt_probe_rsp gd1_mgmt_probe_rsp;
-
-struct gd1_mgmt_friend_req {
- u_char uuid[16];
- char *hostname;
- int port;
- struct {
- u_int vols_len;
- char *vols_val;
- } vols;
-};
-typedef struct gd1_mgmt_friend_req gd1_mgmt_friend_req;
-
-struct gd1_mgmt_friend_rsp {
- u_char uuid[16];
- char *hostname;
- int op_ret;
- int op_errno;
- int port;
-};
-typedef struct gd1_mgmt_friend_rsp gd1_mgmt_friend_rsp;
-
-struct gd1_mgmt_unfriend_req {
- u_char uuid[16];
- char *hostname;
- int port;
-};
-typedef struct gd1_mgmt_unfriend_req gd1_mgmt_unfriend_req;
-
-struct gd1_mgmt_unfriend_rsp {
- u_char uuid[16];
- char *hostname;
- int op_ret;
- int op_errno;
- int port;
-};
-typedef struct gd1_mgmt_unfriend_rsp gd1_mgmt_unfriend_rsp;
-
-struct gd1_mgmt_cluster_lock_req {
- u_char uuid[16];
-};
-typedef struct gd1_mgmt_cluster_lock_req gd1_mgmt_cluster_lock_req;
-
-struct gd1_mgmt_cluster_lock_rsp {
- u_char uuid[16];
- int op_ret;
- int op_errno;
-};
-typedef struct gd1_mgmt_cluster_lock_rsp gd1_mgmt_cluster_lock_rsp;
-
-struct gd1_mgmt_cluster_unlock_req {
- u_char uuid[16];
-};
-typedef struct gd1_mgmt_cluster_unlock_req gd1_mgmt_cluster_unlock_req;
-
-struct gd1_mgmt_cluster_unlock_rsp {
- u_char uuid[16];
- int op_ret;
- int op_errno;
-};
-typedef struct gd1_mgmt_cluster_unlock_rsp gd1_mgmt_cluster_unlock_rsp;
-
-struct gd1_mgmt_stage_op_req {
- u_char uuid[16];
- int op;
- struct {
- u_int buf_len;
- char *buf_val;
- } buf;
-};
-typedef struct gd1_mgmt_stage_op_req gd1_mgmt_stage_op_req;
-
-struct gd1_mgmt_stage_op_rsp {
- u_char uuid[16];
- int op;
- int op_ret;
- int op_errno;
- char *op_errstr;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gd1_mgmt_stage_op_rsp gd1_mgmt_stage_op_rsp;
-
-struct gd1_mgmt_commit_op_req {
- u_char uuid[16];
- int op;
- struct {
- u_int buf_len;
- char *buf_val;
- } buf;
-};
-typedef struct gd1_mgmt_commit_op_req gd1_mgmt_commit_op_req;
-
-struct gd1_mgmt_commit_op_rsp {
- u_char uuid[16];
- int op;
- int op_ret;
- int op_errno;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
- char *op_errstr;
-};
-typedef struct gd1_mgmt_commit_op_rsp gd1_mgmt_commit_op_rsp;
-
-struct gd1_mgmt_friend_update {
- u_char uuid[16];
- struct {
- u_int friends_len;
- char *friends_val;
- } friends;
- int port;
-};
-typedef struct gd1_mgmt_friend_update gd1_mgmt_friend_update;
-
-struct gd1_mgmt_friend_update_rsp {
- u_char uuid[16];
- int op;
- int op_ret;
- int op_errno;
-};
-typedef struct gd1_mgmt_friend_update_rsp gd1_mgmt_friend_update_rsp;
-
-struct gd1_mgmt_brick_op_req {
- char *name;
- int op;
- struct {
- u_int input_len;
- char *input_val;
- } input;
-};
-typedef struct gd1_mgmt_brick_op_req gd1_mgmt_brick_op_req;
-
-struct gd1_mgmt_brick_op_rsp {
- int op_ret;
- int op_errno;
- struct {
- u_int output_len;
- char *output_val;
- } output;
- char *op_errstr;
-};
-typedef struct gd1_mgmt_brick_op_rsp gd1_mgmt_brick_op_rsp;
-
-struct gd1_mgmt_v3_lock_req {
- u_char uuid[16];
- u_char txn_id[16];
- int op;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gd1_mgmt_v3_lock_req gd1_mgmt_v3_lock_req;
-
-struct gd1_mgmt_v3_lock_rsp {
- u_char uuid[16];
- u_char txn_id[16];
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
- int op_ret;
- int op_errno;
-};
-typedef struct gd1_mgmt_v3_lock_rsp gd1_mgmt_v3_lock_rsp;
-
-struct gd1_mgmt_v3_pre_val_req {
- u_char uuid[16];
- int op;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gd1_mgmt_v3_pre_val_req gd1_mgmt_v3_pre_val_req;
-
-struct gd1_mgmt_v3_pre_val_rsp {
- u_char uuid[16];
- int op;
- int op_ret;
- int op_errno;
- char *op_errstr;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gd1_mgmt_v3_pre_val_rsp gd1_mgmt_v3_pre_val_rsp;
-
-struct gd1_mgmt_v3_brick_op_req {
- u_char uuid[16];
- int op;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gd1_mgmt_v3_brick_op_req gd1_mgmt_v3_brick_op_req;
-
-struct gd1_mgmt_v3_brick_op_rsp {
- u_char uuid[16];
- int op;
- int op_ret;
- int op_errno;
- char *op_errstr;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gd1_mgmt_v3_brick_op_rsp gd1_mgmt_v3_brick_op_rsp;
-
-struct gd1_mgmt_v3_commit_req {
- u_char uuid[16];
- int op;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gd1_mgmt_v3_commit_req gd1_mgmt_v3_commit_req;
-
-struct gd1_mgmt_v3_commit_rsp {
- u_char uuid[16];
- int op;
- int op_ret;
- int op_errno;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
- char *op_errstr;
-};
-typedef struct gd1_mgmt_v3_commit_rsp gd1_mgmt_v3_commit_rsp;
-
-struct gd1_mgmt_v3_post_val_req {
- u_char uuid[16];
- int op;
- int op_ret;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gd1_mgmt_v3_post_val_req gd1_mgmt_v3_post_val_req;
-
-struct gd1_mgmt_v3_post_val_rsp {
- u_char uuid[16];
- int op;
- int op_ret;
- int op_errno;
- char *op_errstr;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gd1_mgmt_v3_post_val_rsp gd1_mgmt_v3_post_val_rsp;
-
-struct gd1_mgmt_v3_unlock_req {
- u_char uuid[16];
- u_char txn_id[16];
- int op;
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
-};
-typedef struct gd1_mgmt_v3_unlock_req gd1_mgmt_v3_unlock_req;
-
-struct gd1_mgmt_v3_unlock_rsp {
- u_char uuid[16];
- u_char txn_id[16];
- struct {
- u_int dict_len;
- char *dict_val;
- } dict;
- int op_ret;
- int op_errno;
-};
-typedef struct gd1_mgmt_v3_unlock_rsp gd1_mgmt_v3_unlock_rsp;
-
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern bool_t xdr_glusterd_volume_status (XDR *, glusterd_volume_status*);
-extern bool_t xdr_gd1_mgmt_probe_req (XDR *, gd1_mgmt_probe_req*);
-extern bool_t xdr_gd1_mgmt_probe_rsp (XDR *, gd1_mgmt_probe_rsp*);
-extern bool_t xdr_gd1_mgmt_friend_req (XDR *, gd1_mgmt_friend_req*);
-extern bool_t xdr_gd1_mgmt_friend_rsp (XDR *, gd1_mgmt_friend_rsp*);
-extern bool_t xdr_gd1_mgmt_unfriend_req (XDR *, gd1_mgmt_unfriend_req*);
-extern bool_t xdr_gd1_mgmt_unfriend_rsp (XDR *, gd1_mgmt_unfriend_rsp*);
-extern bool_t xdr_gd1_mgmt_cluster_lock_req (XDR *, gd1_mgmt_cluster_lock_req*);
-extern bool_t xdr_gd1_mgmt_cluster_lock_rsp (XDR *, gd1_mgmt_cluster_lock_rsp*);
-extern bool_t xdr_gd1_mgmt_cluster_unlock_req (XDR *, gd1_mgmt_cluster_unlock_req*);
-extern bool_t xdr_gd1_mgmt_cluster_unlock_rsp (XDR *, gd1_mgmt_cluster_unlock_rsp*);
-extern bool_t xdr_gd1_mgmt_stage_op_req (XDR *, gd1_mgmt_stage_op_req*);
-extern bool_t xdr_gd1_mgmt_stage_op_rsp (XDR *, gd1_mgmt_stage_op_rsp*);
-extern bool_t xdr_gd1_mgmt_commit_op_req (XDR *, gd1_mgmt_commit_op_req*);
-extern bool_t xdr_gd1_mgmt_commit_op_rsp (XDR *, gd1_mgmt_commit_op_rsp*);
-extern bool_t xdr_gd1_mgmt_friend_update (XDR *, gd1_mgmt_friend_update*);
-extern bool_t xdr_gd1_mgmt_friend_update_rsp (XDR *, gd1_mgmt_friend_update_rsp*);
-extern bool_t xdr_gd1_mgmt_brick_op_req (XDR *, gd1_mgmt_brick_op_req*);
-extern bool_t xdr_gd1_mgmt_brick_op_rsp (XDR *, gd1_mgmt_brick_op_rsp*);
-extern bool_t xdr_gd1_mgmt_v3_lock_req (XDR *, gd1_mgmt_v3_lock_req*);
-extern bool_t xdr_gd1_mgmt_v3_lock_rsp (XDR *, gd1_mgmt_v3_lock_rsp*);
-extern bool_t xdr_gd1_mgmt_v3_pre_val_req (XDR *, gd1_mgmt_v3_pre_val_req*);
-extern bool_t xdr_gd1_mgmt_v3_pre_val_rsp (XDR *, gd1_mgmt_v3_pre_val_rsp*);
-extern bool_t xdr_gd1_mgmt_v3_brick_op_req (XDR *, gd1_mgmt_v3_brick_op_req*);
-extern bool_t xdr_gd1_mgmt_v3_brick_op_rsp (XDR *, gd1_mgmt_v3_brick_op_rsp*);
-extern bool_t xdr_gd1_mgmt_v3_commit_req (XDR *, gd1_mgmt_v3_commit_req*);
-extern bool_t xdr_gd1_mgmt_v3_commit_rsp (XDR *, gd1_mgmt_v3_commit_rsp*);
-extern bool_t xdr_gd1_mgmt_v3_post_val_req (XDR *, gd1_mgmt_v3_post_val_req*);
-extern bool_t xdr_gd1_mgmt_v3_post_val_rsp (XDR *, gd1_mgmt_v3_post_val_rsp*);
-extern bool_t xdr_gd1_mgmt_v3_unlock_req (XDR *, gd1_mgmt_v3_unlock_req*);
-extern bool_t xdr_gd1_mgmt_v3_unlock_rsp (XDR *, gd1_mgmt_v3_unlock_rsp*);
-
-#else /* K&R C */
-extern bool_t xdr_glusterd_volume_status ();
-extern bool_t xdr_gd1_mgmt_probe_req ();
-extern bool_t xdr_gd1_mgmt_probe_rsp ();
-extern bool_t xdr_gd1_mgmt_friend_req ();
-extern bool_t xdr_gd1_mgmt_friend_rsp ();
-extern bool_t xdr_gd1_mgmt_unfriend_req ();
-extern bool_t xdr_gd1_mgmt_unfriend_rsp ();
-extern bool_t xdr_gd1_mgmt_cluster_lock_req ();
-extern bool_t xdr_gd1_mgmt_cluster_lock_rsp ();
-extern bool_t xdr_gd1_mgmt_cluster_unlock_req ();
-extern bool_t xdr_gd1_mgmt_cluster_unlock_rsp ();
-extern bool_t xdr_gd1_mgmt_stage_op_req ();
-extern bool_t xdr_gd1_mgmt_stage_op_rsp ();
-extern bool_t xdr_gd1_mgmt_commit_op_req ();
-extern bool_t xdr_gd1_mgmt_commit_op_rsp ();
-extern bool_t xdr_gd1_mgmt_friend_update ();
-extern bool_t xdr_gd1_mgmt_friend_update_rsp ();
-extern bool_t xdr_gd1_mgmt_brick_op_req ();
-extern bool_t xdr_gd1_mgmt_brick_op_rsp ();
-extern bool_t xdr_gd1_mgmt_v3_lock_req ();
-extern bool_t xdr_gd1_mgmt_v3_lock_rsp ();
-extern bool_t xdr_gd1_mgmt_v3_pre_val_req ();
-extern bool_t xdr_gd1_mgmt_v3_pre_val_rsp ();
-extern bool_t xdr_gd1_mgmt_v3_brick_op_req ();
-extern bool_t xdr_gd1_mgmt_v3_brick_op_rsp ();
-extern bool_t xdr_gd1_mgmt_v3_commit_req ();
-extern bool_t xdr_gd1_mgmt_v3_commit_rsp ();
-extern bool_t xdr_gd1_mgmt_v3_post_val_req ();
-extern bool_t xdr_gd1_mgmt_v3_post_val_rsp ();
-extern bool_t xdr_gd1_mgmt_v3_unlock_req ();
-extern bool_t xdr_gd1_mgmt_v3_unlock_rsp ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_GLUSTERD1_XDR_H_RPCGEN */
diff --git a/rpc/xdr/src/glusterfs3-xdr.x b/rpc/xdr/src/glusterfs3-xdr.x
index 9fdc8f9..aabb14f 100644
--- a/rpc/xdr/src/glusterfs3-xdr.x
+++ b/rpc/xdr/src/glusterfs3-xdr.x
@@ -1,23 +1,23 @@
#define GF_REQUEST_MAXGROUPS 16
struct gf_statfs {
- unsigned hyper bsize;
- unsigned hyper frsize;
- unsigned hyper blocks;
- unsigned hyper bfree;
- unsigned hyper bavail;
- unsigned hyper files;
- unsigned hyper ffree;
- unsigned hyper favail;
- unsigned hyper fsid;
- unsigned hyper flag;
- unsigned hyper namemax;
+ u_quad_t bsize;
+ u_quad_t frsize;
+ u_quad_t blocks;
+ u_quad_t bfree;
+ u_quad_t bavail;
+ u_quad_t files;
+ u_quad_t ffree;
+ u_quad_t favail;
+ u_quad_t fsid;
+ u_quad_t flag;
+ u_quad_t namemax;
};
struct gf_proto_flock {
unsigned int type;
unsigned int whence;
- unsigned hyper start;
- unsigned hyper len;
+ u_quad_t start;
+ u_quad_t len;
unsigned int pid;
opaque lk_owner<>;
} ;
@@ -25,16 +25,16 @@ struct gf_proto_flock {
struct gf_iatt {
opaque ia_gfid[16];
- unsigned hyper ia_ino; /* inode number */
- unsigned hyper ia_dev; /* backing device ID */
+ u_quad_t ia_ino; /* inode number */
+ u_quad_t ia_dev; /* backing device ID */
unsigned int mode; /* mode (type + protection )*/
unsigned int ia_nlink; /* Link count */
unsigned int ia_uid; /* user ID of owner */
unsigned int ia_gid; /* group ID of owner */
- unsigned hyper ia_rdev; /* device ID (if special file) */
- unsigned hyper ia_size; /* file size in bytes */
+ u_quad_t ia_rdev; /* device ID (if special file) */
+ u_quad_t ia_size; /* file size in bytes */
unsigned int ia_blksize; /* blocksize for filesystem I/O */
- unsigned hyper ia_blocks; /* number of 512B blocks allocated */
+ u_quad_t ia_blocks; /* number of 512B blocks allocated */
unsigned int ia_atime; /* last access time */
unsigned int ia_atime_nsec;
unsigned int ia_mtime; /* last modification time */
@@ -71,7 +71,7 @@ struct gfs3_readlink_req {
struct gfs3_mknod_req {
opaque pargfid[16];
- unsigned hyper dev;
+ u_quad_t dev;
unsigned int mode;
unsigned int umask;
string bname<>; /* NULL terminated */
@@ -187,7 +187,7 @@ struct gfs3_readlink_req {
struct gfs3_truncate_req {
opaque gfid[16];
- unsigned hyper offset;
+ u_quad_t offset;
opaque xdata<>; /* Extra data */
};
struct gfs3_truncate_rsp {
@@ -207,15 +207,15 @@ struct gfs3_readlink_req {
struct gfs3_open_rsp {
int op_ret;
int op_errno;
- hyper fd;
+ quad_t fd;
opaque xdata<>; /* Extra data */
};
struct gfs3_read_req {
opaque gfid[16];
- hyper fd;
- unsigned hyper offset;
+ quad_t fd;
+ u_quad_t offset;
unsigned int size;
unsigned int flag;
opaque xdata<>; /* Extra data */
@@ -247,8 +247,8 @@ struct gfs3_lookup_req {
struct gfs3_write_req {
opaque gfid[16];
- hyper fd;
- unsigned hyper offset;
+ quad_t fd;
+ u_quad_t offset;
unsigned int size;
unsigned int flag;
opaque xdata<>; /* Extra data */
@@ -275,7 +275,7 @@ struct gfs3_lookup_req {
struct gfs3_lk_req {
opaque gfid[16];
- hyper fd;
+ int64_t fd;
unsigned int cmd;
unsigned int type;
struct gf_proto_flock flock;
@@ -299,7 +299,7 @@ struct gfs3_lookup_req {
struct gfs3_finodelk_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
unsigned int cmd;
unsigned int type;
struct gf_proto_flock flock;
@@ -310,14 +310,14 @@ struct gfs3_finodelk_req {
struct gfs3_flush_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_fsync_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
unsigned int data;
opaque xdata<>; /* Extra data */
} ;
@@ -341,7 +341,7 @@ struct gfs3_finodelk_req {
struct gfs3_fsetxattr_req {
opaque gfid[16];
- hyper fd;
+ int64_t fd;
unsigned int flags;
opaque dict<>;
opaque xdata<>; /* Extra data */
@@ -366,7 +366,7 @@ struct gfs3_finodelk_req {
struct gfs3_fxattrop_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
unsigned int flags;
opaque dict<>;
opaque xdata<>; /* Extra data */
@@ -396,7 +396,7 @@ struct gfs3_finodelk_req {
struct gfs3_fgetxattr_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
unsigned int namelen;
string name<>;
opaque xdata<>; /* Extra data */
@@ -417,7 +417,7 @@ struct gfs3_finodelk_req {
struct gfs3_fremovexattr_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
string name<>;
opaque xdata<>; /* Extra data */
} ;
@@ -431,30 +431,30 @@ struct gfs3_finodelk_req {
struct gfs3_opendir_rsp {
int op_ret;
int op_errno;
- hyper fd;
+ quad_t fd;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_fsyncdir_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
int data;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_readdir_req {
opaque gfid[16];
- hyper fd;
- unsigned hyper offset;
+ quad_t fd;
+ u_quad_t offset;
unsigned int size;
opaque xdata<>; /* Extra data */
};
struct gfs3_readdirp_req {
opaque gfid[16];
- hyper fd;
- unsigned hyper offset;
+ quad_t fd;
+ u_quad_t offset;
unsigned int size;
opaque dict<>;
} ;
@@ -479,7 +479,7 @@ struct gfs3_create_rsp {
int op_ret;
int op_errno;
struct gf_iatt stat;
- unsigned hyper fd;
+ u_quad_t fd;
struct gf_iatt preparent;
struct gf_iatt postparent;
opaque xdata<>; /* Extra data */
@@ -489,8 +489,8 @@ struct gfs3_create_rsp {
struct gfs3_ftruncate_req {
opaque gfid[16];
- hyper fd;
- unsigned hyper offset;
+ quad_t fd;
+ u_quad_t offset;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_ftruncate_rsp {
@@ -504,7 +504,7 @@ struct gfs3_ftruncate_rsp {
struct gfs3_fstat_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_fstat_rsp {
@@ -520,7 +520,7 @@ struct gfs3_fstat_req {
opaque gfid[16];
unsigned int cmd;
unsigned int type;
- unsigned hyper namelen;
+ u_quad_t namelen;
string name<>;
string volume<>;
opaque xdata<>; /* Extra data */
@@ -528,10 +528,10 @@ struct gfs3_fstat_req {
struct gfs3_fentrylk_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
unsigned int cmd;
unsigned int type;
- unsigned hyper namelen;
+ u_quad_t namelen;
string name<>;
string volume<>;
opaque xdata<>; /* Extra data */
@@ -553,7 +553,7 @@ struct gfs3_fstat_req {
} ;
struct gfs3_fsetattr_req {
- hyper fd;
+ quad_t fd;
struct gf_iatt stbuf;
int valid;
opaque xdata<>; /* Extra data */
@@ -568,10 +568,10 @@ struct gfs3_fstat_req {
struct gfs3_fallocate_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
unsigned int flags;
- unsigned hyper offset;
- unsigned hyper size;
+ u_quad_t offset;
+ u_quad_t size;
opaque xdata<>; /* Extra data */
} ;
@@ -585,9 +585,9 @@ struct gfs3_fstat_req {
struct gfs3_discard_req {
opaque gfid[16];
- hyper fd;
- unsigned hyper offset;
- unsigned hyper size;
+ quad_t fd;
+ u_quad_t offset;
+ u_quad_t size;
opaque xdata<>; /* Extra data */
} ;
@@ -601,9 +601,9 @@ struct gfs3_fstat_req {
struct gfs3_zerofill_req {
opaque gfid[16];
- hyper fd;
- unsigned hyper offset;
- unsigned hyper size;
+ quad_t fd;
+ u_quad_t offset;
+ u_quad_t size;
opaque xdata<>;
} ;
@@ -617,8 +617,8 @@ struct gfs3_fstat_req {
struct gfs3_rchecksum_req {
- hyper fd;
- unsigned hyper offset;
+ quad_t fd;
+ u_quad_t offset;
unsigned int len;
opaque xdata<>; /* Extra data */
} ;
@@ -687,13 +687,13 @@ struct gfs3_ipc_req {
struct gfs3_releasedir_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
opaque xdata<>; /* Extra data */
} ;
struct gfs3_release_req {
opaque gfid[16];
- hyper fd;
+ quad_t fd;
opaque xdata<>; /* Extra data */
} ;
@@ -704,8 +704,8 @@ struct gf_common_rsp {
} ;
struct gfs3_dirlist {
- unsigned hyper d_ino;
- unsigned hyper d_off;
+ u_quad_t d_ino;
+ u_quad_t d_off;
unsigned int d_len;
unsigned int d_type;
string name<>;
@@ -721,8 +721,8 @@ struct gfs3_readdir_rsp {
};
struct gfs3_dirplist {
- unsigned hyper d_ino;
- unsigned hyper d_off;
+ u_quad_t d_ino;
+ u_quad_t d_off;
unsigned int d_len;
unsigned int d_type;
string name<>;
diff --git a/rpc/xdr/src/nlm4-xdr.c b/rpc/xdr/src/nlm4-xdr.c
deleted file mode 100644
index caba05f..0000000
--- a/rpc/xdr/src/nlm4-xdr.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include "nlm4-xdr.h"
-
-bool_t
-xdr_netobj (XDR *xdrs, netobj *objp)
-{
- if (!xdr_bytes (xdrs, (char **)&objp->n_bytes, (u_int *) &objp->n_len, MAXNETOBJ_SZ))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_fsh_mode (XDR *xdrs, fsh_mode *objp)
-{
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_fsh_access (XDR *xdrs, fsh_access *objp)
-{
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_stats (XDR *xdrs, nlm4_stats *objp)
-{
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_stat (XDR *xdrs, nlm4_stat *objp)
-{
- if (!xdr_nlm4_stats (xdrs, &objp->stat))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_holder (XDR *xdrs, nlm4_holder *objp)
-{
- if (!xdr_bool (xdrs, &objp->exclusive))
- return FALSE;
- if (!xdr_uint32_t (xdrs, &objp->svid))
- return FALSE;
- if (!xdr_netobj (xdrs, &objp->oh))
- return FALSE;
- if (!xdr_uint64_t (xdrs, &objp->l_offset))
- return FALSE;
- if (!xdr_uint64_t (xdrs, &objp->l_len))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_lock (XDR *xdrs, nlm4_lock *objp)
-{
- if (!xdr_string (xdrs, &objp->caller_name, MAXNAMELEN))
- return FALSE;
- if (!xdr_netobj (xdrs, &objp->fh))
- return FALSE;
- if (!xdr_netobj (xdrs, &objp->oh))
- return FALSE;
- if (!xdr_uint32_t (xdrs, &objp->svid))
- return FALSE;
- if (!xdr_uint64_t (xdrs, &objp->l_offset))
- return FALSE;
- if (!xdr_uint64_t (xdrs, &objp->l_len))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_share (XDR *xdrs, nlm4_share *objp)
-{
- if (!xdr_string (xdrs, &objp->caller_name, MAXNAMELEN))
- return FALSE;
- if (!xdr_netobj (xdrs, &objp->fh))
- return FALSE;
- if (!xdr_netobj (xdrs, &objp->oh))
- return FALSE;
- if (!xdr_fsh_mode (xdrs, &objp->mode))
- return FALSE;
- if (!xdr_fsh_access (xdrs, &objp->access))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_testrply (XDR *xdrs, nlm4_testrply *objp)
-{
- if (!xdr_nlm4_stats (xdrs, &objp->stat))
- return FALSE;
- switch (objp->stat) {
- case nlm4_denied:
- if (!xdr_nlm4_holder (xdrs, &objp->nlm4_testrply_u.holder))
- return FALSE;
- break;
- default:
- break;
- }
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_testres (XDR *xdrs, nlm4_testres *objp)
-{
- if (!xdr_netobj (xdrs, &objp->cookie))
- return FALSE;
- if (!xdr_nlm4_testrply (xdrs, &objp->stat))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_testargs (XDR *xdrs, nlm4_testargs *objp)
-{
- if (!xdr_netobj (xdrs, &objp->cookie))
- return FALSE;
- if (!xdr_bool (xdrs, &objp->exclusive))
- return FALSE;
- if (!xdr_nlm4_lock (xdrs, &objp->alock))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_res (XDR *xdrs, nlm4_res *objp)
-{
- if (!xdr_netobj (xdrs, &objp->cookie))
- return FALSE;
- if (!xdr_nlm4_stat (xdrs, &objp->stat))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_lockargs (XDR *xdrs, nlm4_lockargs *objp)
-{
- if (!xdr_netobj (xdrs, &objp->cookie))
- return FALSE;
- if (!xdr_bool (xdrs, &objp->block))
- return FALSE;
- if (!xdr_bool (xdrs, &objp->exclusive))
- return FALSE;
- if (!xdr_nlm4_lock (xdrs, &objp->alock))
- return FALSE;
- if (!xdr_bool (xdrs, &objp->reclaim))
- return FALSE;
- if (!xdr_int (xdrs, &objp->state))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_cancargs (XDR *xdrs, nlm4_cancargs *objp)
-{
- if (!xdr_netobj (xdrs, &objp->cookie))
- return FALSE;
- if (!xdr_bool (xdrs, &objp->block))
- return FALSE;
- if (!xdr_bool (xdrs, &objp->exclusive))
- return FALSE;
- if (!xdr_nlm4_lock (xdrs, &objp->alock))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_unlockargs (XDR *xdrs, nlm4_unlockargs *objp)
-{
- if (!xdr_netobj (xdrs, &objp->cookie))
- return FALSE;
- if (!xdr_nlm4_lock (xdrs, &objp->alock))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_shareargs (XDR *xdrs, nlm4_shareargs *objp)
-{
- if (!xdr_netobj (xdrs, &objp->cookie))
- return FALSE;
- if (!xdr_nlm4_share (xdrs, &objp->share))
- return FALSE;
- if (!xdr_bool (xdrs, &objp->reclaim))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_shareres (XDR *xdrs, nlm4_shareres *objp)
-{
- if (!xdr_netobj (xdrs, &objp->cookie))
- return FALSE;
- if (!xdr_nlm4_stats (xdrs, &objp->stat))
- return FALSE;
- if (!xdr_int (xdrs, &objp->sequence))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nlm4_freeallargs (XDR *xdrs, nlm4_freeallargs *objp)
-{
- if (!xdr_string (xdrs, &objp->name, LM_MAXSTRLEN))
- return FALSE;
- if (!xdr_uint32_t (xdrs, &objp->state))
- return FALSE;
- return TRUE;
-}
-
-
-/*
-bool_t
-xdr_nlm_sm_status (XDR *xdrs, nlm_sm_status *objp)
-{
- if (!xdr_string (xdrs, &objp->mon_name, LM_MAXSTRLEN))
- return FALSE;
- if (!xdr_int (xdrs, &objp->state))
- return FALSE;
- if (!xdr_opaque (xdrs, objp->priv, 16))
- return FALSE;
- return TRUE;
-}
-*/
diff --git a/rpc/xdr/src/nlm4-xdr.h b/rpc/xdr/src/nlm4-xdr.h
deleted file mode 100644
index 4391a47..0000000
--- a/rpc/xdr/src/nlm4-xdr.h
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _NLM_H_RPCGEN
-#define _NLM_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-#if defined(__NetBSD__)
-#define xdr_u_quad_t xdr_u_int64_t
-#define xdr_quad_t xdr_int64_t
-#define xdr_uint32_t xdr_u_int32_t
-#define xdr_uint64_t xdr_u_int64_t
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define MAXNETOBJ_SZ 1024
-#define LM_MAXSTRLEN 1024
-#define MAXNAMELEN 1025
-
-#if defined(__NetBSD__)
-#define xdr_u_quad_t xdr_u_int64_t
-#define xdr_quad_t xdr_int64_t
-#define xdr_uint32_t xdr_u_int32_t
-#define xdr_uint64_t xdr_u_int64_t
-#endif
-
-/*
- * The following enums are actually bit encoded for efficient
- * boolean algebra.... DON'T change them.....
- */
-
-enum fsh_mode {
- fsm_DN = 0,
- fsm_DR = 1,
- fsm_DW = 2,
- fsm_DRW = 3,
-};
-typedef enum fsh_mode fsh_mode;
-
-enum fsh_access {
- fsa_NONE = 0,
- fsa_R = 1,
- fsa_W = 2,
- fsa_RW = 3,
-};
-typedef enum fsh_access fsh_access;
-/* definitions for NLM version 4 */
-
-enum nlm4_stats {
- nlm4_granted = 0,
- nlm4_denied = 1,
- nlm4_denied_nolock = 2,
- nlm4_blocked = 3,
- nlm4_denied_grace_period = 4,
- nlm4_deadlck = 5,
- nlm4_rofs = 6,
- nlm4_stale_fh = 7,
- nlm4_fbig = 8,
- nlm4_failed = 9,
-};
-typedef enum nlm4_stats nlm4_stats;
-
-struct nlm4_stat {
- nlm4_stats stat;
-};
-typedef struct nlm4_stat nlm4_stat;
-
-struct nlm4_holder {
- bool_t exclusive;
- u_int32_t svid;
- netobj oh;
- u_int64_t l_offset;
- u_int64_t l_len;
-};
-typedef struct nlm4_holder nlm4_holder;
-
-struct nlm4_lock {
- char *caller_name;
- netobj fh;
- netobj oh;
- u_int32_t svid;
- u_int64_t l_offset;
- u_int64_t l_len;
-};
-typedef struct nlm4_lock nlm4_lock;
-
-struct nlm4_share {
- char *caller_name;
- netobj fh;
- netobj oh;
- fsh_mode mode;
- fsh_access access;
-};
-typedef struct nlm4_share nlm4_share;
-
-struct nlm4_testrply {
- nlm4_stats stat;
- union {
- struct nlm4_holder holder;
- } nlm4_testrply_u;
-};
-typedef struct nlm4_testrply nlm4_testrply;
-
-struct nlm4_testres {
- netobj cookie;
- nlm4_testrply stat;
-};
-typedef struct nlm4_testres nlm4_testres;
-
-struct nlm4_testargs {
- netobj cookie;
- bool_t exclusive;
- struct nlm4_lock alock;
-};
-typedef struct nlm4_testargs nlm4_testargs;
-
-struct nlm4_res {
- netobj cookie;
- nlm4_stat stat;
-};
-typedef struct nlm4_res nlm4_res;
-
-struct nlm4_lockargs {
- netobj cookie;
- bool_t block;
- bool_t exclusive;
- struct nlm4_lock alock;
- bool_t reclaim;
- int state;
-};
-typedef struct nlm4_lockargs nlm4_lockargs;
-
-struct nlm4_cancargs {
- netobj cookie;
- bool_t block;
- bool_t exclusive;
- struct nlm4_lock alock;
-};
-typedef struct nlm4_cancargs nlm4_cancargs;
-
-struct nlm4_unlockargs {
- netobj cookie;
- struct nlm4_lock alock;
-};
-typedef struct nlm4_unlockargs nlm4_unlockargs;
-
-struct nlm4_shareargs {
- netobj cookie;
- nlm4_share share;
- bool_t reclaim;
-};
-typedef struct nlm4_shareargs nlm4_shareargs;
-
-struct nlm4_shareres {
- netobj cookie;
- nlm4_stats stat;
- int sequence;
-};
-typedef struct nlm4_shareres nlm4_shareres;
-
-struct nlm4_freeallargs {
- char *name;
- u_int32_t state;
-};
-typedef struct nlm4_freeallargs nlm4_freeallargs;
-
-
-#define NLM4_NULL 0
-#define NLM4_TEST 1
-#define NLM4_LOCK 2
-#define NLM4_CANCEL 3
-#define NLM4_UNLOCK 4
-#define NLM4_GRANTED 5
-#define NLM4_TEST_MSG 6
-#define NLM4_LOCK_MSG 7
-#define NLM4_CANCEL_MSG 8
-#define NLM4_UNLOCK_MSG 9
-#define NLM4_GRANTED_MSG 10
-#define NLM4_TEST_RES 11
-#define NLM4_LOCK_RES 12
-#define NLM4_CANCEL_RES 13
-#define NLM4_UNLOCK_RES 14
-#define NLM4_GRANTED_RES 15
-#define NLM4_SM_NOTIFY 16
-#define NLM4_SEVENTEEN 17
-#define NLM4_EIGHTEEN 18
-#define NLM4_NINETEEN 19
-#define NLM4_SHARE 20
-#define NLM4_UNSHARE 21
-#define NLM4_NM_LOCK 22
-#define NLM4_FREE_ALL 23
-#define NLM4_PROC_COUNT 24
-
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern bool_t xdr_netobj (XDR *, netobj*);
-extern bool_t xdr_fsh_mode (XDR *, fsh_mode*);
-extern bool_t xdr_fsh_access (XDR *, fsh_access*);
-extern bool_t xdr_nlm4_stats (XDR *, nlm4_stats*);
-extern bool_t xdr_nlm4_stat (XDR *, nlm4_stat*);
-extern bool_t xdr_nlm4_holder (XDR *, nlm4_holder*);
-extern bool_t xdr_nlm4_lock (XDR *, nlm4_lock*);
-extern bool_t xdr_nlm4_share (XDR *, nlm4_share*);
-extern bool_t xdr_nlm4_testrply (XDR *, nlm4_testrply*);
-extern bool_t xdr_nlm4_testres (XDR *, nlm4_testres*);
-extern bool_t xdr_nlm4_testargs (XDR *, nlm4_testargs*);
-extern bool_t xdr_nlm4_res (XDR *, nlm4_res*);
-extern bool_t xdr_nlm4_lockargs (XDR *, nlm4_lockargs*);
-extern bool_t xdr_nlm4_cancargs (XDR *, nlm4_cancargs*);
-extern bool_t xdr_nlm4_unlockargs (XDR *, nlm4_unlockargs*);
-extern bool_t xdr_nlm4_shareargs (XDR *, nlm4_shareargs*);
-extern bool_t xdr_nlm4_shareres (XDR *, nlm4_shareres*);
-extern bool_t xdr_nlm4_freeallargs (XDR *, nlm4_freeallargs*);
-
-#else /* K&R C */
-extern bool_t xdr_netobj ();
-extern bool_t xdr_fsh_mode ();
-extern bool_t xdr_fsh_access ();
-extern bool_t xdr_nlm4_stats ();
-extern bool_t xdr_nlm4_stat ();
-extern bool_t xdr_nlm4_holder ();
-extern bool_t xdr_nlm4_lock ();
-extern bool_t xdr_nlm4_share ();
-extern bool_t xdr_nlm4_testrply ();
-extern bool_t xdr_nlm4_testres ();
-extern bool_t xdr_nlm4_testargs ();
-extern bool_t xdr_nlm4_res ();
-extern bool_t xdr_nlm4_lockargs ();
-extern bool_t xdr_nlm4_cancargs ();
-extern bool_t xdr_nlm4_unlockargs ();
-extern bool_t xdr_nlm4_shareargs ();
-extern bool_t xdr_nlm4_shareres ();
-extern bool_t xdr_nlm4_freeallargs ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_NLM_H_RPCGEN */
diff --git a/rpc/xdr/src/nlm4.x b/rpc/xdr/src/nlm4-xdr.x
index e22ac99..e2be3b7 100644
--- a/rpc/xdr/src/nlm4.x
+++ b/rpc/xdr/src/nlm4-xdr.x
@@ -14,7 +14,7 @@ const MAXNETOBJ_SZ = 1024;
const LM_MAXSTRLEN = 1024;
const MAXNAMELEN = 1025;
-typedef opaque netobj<MAXNETOBJ_SZ>;
+typedef opaque nlm4_netobj<MAXNETOBJ_SZ>;
#ifdef RPC_HDR
%/*
@@ -59,15 +59,15 @@ struct nlm4_stat {
struct nlm4_holder {
bool exclusive;
u_int32_t svid;
- netobj oh;
+ nlm4_netobj oh;
u_int64_t l_offset;
u_int64_t l_len;
};
struct nlm4_lock {
string caller_name<LM_MAXSTRLEN>;
- netobj fh;
- netobj oh;
+ nlm4_netobj fh;
+ nlm4_netobj oh;
u_int32_t svid;
u_int64_t l_offset;
u_int64_t l_len;
@@ -75,71 +75,71 @@ struct nlm4_lock {
struct nlm4_share {
string caller_name<LM_MAXSTRLEN>;
- netobj fh;
- netobj oh;
+ nlm4_netobj fh;
+ nlm4_netobj oh;
fsh_mode mode;
fsh_access access;
};
union nlm4_testrply switch (nlm4_stats stat) {
- case nlm_denied:
+ case nlm4_denied:
struct nlm4_holder holder;
default:
void;
};
struct nlm4_testres {
- netobj cookie;
+ nlm4_netobj cookie;
nlm4_testrply stat;
};
struct nlm4_testargs {
- netobj cookie;
+ nlm4_netobj cookie;
bool exclusive;
struct nlm4_lock alock;
};
struct nlm4_res {
- netobj cookie;
+ nlm4_netobj cookie;
nlm4_stat stat;
};
struct nlm4_lockargs {
- netobj cookie;
+ nlm4_netobj cookie;
bool block;
bool exclusive;
struct nlm4_lock alock;
bool reclaim; /* used for recovering locks */
- int state; /* specify local status monitor state */
+ int32_t state; /* specify local status monitor state */
};
struct nlm4_cancargs {
- netobj cookie;
+ nlm4_netobj cookie;
bool block;
bool exclusive;
struct nlm4_lock alock;
};
struct nlm4_unlockargs {
- netobj cookie;
+ nlm4_netobj cookie;
struct nlm4_lock alock;
};
struct nlm4_shareargs {
- netobj cookie;
+ nlm4_netobj cookie;
nlm4_share share;
bool reclaim;
};
struct nlm4_shareres {
- netobj cookie;
+ nlm4_netobj cookie;
nlm4_stats stat;
- int sequence;
+ int32_t sequence;
};
struct nlm4_freeallargs {
string name<LM_MAXSTRLEN>; /* client hostname */
- uint32 state; /* unused */
+ uint32_t state; /* unused */
};
/*
@@ -152,3 +152,9 @@ struct nlm_sm_status {
int state; /* new state */
opaque priv[16]; /* private data */
};
+
+program NLMCBK_PROGRAM {
+ version NLMCBK_V1 {
+ void NLMCBK_SM_NOTIFY(struct nlm_sm_status) = 16;
+ } = 1;
+} = 100021;
diff --git a/rpc/xdr/src/nlmcbk-xdr.c b/rpc/xdr/src/nlmcbk-xdr.c
deleted file mode 100644
index 3d75acc..0000000
--- a/rpc/xdr/src/nlmcbk-xdr.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include "nlmcbk-xdr.h"
-
-bool_t
-xdr_nlm_sm_status (XDR *xdrs, nlm_sm_status *objp)
-{
- if (!xdr_string (xdrs, &objp->mon_name, LM_MAXSTRLEN))
- return FALSE;
- if (!xdr_int (xdrs, &objp->state))
- return FALSE;
- if (!xdr_opaque (xdrs, objp->priv, 16))
- return FALSE;
- return TRUE;
-}
diff --git a/rpc/xdr/src/nlmcbk-xdr.h b/rpc/xdr/src/nlmcbk-xdr.h
deleted file mode 100644
index ad84218..0000000
--- a/rpc/xdr/src/nlmcbk-xdr.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _NLMCBK_H_RPCGEN
-#define _NLMCBK_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define LM_MAXSTRLEN 1024
-
-struct nlm_sm_status {
- char *mon_name;
- int state;
- char priv[16];
-};
-typedef struct nlm_sm_status nlm_sm_status;
-
-#define NLMCBK_PROGRAM 100021
-#define NLMCBK_V1 1
-
-#if defined(__STDC__) || defined(__cplusplus)
-#define NLMCBK_SM_NOTIFY 16
-extern void * nlmcbk_sm_notify_0(struct nlm_sm_status *, CLIENT *);
-extern void * nlmcbk_sm_notify_0_svc(struct nlm_sm_status *, struct svc_req *);
-extern int nlmcbk_program_0_freeresult (SVCXPRT *, xdrproc_t, caddr_t);
-
-#else /* K&R C */
-#define NLMCBK_SM_NOTIFY 16
-extern void * nlmcbk_sm_notify_0();
-extern void * nlmcbk_sm_notify_0_svc();
-extern int nlmcbk_program_0_freeresult ();
-#endif /* K&R C */
-
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern bool_t xdr_nlm_sm_status (XDR *, nlm_sm_status*);
-
-#else /* K&R C */
-extern bool_t xdr_nlm_sm_status ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_NLMCBK_H_RPCGEN */
diff --git a/rpc/xdr/src/nlmcbk.x b/rpc/xdr/src/nlmcbk.x
deleted file mode 100644
index 1d3746c..0000000
--- a/rpc/xdr/src/nlmcbk.x
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-const LM_MAXSTRLEN = 1024;
-
-struct nlm_sm_status {
- string mon_name<LM_MAXSTRLEN>; /* name of host */
- int state; /* new state */
- opaque priv[16]; /* private data */
-};
-
-program NLMCBK_PROGRAM {
- version NLMCBK_V0 {
- void NLMCBK_SM_NOTIFY(struct nlm_sm_status) = 1;
- } = 0;
-} = 1238477;
-
diff --git a/rpc/xdr/src/nsm-xdr.c b/rpc/xdr/src/nsm-xdr.c
deleted file mode 100644
index 5871273..0000000
--- a/rpc/xdr/src/nsm-xdr.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include "nsm-xdr.h"
-
-bool_t
-xdr_sm_name (XDR *xdrs, sm_name *objp)
-{
- if (!xdr_string (xdrs, &objp->mon_name, SM_MAXSTRLEN))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_res (XDR *xdrs, res *objp)
-{
- if (!xdr_enum (xdrs, (enum_t *) objp))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_sm_stat_res (XDR *xdrs, sm_stat_res *objp)
-{
- if (!xdr_res (xdrs, &objp->res_stat))
- return FALSE;
- if (!xdr_int (xdrs, &objp->state))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_sm_stat (XDR *xdrs, sm_stat *objp)
-{
- if (!xdr_int (xdrs, &objp->state))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_my_id (XDR *xdrs, my_id *objp)
-{
- if (!xdr_string (xdrs, &objp->my_name, SM_MAXSTRLEN))
- return FALSE;
- if (!xdr_int (xdrs, &objp->my_prog))
- return FALSE;
- if (!xdr_int (xdrs, &objp->my_vers))
- return FALSE;
- if (!xdr_int (xdrs, &objp->my_proc))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_mon_id (XDR *xdrs, mon_id *objp)
-{
- if (!xdr_string (xdrs, &objp->mon_name, SM_MAXSTRLEN))
- return FALSE;
- if (!xdr_my_id (xdrs, &objp->my_id))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_mon (XDR *xdrs, mon *objp)
-{
- if (!xdr_mon_id (xdrs, &objp->mon_id))
- return FALSE;
- if (!xdr_opaque (xdrs, objp->priv, 16))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_nsm_callback_status (XDR *xdrs, nsm_callback_status *objp)
-{
- if (!xdr_string (xdrs, &objp->mon_name, SM_MAXSTRLEN))
- return FALSE;
- if (!xdr_int (xdrs, &objp->state))
- return FALSE;
- if (!xdr_opaque (xdrs, objp->priv, 16))
- return FALSE;
- return TRUE;
-}
diff --git a/rpc/xdr/src/nsm-xdr.h b/rpc/xdr/src/nsm-xdr.h
deleted file mode 100644
index 9de642c..0000000
--- a/rpc/xdr/src/nsm-xdr.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _NSM_H_RPCGEN
-#define _NSM_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define SM_MAXSTRLEN 1024
-
-struct sm_name {
- char *mon_name;
-};
-typedef struct sm_name sm_name;
-
-enum res {
- STAT_SUCC = 0,
- STAT_FAIL = 1,
-};
-typedef enum res res;
-
-struct sm_stat_res {
- res res_stat;
- int state;
-};
-typedef struct sm_stat_res sm_stat_res;
-
-struct sm_stat {
- int state;
-};
-typedef struct sm_stat sm_stat;
-
-struct my_id {
- char *my_name;
- int my_prog;
- int my_vers;
- int my_proc;
-};
-typedef struct my_id my_id;
-
-struct mon_id {
- char *mon_name;
- struct my_id my_id;
-};
-typedef struct mon_id mon_id;
-
-struct mon {
- struct mon_id mon_id;
- char priv[16];
-};
-typedef struct mon mon;
-
-struct nsm_callback_status {
- char *mon_name;
- int state;
- char priv[16];
-};
-typedef struct nsm_callback_status nsm_callback_status;
-
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern bool_t xdr_sm_name (XDR *, sm_name*);
-extern bool_t xdr_res (XDR *, res*);
-extern bool_t xdr_sm_stat_res (XDR *, sm_stat_res*);
-extern bool_t xdr_sm_stat (XDR *, sm_stat*);
-extern bool_t xdr_my_id (XDR *, my_id*);
-extern bool_t xdr_mon_id (XDR *, mon_id*);
-extern bool_t xdr_mon (XDR *, mon*);
-extern bool_t xdr_nsm_callback_status (XDR *, nsm_callback_status*);
-
-#else /* K&R C */
-extern bool_t xdr_sm_name ();
-extern bool_t xdr_res ();
-extern bool_t xdr_sm_stat_res ();
-extern bool_t xdr_sm_stat ();
-extern bool_t xdr_my_id ();
-extern bool_t xdr_mon_id ();
-extern bool_t xdr_mon ();
-extern bool_t xdr_nsm_callback_status ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_NSM_H_RPCGEN */
diff --git a/rpc/xdr/src/nsm.x b/rpc/xdr/src/nsm-xdr.x
index 8f97b1a..8f97b1a 100644
--- a/rpc/xdr/src/nsm.x
+++ b/rpc/xdr/src/nsm-xdr.x
diff --git a/rpc/xdr/src/portmap-xdr.c b/rpc/xdr/src/portmap-xdr.c
deleted file mode 100644
index 4766122..0000000
--- a/rpc/xdr/src/portmap-xdr.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-#include "xdr-common.h"
-#include "compat.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ >= 4
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
-#endif
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include "portmap-xdr.h"
-
-bool_t
-xdr_pmap_port_by_brick_req (XDR *xdrs, pmap_port_by_brick_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_string (xdrs, &objp->brick, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_pmap_port_by_brick_rsp (XDR *xdrs, pmap_port_by_brick_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- } else {
- IXDR_PUT_LONG(buf, objp->op_ret);
- IXDR_PUT_LONG(buf, objp->op_errno);
- IXDR_PUT_LONG(buf, objp->status);
- IXDR_PUT_LONG(buf, objp->port);
- }
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- } else {
- objp->op_ret = IXDR_GET_LONG(buf);
- objp->op_errno = IXDR_GET_LONG(buf);
- objp->status = IXDR_GET_LONG(buf);
- objp->port = IXDR_GET_LONG(buf);
- }
- return TRUE;
- }
-
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_pmap_brick_by_port_req (XDR *xdrs, pmap_brick_by_port_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_pmap_brick_by_port_rsp (XDR *xdrs, pmap_brick_by_port_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
-
- } else {
- IXDR_PUT_LONG(buf, objp->op_ret);
- IXDR_PUT_LONG(buf, objp->op_errno);
- IXDR_PUT_LONG(buf, objp->status);
- }
- if (!xdr_string (xdrs, &objp->brick, ~0))
- return FALSE;
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
-
- } else {
- objp->op_ret = IXDR_GET_LONG(buf);
- objp->op_errno = IXDR_GET_LONG(buf);
- objp->status = IXDR_GET_LONG(buf);
- }
- if (!xdr_string (xdrs, &objp->brick, ~0))
- return FALSE;
- return TRUE;
- }
-
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_int (xdrs, &objp->status))
- return FALSE;
- if (!xdr_string (xdrs, &objp->brick, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_pmap_signup_req (XDR *xdrs, pmap_signup_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_string (xdrs, &objp->brick, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_pmap_signup_rsp (XDR *xdrs, pmap_signup_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_pmap_signin_req (XDR *xdrs, pmap_signin_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_string (xdrs, &objp->brick, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_pmap_signin_rsp (XDR *xdrs, pmap_signin_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_pmap_signout_req (XDR *xdrs, pmap_signout_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_string (xdrs, &objp->brick, ~0))
- return FALSE;
- if (!xdr_int (xdrs, &objp->port))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_pmap_signout_rsp (XDR *xdrs, pmap_signout_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- 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/portmap-xdr.h b/rpc/xdr/src/portmap-xdr.h
deleted file mode 100644
index 8e4ff4f..0000000
--- a/rpc/xdr/src/portmap-xdr.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-#include "xdr-common.h"
-#include "compat.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ >= 4
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
-#endif
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _PORTMAP_XDR_H_RPCGEN
-#define _PORTMAP_XDR_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-struct pmap_port_by_brick_req {
- char *brick;
-};
-typedef struct pmap_port_by_brick_req pmap_port_by_brick_req;
-
-struct pmap_port_by_brick_rsp {
- int op_ret;
- int op_errno;
- int status;
- int port;
-};
-typedef struct pmap_port_by_brick_rsp pmap_port_by_brick_rsp;
-
-struct pmap_brick_by_port_req {
- int port;
-};
-typedef struct pmap_brick_by_port_req pmap_brick_by_port_req;
-
-struct pmap_brick_by_port_rsp {
- int op_ret;
- int op_errno;
- int status;
- char *brick;
-};
-typedef struct pmap_brick_by_port_rsp pmap_brick_by_port_rsp;
-
-struct pmap_signup_req {
- char *brick;
- int port;
-};
-typedef struct pmap_signup_req pmap_signup_req;
-
-struct pmap_signup_rsp {
- int op_ret;
- int op_errno;
-};
-typedef struct pmap_signup_rsp pmap_signup_rsp;
-
-struct pmap_signin_req {
- char *brick;
- int port;
-};
-typedef struct pmap_signin_req pmap_signin_req;
-
-struct pmap_signin_rsp {
- int op_ret;
- int op_errno;
-};
-typedef struct pmap_signin_rsp pmap_signin_rsp;
-
-struct pmap_signout_req {
- char *brick;
- int port;
-};
-typedef struct pmap_signout_req pmap_signout_req;
-
-struct pmap_signout_rsp {
- int op_ret;
- int op_errno;
-};
-typedef struct pmap_signout_rsp pmap_signout_rsp;
-
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern bool_t xdr_pmap_port_by_brick_req (XDR *, pmap_port_by_brick_req*);
-extern bool_t xdr_pmap_port_by_brick_rsp (XDR *, pmap_port_by_brick_rsp*);
-extern bool_t xdr_pmap_brick_by_port_req (XDR *, pmap_brick_by_port_req*);
-extern bool_t xdr_pmap_brick_by_port_rsp (XDR *, pmap_brick_by_port_rsp*);
-extern bool_t xdr_pmap_signup_req (XDR *, pmap_signup_req*);
-extern bool_t xdr_pmap_signup_rsp (XDR *, pmap_signup_rsp*);
-extern bool_t xdr_pmap_signin_req (XDR *, pmap_signin_req*);
-extern bool_t xdr_pmap_signin_rsp (XDR *, pmap_signin_rsp*);
-extern bool_t xdr_pmap_signout_req (XDR *, pmap_signout_req*);
-extern bool_t xdr_pmap_signout_rsp (XDR *, pmap_signout_rsp*);
-
-#else /* K&R C */
-extern bool_t xdr_pmap_port_by_brick_req ();
-extern bool_t xdr_pmap_port_by_brick_rsp ();
-extern bool_t xdr_pmap_brick_by_port_req ();
-extern bool_t xdr_pmap_brick_by_port_rsp ();
-extern bool_t xdr_pmap_signup_req ();
-extern bool_t xdr_pmap_signup_rsp ();
-extern bool_t xdr_pmap_signin_req ();
-extern bool_t xdr_pmap_signin_rsp ();
-extern bool_t xdr_pmap_signout_req ();
-extern bool_t xdr_pmap_signout_rsp ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_PORTMAP_XDR_H_RPCGEN */
diff --git a/rpc/xdr/src/rpc-common-xdr.c b/rpc/xdr/src/rpc-common-xdr.c
deleted file mode 100644
index 6cb48a9..0000000
--- a/rpc/xdr/src/rpc-common-xdr.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-#include "xdr-common.h"
-#include "compat.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ >= 4
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
-#endif
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#include "rpc-common-xdr.h"
-
-bool_t
-xdr_auth_glusterfs_parms_v2 (XDR *xdrs, auth_glusterfs_parms_v2 *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->pid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->uid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->gid))
- return FALSE;
-
- } else {
- IXDR_PUT_LONG(buf, objp->pid);
- IXDR_PUT_U_LONG(buf, objp->uid);
- IXDR_PUT_U_LONG(buf, objp->gid);
- }
- if (!xdr_array (xdrs, (char **)&objp->groups.groups_val, (u_int *) &objp->groups.groups_len, ~0,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->lk_owner.lk_owner_val, (u_int *) &objp->lk_owner.lk_owner_len, ~0))
- return FALSE;
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_int (xdrs, &objp->pid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->uid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->gid))
- return FALSE;
-
- } else {
- objp->pid = IXDR_GET_LONG(buf);
- objp->uid = IXDR_GET_U_LONG(buf);
- objp->gid = IXDR_GET_U_LONG(buf);
- }
- if (!xdr_array (xdrs, (char **)&objp->groups.groups_val, (u_int *) &objp->groups.groups_len, ~0,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->lk_owner.lk_owner_val, (u_int *) &objp->lk_owner.lk_owner_len, ~0))
- return FALSE;
- return TRUE;
- }
-
- if (!xdr_int (xdrs, &objp->pid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->uid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->gid))
- return FALSE;
- if (!xdr_array (xdrs, (char **)&objp->groups.groups_val, (u_int *) &objp->groups.groups_len, ~0,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- if (!xdr_bytes (xdrs, (char **)&objp->lk_owner.lk_owner_val, (u_int *) &objp->lk_owner.lk_owner_len, ~0))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_auth_glusterfs_parms (XDR *xdrs, auth_glusterfs_parms *objp)
-{
- register int32_t *buf;
- int i;
- buf = NULL;
-
-
- if (xdrs->x_op == XDR_ENCODE) {
- if (!xdr_u_quad_t (xdrs, &objp->lk_owner))
- return FALSE;
- buf = XDR_INLINE (xdrs, (4 + 16 )* BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_u_int (xdrs, &objp->pid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->uid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->gid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->ngrps))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->groups, 16,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- } else {
- IXDR_PUT_U_LONG(buf, objp->pid);
- IXDR_PUT_U_LONG(buf, objp->uid);
- IXDR_PUT_U_LONG(buf, objp->gid);
- IXDR_PUT_U_LONG(buf, objp->ngrps);
- {
- register u_int *genp;
-
- for (i = 0, genp = objp->groups;
- i < 16; ++i) {
- IXDR_PUT_U_LONG(buf, *genp++);
- }
- }
- }
- return TRUE;
- } else if (xdrs->x_op == XDR_DECODE) {
- if (!xdr_u_quad_t (xdrs, &objp->lk_owner))
- return FALSE;
- buf = XDR_INLINE (xdrs, (4 + 16 )* BYTES_PER_XDR_UNIT);
- if (buf == NULL) {
- if (!xdr_u_int (xdrs, &objp->pid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->uid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->gid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->ngrps))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->groups, 16,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- } else {
- objp->pid = IXDR_GET_U_LONG(buf);
- objp->uid = IXDR_GET_U_LONG(buf);
- objp->gid = IXDR_GET_U_LONG(buf);
- objp->ngrps = IXDR_GET_U_LONG(buf);
- {
- register u_int *genp;
-
- for (i = 0, genp = objp->groups;
- i < 16; ++i) {
- *genp++ = IXDR_GET_U_LONG(buf);
- }
- }
- }
- return TRUE;
- }
-
- if (!xdr_u_quad_t (xdrs, &objp->lk_owner))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->pid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->uid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->gid))
- return FALSE;
- if (!xdr_u_int (xdrs, &objp->ngrps))
- return FALSE;
- if (!xdr_vector (xdrs, (char *)objp->groups, 16,
- sizeof (u_int), (xdrproc_t) xdr_u_int))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf_dump_req (XDR *xdrs, gf_dump_req *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf_prog_detail (XDR *xdrs, gf_prog_detail *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_string (xdrs, &objp->progname, ~0))
- return FALSE;
- if (!xdr_u_quad_t (xdrs, &objp->prognum))
- return FALSE;
- if (!xdr_u_quad_t (xdrs, &objp->progver))
- return FALSE;
- if (!xdr_pointer (xdrs, (char **)&objp->next, sizeof (gf_prog_detail), (xdrproc_t) xdr_gf_prog_detail))
- return FALSE;
- return TRUE;
-}
-
-bool_t
-xdr_gf_dump_rsp (XDR *xdrs, gf_dump_rsp *objp)
-{
- register int32_t *buf;
- buf = NULL;
-
- if (!xdr_u_quad_t (xdrs, &objp->gfs_id))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_ret))
- return FALSE;
- if (!xdr_int (xdrs, &objp->op_errno))
- return FALSE;
- if (!xdr_pointer (xdrs, (char **)&objp->prog, sizeof (gf_prog_detail), (xdrproc_t) xdr_gf_prog_detail))
- return FALSE;
- return TRUE;
-}
diff --git a/rpc/xdr/src/rpc-common-xdr.h b/rpc/xdr/src/rpc-common-xdr.h
deleted file mode 100644
index c43eab3..0000000
--- a/rpc/xdr/src/rpc-common-xdr.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com>
- This file is part of GlusterFS.
-
- This file is licensed to you under your choice of the GNU Lesser
- General Public License, version 3 or any later version (LGPLv3 or
- later), or the GNU General Public License, version 2 (GPLv2), in all
- cases as published by the Free Software Foundation.
-*/
-
-#include "xdr-common.h"
-#include "compat.h"
-
-#if defined(__GNUC__)
-#if __GNUC__ >= 4
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-#endif
-#endif
-
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
-
-#ifndef _RPC_COMMON_XDR_H_RPCGEN
-#define _RPC_COMMON_XDR_H_RPCGEN
-
-#include <rpc/rpc.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-struct auth_glusterfs_parms_v2 {
- int pid;
- u_int uid;
- u_int gid;
- struct {
- u_int groups_len;
- u_int *groups_val;
- } groups;
- struct {
- u_int lk_owner_len;
- char *lk_owner_val;
- } lk_owner;
-};
-typedef struct auth_glusterfs_parms_v2 auth_glusterfs_parms_v2;
-
-struct auth_glusterfs_parms {
- u_quad_t lk_owner;
- u_int pid;
- u_int uid;
- u_int gid;
- u_int ngrps;
- u_int groups[16];
-};
-typedef struct auth_glusterfs_parms auth_glusterfs_parms;
-
-struct gf_dump_req {
- u_quad_t gfs_id;
-};
-typedef struct gf_dump_req gf_dump_req;
-
-struct gf_prog_detail {
- char *progname;
- u_quad_t prognum;
- u_quad_t progver;
- struct gf_prog_detail *next;
-};
-typedef struct gf_prog_detail gf_prog_detail;
-
-struct gf_dump_rsp {
- u_quad_t gfs_id;
- int op_ret;
- int op_errno;
- struct gf_prog_detail *prog;
-};
-typedef struct gf_dump_rsp gf_dump_rsp;
-
-/* the xdr functions */
-
-#if defined(__STDC__) || defined(__cplusplus)
-extern bool_t xdr_auth_glusterfs_parms_v2 (XDR *, auth_glusterfs_parms_v2*);
-extern bool_t xdr_auth_glusterfs_parms (XDR *, auth_glusterfs_parms*);
-extern bool_t xdr_gf_dump_req (XDR *, gf_dump_req*);
-extern bool_t xdr_gf_prog_detail (XDR *, gf_prog_detail*);
-extern bool_t xdr_gf_dump_rsp (XDR *, gf_dump_rsp*);
-
-#else /* K&R C */
-extern bool_t xdr_auth_glusterfs_parms_v2 ();
-extern bool_t xdr_auth_glusterfs_parms ();
-extern bool_t xdr_gf_dump_req ();
-extern bool_t xdr_gf_prog_detail ();
-extern bool_t xdr_gf_dump_rsp ();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* !_RPC_COMMON_XDR_H_RPCGEN */
diff --git a/rpc/xdr/src/rpc-common-xdr.x b/rpc/xdr/src/rpc-common-xdr.x
index ca28f38..ee66500 100644
--- a/rpc/xdr/src/rpc-common-xdr.x
+++ b/rpc/xdr/src/rpc-common-xdr.x
@@ -10,7 +10,7 @@ struct auth_glusterfs_parms_v2 {
};
struct auth_glusterfs_parms {
- unsigned hyper lk_owner;
+ u_quad_t lk_owner;
unsigned int pid;
unsigned int uid;
unsigned int gid;
@@ -19,20 +19,20 @@ struct auth_glusterfs_parms {
};
struct gf_dump_req {
- unsigned hyper gfs_id;
+ u_quad_t gfs_id;
};
struct gf_prog_detail {
string progname<>;
- unsigned hyper prognum;
- unsigned hyper progver;
+ u_quad_t prognum;
+ u_quad_t progver;
struct gf_prog_detail *next;
};
struct gf_dump_rsp {
- unsigned hyper gfs_id;
+ u_quad_t gfs_id;
int op_ret;
int op_errno;
struct gf_prog_detail *prog;
diff --git a/rpc/xdr/src/xdr-generic.c b/rpc/xdr/src/xdr-generic.c
index 58d1ee7..ee29f3d 100644
--- a/rpc/xdr/src/xdr-generic.c
+++ b/rpc/xdr/src/xdr-generic.c
@@ -24,7 +24,7 @@ xdr_serialize_generic (struct iovec outmsg, void *res, xdrproc_t proc)
xdrmem_create (&xdr, outmsg.iov_base, (unsigned int)outmsg.iov_len,
XDR_ENCODE);
- if (!proc (&xdr, res)) {
+ if (!proc (&xdr, res, 0)) {
ret = -1;
goto ret;
}
@@ -48,7 +48,7 @@ xdr_to_generic (struct iovec inmsg, void *args, xdrproc_t proc)
xdrmem_create (&xdr, inmsg.iov_base, (unsigned int)inmsg.iov_len,
XDR_DECODE);
- if (!proc (&xdr, args)) {
+ if (!proc (&xdr, args, 0)) {
ret = -1;
goto ret;
}
@@ -72,7 +72,7 @@ xdr_to_generic_payload (struct iovec inmsg, void *args, xdrproc_t proc,
xdrmem_create (&xdr, inmsg.iov_base, (unsigned int)inmsg.iov_len,
XDR_DECODE);
- if (!proc (&xdr, args)) {
+ if (!proc (&xdr, args, 0)) {
ret = -1;
goto ret;
}
diff --git a/rpc/xdr/src/xdr-generic.h b/rpc/xdr/src/xdr-generic.h
index bb3759b..2547d7e 100644
--- a/rpc/xdr/src/xdr-generic.h
+++ b/rpc/xdr/src/xdr-generic.h
@@ -12,7 +12,6 @@
#define _XDR_GENERIC_H
#include <sys/uio.h>
-//#include <rpc/rpc.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
diff --git a/rpc/xdr/src/xdr-nfs3.c b/rpc/xdr/src/xdr-nfs3.c
index a497e9f..2be8392 100644
--- a/rpc/xdr/src/xdr-nfs3.c
+++ b/rpc/xdr/src/xdr-nfs3.c
@@ -12,13 +12,6 @@
#include "mem-pool.h"
#include "xdr-common.h"
-#if GF_DARWIN_HOST_OS
-#define xdr_u_quad_t xdr_u_int64_t
-#define xdr_quad_t xdr_int64_t
-#define xdr_uint32_t xdr_u_int32_t
-#define xdr_uint64_t xdr_u_int64_t
-#endif
-
bool_t
xdr_uint64 (XDR *xdrs, uint64 *objp)
{
@@ -1884,5 +1877,3 @@ xdr_free_write3args_nocopy (write3args *wa)
FREE (wa->file.data.data_val);
}
-
-
diff --git a/rpc/xdr/src/xdr-nfs3.h b/rpc/xdr/src/xdr-nfs3.h
index 6f6b0e1..3861771 100644
--- a/rpc/xdr/src/xdr-nfs3.h
+++ b/rpc/xdr/src/xdr-nfs3.h
@@ -95,6 +95,7 @@ enum nfsstat3 {
NFS3ERR_SERVERFAULT = 10006,
NFS3ERR_BADTYPE = 10007,
NFS3ERR_JUKEBOX = 10008,
+ NFS3ERR_END_OF_LIST = -1,
};
typedef enum nfsstat3 nfsstat3;