diff options
author | Harshavardhana <harsha@harshavardhana.net> | 2014-04-22 13:27:35 -0700 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2014-04-25 13:29:25 -0700 |
commit | 9819fcedf10f1430d4969c86e6df4dfe975b7dcf (patch) | |
tree | a4ce5b4d8e5666fe6dd66147b5a360670bf51363 | |
parent | 40675af8b4a1a90331e353295c75c0ea63457cf6 (diff) |
rpcgen: Remove autogenerated files instead build on demand
Avoid modifying autogenerated files and keeping them in
repository - autogenerate them on demand from ".x" files
Change-Id: I2cdb1fe9b99768ceb80a8cb100fa00bd1d8fe2c6
BUG: 1090807
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7526
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
36 files changed, 165 insertions, 7371 deletions
diff --git a/Makefile.am b/Makefile.am index b42071db2eb..41859a2eaef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,7 @@ EXTRA_DIST = autogen.sh \ error-codes.json gf-error-codes.h.template \ gen-headers.py run-tests.sh \ build-aux/pkg-version \ + build-aux/xdrgen \ contrib/argp-standalone \ $(shell find $(top_srcdir)/tests -type f -print) diff --git a/extras/generate-xdr-files.sh b/build-aux/xdrgen index bc02f77c9df..dd5571baad6 100755 --- a/extras/generate-xdr-files.sh +++ b/build-aux/xdrgen @@ -3,7 +3,6 @@ _init () { xfile="$1"; - # TODO: check the validity of .x file cfile="${1%.x}.c"; hfile="${1%.x}.h"; @@ -22,7 +21,7 @@ append_licence_header () cat >$dst_file <<EOF /* - Copyright (c) 2007-2012 Red Hat, Inc. <http://www.redhat.com> + Copyright (c) 2007-2014 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 @@ -31,12 +30,14 @@ append_licence_header () cases as published by the Free Software Foundation. */ -#include "xdr-common.h" #include "compat.h" +#include "xdr-common.h" +#include "xdr-nfs3.h" #if defined(__GNUC__) #if __GNUC__ >= 4 #pragma GCC diagnostic ignored "-Wunused-but-set-variable" +#pragma GCC diagnostic ignored "-Wunused-variable" #endif #endif @@ -59,12 +60,6 @@ main () rm -f $tmp_cfile; rpcgen -c -o $tmp_cfile $xfile; - # get rid of warnings in xdr .c file due to "unused variable 'buf'" - sed -i -e 's:buf;$:buf;\ - buf = NULL;:' $tmp_cfile; - - sed -i '/int i;/d' $tmp_cfile; - echo "OK"; # no need for a temporary file here as there are no changes from glusterfs diff --git a/configure.ac b/configure.ac index ae945b29109..ae0bc78c4b5 100644 --- a/configure.ac +++ b/configure.ac @@ -203,6 +203,11 @@ AC_PROG_CC AC_DISABLE_STATIC AC_PROG_LIBTOOL +AC_CHECK_PROG([RPCGEN], [rpcgen], [yes], [no]) + +if test "x$RPCGEN" = "xno"; then + AC_MSG_ERROR([`rpcgen` not found, glusterfs needs `rpcgen` exiting..]) +fi # Initialize CFLAGS before usage AC_ARG_ENABLE([debug], diff --git a/rpc/Makefile.am b/rpc/Makefile.am index ffb76e901fc..183b7a0352f 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/xdr-common.h b/rpc/rpc-lib/src/xdr-common.h index 78c72e509ef..631f4b284ad 100644 --- a/rpc/rpc-lib/src/xdr-common.h +++ b/rpc/rpc-lib/src/xdr-common.h @@ -64,12 +64,17 @@ 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 @@ -80,13 +85,11 @@ unsigned long xdr_sizeof (xdrproc_t func, void *data); #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/xdr/src/.gitignore b/rpc/xdr/src/.gitignore new file mode 100644 index 00000000000..407f135c5df --- /dev/null +++ b/rpc/xdr/src/.gitignore @@ -0,0 +1,18 @@ +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 diff --git a/rpc/xdr/src/Makefile.am b/rpc/xdr/src/Makefile.am index 0ec96e464ba..e39c677a955 100644 --- a/rpc/xdr/src/Makefile.am +++ b/rpc/xdr/src/Makefile.am @@ -5,23 +5,22 @@ 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 + +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 +XDRHEADERS = glusterfs3-xdr.h cli1-xdr.h nlm4-xdr.h nsm-xdr.h \ + rpc-common-xdr.h glusterd1-xdr.h acl3-xdr.h portmap-xdr.h + +%.h:%.x + $(top_srcdir)/build-aux/xdrgen $(top_srcdir)/rpc/xdr/src/$*.x +%.c:%.x + $(top_srcdir)/build-aux/xdrgen $(top_srcdir)/rpc/xdr/src/$*.x + +CLEANFILES = $(XDRSOURCES) $(XDRHEADERS) diff --git a/rpc/xdr/src/acl3-xdr.c b/rpc/xdr/src/acl3-xdr.c deleted file mode 100644 index 8fbaeff160c..00000000000 --- 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 7cebaed6908..00000000000 --- 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 6cf4f1d3b61..8ca6e84b525 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 cbb248587c9..00000000000 --- 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 f4251e6a2e3..00000000000 --- 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 6e5e4441055..0e4e0376e88 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 7fa98aaebc7..00000000000 --- 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 b6be23d061c..00000000000 --- 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.c b/rpc/xdr/src/glusterfs3-xdr.c deleted file mode 100644 index 3205c551e5b..00000000000 --- a/rpc/xdr/src/glusterfs3-xdr.c +++ /dev/null @@ -1,2058 +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 "glusterfs3-xdr.h" - -bool_t -xdr_gf_statfs (XDR *xdrs, gf_statfs *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_u_quad_t (xdrs, &objp->bsize)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->frsize)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->blocks)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->bfree)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->bavail)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->files)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ffree)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->favail)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->fsid)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->flag)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->namemax)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_proto_flock (XDR *xdrs, gf_proto_flock *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_u_int (xdrs, &objp->type)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->whence)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->start)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->len)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->pid)) - 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_gf_iatt (XDR *xdrs, gf_iatt *objp) -{ - register int32_t *buf; - buf = NULL; - - - if (xdrs->x_op == XDR_ENCODE) { - if (!xdr_opaque (xdrs, objp->ia_gfid, 16)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_dev)) - return FALSE; - buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_nlink)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_uid)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_gid)) - return FALSE; - - } else { - IXDR_PUT_U_LONG(buf, objp->mode); - IXDR_PUT_U_LONG(buf, objp->ia_nlink); - IXDR_PUT_U_LONG(buf, objp->ia_uid); - IXDR_PUT_U_LONG(buf, objp->ia_gid); - } - if (!xdr_u_quad_t (xdrs, &objp->ia_rdev)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_size)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_blksize)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_blocks)) - return FALSE; - buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - if (!xdr_u_int (xdrs, &objp->ia_atime)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_atime_nsec)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_mtime)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_mtime_nsec)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_ctime)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_ctime_nsec)) - return FALSE; - } else { - IXDR_PUT_U_LONG(buf, objp->ia_atime); - IXDR_PUT_U_LONG(buf, objp->ia_atime_nsec); - IXDR_PUT_U_LONG(buf, objp->ia_mtime); - IXDR_PUT_U_LONG(buf, objp->ia_mtime_nsec); - IXDR_PUT_U_LONG(buf, objp->ia_ctime); - IXDR_PUT_U_LONG(buf, objp->ia_ctime_nsec); - } - return TRUE; - } else if (xdrs->x_op == XDR_DECODE) { - if (!xdr_opaque (xdrs, objp->ia_gfid, 16)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_dev)) - return FALSE; - buf = XDR_INLINE (xdrs, 4 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_nlink)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_uid)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_gid)) - return FALSE; - - } else { - objp->mode = IXDR_GET_U_LONG(buf); - objp->ia_nlink = IXDR_GET_U_LONG(buf); - objp->ia_uid = IXDR_GET_U_LONG(buf); - objp->ia_gid = IXDR_GET_U_LONG(buf); - } - if (!xdr_u_quad_t (xdrs, &objp->ia_rdev)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_size)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_blksize)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_blocks)) - return FALSE; - buf = XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - if (!xdr_u_int (xdrs, &objp->ia_atime)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_atime_nsec)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_mtime)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_mtime_nsec)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_ctime)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_ctime_nsec)) - return FALSE; - } else { - objp->ia_atime = IXDR_GET_U_LONG(buf); - objp->ia_atime_nsec = IXDR_GET_U_LONG(buf); - objp->ia_mtime = IXDR_GET_U_LONG(buf); - objp->ia_mtime_nsec = IXDR_GET_U_LONG(buf); - objp->ia_ctime = IXDR_GET_U_LONG(buf); - objp->ia_ctime_nsec = IXDR_GET_U_LONG(buf); - } - return TRUE; - } - - if (!xdr_opaque (xdrs, objp->ia_gfid, 16)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_dev)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_nlink)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_uid)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_gid)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_rdev)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_size)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_blksize)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_blocks)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_atime)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_atime_nsec)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_mtime)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_mtime_nsec)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_ctime)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->ia_ctime_nsec)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_stat_req (XDR *xdrs, gfs3_stat_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_stat_rsp (XDR *xdrs, gfs3_stat_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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_readlink_req (XDR *xdrs, gfs3_readlink_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_readlink_rsp (XDR *xdrs, gfs3_readlink_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_gf_iatt (xdrs, &objp->buf)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_mknod_req (XDR *xdrs, gfs3_mknod_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->pargfid, 16)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->dev)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->umask)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_mknod_rsp (XDR *xdrs, gfs3_mknod_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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->preparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_mkdir_req (XDR *xdrs, gfs3_mkdir_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->pargfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->umask)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_mkdir_rsp (XDR *xdrs, gfs3_mkdir_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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->preparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_unlink_req (XDR *xdrs, gfs3_unlink_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->pargfid, 16)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->xflags)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_unlink_rsp (XDR *xdrs, gfs3_unlink_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_gf_iatt (xdrs, &objp->preparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_rmdir_req (XDR *xdrs, gfs3_rmdir_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->pargfid, 16)) - return FALSE; - if (!xdr_int (xdrs, &objp->xflags)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_rmdir_rsp (XDR *xdrs, gfs3_rmdir_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_gf_iatt (xdrs, &objp->preparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_symlink_req (XDR *xdrs, gfs3_symlink_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->pargfid, 16)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->umask)) - return FALSE; - if (!xdr_string (xdrs, &objp->linkname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_symlink_rsp (XDR *xdrs, gfs3_symlink_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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->preparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_rename_req (XDR *xdrs, gfs3_rename_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->oldgfid, 16)) - return FALSE; - if (!xdr_opaque (xdrs, objp->newgfid, 16)) - return FALSE; - if (!xdr_string (xdrs, &objp->oldbname, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->newbname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_rename_rsp (XDR *xdrs, gfs3_rename_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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->preoldparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postoldparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->prenewparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postnewparent)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_link_req (XDR *xdrs, gfs3_link_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->oldgfid, 16)) - return FALSE; - if (!xdr_opaque (xdrs, objp->newgfid, 16)) - return FALSE; - if (!xdr_string (xdrs, &objp->newbname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_link_rsp (XDR *xdrs, gfs3_link_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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->preparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_truncate_req (XDR *xdrs, gfs3_truncate_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_truncate_rsp (XDR *xdrs, gfs3_truncate_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_gf_iatt (xdrs, &objp->prestat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->poststat)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_open_req (XDR *xdrs, gfs3_open_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_open_rsp (XDR *xdrs, gfs3_open_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_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_read_req (XDR *xdrs, gfs3_read_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->size)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flag)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_read_rsp (XDR *xdrs, gfs3_read_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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_lookup_req (XDR *xdrs, gfs3_lookup_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_opaque (xdrs, objp->pargfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_lookup_rsp (XDR *xdrs, gfs3_lookup_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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_write_req (XDR *xdrs, gfs3_write_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->size)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flag)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_write_rsp (XDR *xdrs, gfs3_write_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_gf_iatt (xdrs, &objp->prestat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->poststat)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_statfs_req (XDR *xdrs, gfs3_statfs_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_statfs_rsp (XDR *xdrs, gfs3_statfs_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_gf_statfs (xdrs, &objp->statfs)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_lk_req (XDR *xdrs, gfs3_lk_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->cmd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->type)) - return FALSE; - if (!xdr_gf_proto_flock (xdrs, &objp->flock)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_lk_rsp (XDR *xdrs, gfs3_lk_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_gf_proto_flock (xdrs, &objp->flock)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_inodelk_req (XDR *xdrs, gfs3_inodelk_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->cmd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->type)) - return FALSE; - if (!xdr_gf_proto_flock (xdrs, &objp->flock)) - return FALSE; - if (!xdr_string (xdrs, &objp->volume, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_finodelk_req (XDR *xdrs, gfs3_finodelk_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->cmd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->type)) - return FALSE; - if (!xdr_gf_proto_flock (xdrs, &objp->flock)) - return FALSE; - if (!xdr_string (xdrs, &objp->volume, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_flush_req (XDR *xdrs, gfs3_flush_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsync_req (XDR *xdrs, gfs3_fsync_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->data)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsync_rsp (XDR *xdrs, gfs3_fsync_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_gf_iatt (xdrs, &objp->prestat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->poststat)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_setxattr_req (XDR *xdrs, gfs3_setxattr_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsetxattr_req (XDR *xdrs, gfs3_fsetxattr_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_xattrop_req (XDR *xdrs, gfs3_xattrop_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_xattrop_rsp (XDR *xdrs, gfs3_xattrop_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->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fxattrop_req (XDR *xdrs, gfs3_fxattrop_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fxattrop_rsp (XDR *xdrs, gfs3_fxattrop_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->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_getxattr_req (XDR *xdrs, gfs3_getxattr_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->namelen)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_getxattr_rsp (XDR *xdrs, gfs3_getxattr_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->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fgetxattr_req (XDR *xdrs, gfs3_fgetxattr_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->namelen)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fgetxattr_rsp (XDR *xdrs, gfs3_fgetxattr_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->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_removexattr_req (XDR *xdrs, gfs3_removexattr_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fremovexattr_req (XDR *xdrs, gfs3_fremovexattr_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_opendir_req (XDR *xdrs, gfs3_opendir_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_opendir_rsp (XDR *xdrs, gfs3_opendir_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_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsyncdir_req (XDR *xdrs, gfs3_fsyncdir_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_int (xdrs, &objp->data)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_readdir_req (XDR *xdrs, gfs3_readdir_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_readdirp_req (XDR *xdrs, gfs3_readdirp_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->size)) - 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_gfs3_access_req (XDR *xdrs, gfs3_access_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mask)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_create_req (XDR *xdrs, gfs3_create_req *objp) -{ - register int32_t *buf; - buf = NULL; - - - if (xdrs->x_op == XDR_ENCODE) { - if (!xdr_opaque (xdrs, objp->pargfid, 16)) - return FALSE; - buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->umask)) - return FALSE; - - } else { - IXDR_PUT_U_LONG(buf, objp->flags); - IXDR_PUT_U_LONG(buf, objp->mode); - IXDR_PUT_U_LONG(buf, objp->umask); - } - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; - } else if (xdrs->x_op == XDR_DECODE) { - if (!xdr_opaque (xdrs, objp->pargfid, 16)) - return FALSE; - buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT); - if (buf == NULL) { - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->umask)) - return FALSE; - - } else { - objp->flags = IXDR_GET_U_LONG(buf); - objp->mode = IXDR_GET_U_LONG(buf); - objp->umask = IXDR_GET_U_LONG(buf); - } - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; - } - - if (!xdr_opaque (xdrs, objp->pargfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->umask)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_create_rsp (XDR *xdrs, gfs3_create_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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->preparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_ftruncate_req (XDR *xdrs, gfs3_ftruncate_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_ftruncate_rsp (XDR *xdrs, gfs3_ftruncate_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_gf_iatt (xdrs, &objp->prestat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->poststat)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fstat_req (XDR *xdrs, gfs3_fstat_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fstat_rsp (XDR *xdrs, gfs3_fstat_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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_entrylk_req (XDR *xdrs, gfs3_entrylk_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->cmd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->type)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->namelen)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->volume, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fentrylk_req (XDR *xdrs, gfs3_fentrylk_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->cmd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->type)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->namelen)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->volume, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_setattr_req (XDR *xdrs, gfs3_setattr_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->stbuf)) - return FALSE; - if (!xdr_int (xdrs, &objp->valid)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_setattr_rsp (XDR *xdrs, gfs3_setattr_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_gf_iatt (xdrs, &objp->statpre)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->statpost)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsetattr_req (XDR *xdrs, gfs3_fsetattr_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->stbuf)) - return FALSE; - if (!xdr_int (xdrs, &objp->valid)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsetattr_rsp (XDR *xdrs, gfs3_fsetattr_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_gf_iatt (xdrs, &objp->statpre)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->statpost)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fallocate_req (XDR *xdrs, gfs3_fallocate_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fallocate_rsp (XDR *xdrs, gfs3_fallocate_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_gf_iatt (xdrs, &objp->statpre)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->statpost)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_discard_req (XDR *xdrs, gfs3_discard_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_discard_rsp (XDR *xdrs, gfs3_discard_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_gf_iatt (xdrs, &objp->statpre)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->statpost)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_zerofill_req (XDR *xdrs, gfs3_zerofill_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->size)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, - (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_zerofill_rsp (XDR *xdrs, gfs3_zerofill_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_gf_iatt (xdrs, &objp->statpre)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->statpost)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, - (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - - -bool_t -xdr_gfs3_rchecksum_req (XDR *xdrs, gfs3_rchecksum_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->len)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_rchecksum_rsp (XDR *xdrs, gfs3_rchecksum_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_u_int (xdrs, &objp->weak_checksum)) - return FALSE; - - } else { - IXDR_PUT_LONG(buf, objp->op_ret); - IXDR_PUT_LONG(buf, objp->op_errno); - IXDR_PUT_U_LONG(buf, objp->weak_checksum); - } - if (!xdr_bytes (xdrs, (char **)&objp->strong_checksum.strong_checksum_val, (u_int *) &objp->strong_checksum.strong_checksum_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_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->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->weak_checksum)) - return FALSE; - - } else { - objp->op_ret = IXDR_GET_LONG(buf); - objp->op_errno = IXDR_GET_LONG(buf); - objp->weak_checksum = IXDR_GET_U_LONG(buf); - } - if (!xdr_bytes (xdrs, (char **)&objp->strong_checksum.strong_checksum_val, (u_int *) &objp->strong_checksum.strong_checksum_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~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_u_int (xdrs, &objp->weak_checksum)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->strong_checksum.strong_checksum_val, (u_int *) &objp->strong_checksum.strong_checksum_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_setvolume_req (XDR *xdrs, gf_setvolume_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_setvolume_rsp (XDR *xdrs, gf_setvolume_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->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_getspec_req (XDR *xdrs, gf_getspec_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_string (xdrs, &objp->key, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_getspec_rsp (XDR *xdrs, gf_getspec_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->spec, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_mgmt_hndsk_req (XDR *xdrs, gf_mgmt_hndsk_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_bytes (xdrs, (char **)&objp->hndsk.hndsk_val, (u_int *) &objp->hndsk.hndsk_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_mgmt_hndsk_rsp (XDR *xdrs, gf_mgmt_hndsk_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->hndsk.hndsk_val, (u_int *) &objp->hndsk.hndsk_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_log_req (XDR *xdrs, gf_log_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_bytes (xdrs, (char **)&objp->msg.msg_val, (u_int *) &objp->msg.msg_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_notify_req (XDR *xdrs, gf_notify_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_string (xdrs, &objp->buf, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_notify_rsp (XDR *xdrs, gf_notify_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_u_int (xdrs, &objp->flags)) - return FALSE; - - } else { - IXDR_PUT_LONG(buf, objp->op_ret); - IXDR_PUT_LONG(buf, objp->op_errno); - IXDR_PUT_U_LONG(buf, objp->flags); - } - if (!xdr_string (xdrs, &objp->buf, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_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->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - - } else { - objp->op_ret = IXDR_GET_LONG(buf); - objp->op_errno = IXDR_GET_LONG(buf); - objp->flags = IXDR_GET_U_LONG(buf); - } - if (!xdr_string (xdrs, &objp->buf, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~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_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_string (xdrs, &objp->buf, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_releasedir_req (XDR *xdrs, gfs3_releasedir_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_release_req (XDR *xdrs, gfs3_release_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_opaque (xdrs, objp->gfid, 16)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_common_rsp (XDR *xdrs, gf_common_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->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_dirlist (XDR *xdrs, gfs3_dirlist *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_u_quad_t (xdrs, &objp->d_ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->d_off)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->d_len)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->d_type)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->nextentry, sizeof (gfs3_dirlist), (xdrproc_t) xdr_gfs3_dirlist)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_readdir_rsp (XDR *xdrs, gfs3_readdir_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_pointer (xdrs, (char **)&objp->reply, sizeof (gfs3_dirlist), (xdrproc_t) xdr_gfs3_dirlist)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_dirplist (XDR *xdrs, gfs3_dirplist *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_u_quad_t (xdrs, &objp->d_ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->d_off)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->d_len)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->d_type)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - if (!xdr_pointer (xdrs, (char **)&objp->nextentry, sizeof (gfs3_dirplist), (xdrproc_t) xdr_gfs3_dirplist)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_readdirp_rsp (XDR *xdrs, gfs3_readdirp_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_pointer (xdrs, (char **)&objp->reply, sizeof (gfs3_dirplist), (xdrproc_t) xdr_gfs3_dirplist)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->xdata.xdata_val, (u_int *) &objp->xdata.xdata_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_set_lk_ver_rsp (XDR *xdrs, gf_set_lk_ver_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_int (xdrs, &objp->lk_ver)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_set_lk_ver_req (XDR *xdrs, gf_set_lk_ver_req *objp) -{ - register int32_t *buf; - buf = NULL; - - if (!xdr_string (xdrs, &objp->uid, ~0)) - return FALSE; - if (!xdr_int (xdrs, &objp->lk_ver)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_event_notify_req (XDR *xdrs, gf_event_notify_req *objp) -{ - register int32_t *buf; - buf = NULL; - - 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_gf_event_notify_rsp (XDR *xdrs, gf_event_notify_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->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - return TRUE; -} diff --git a/rpc/xdr/src/glusterfs3-xdr.h b/rpc/xdr/src/glusterfs3-xdr.h deleted file mode 100644 index 13566e69447..00000000000 --- a/rpc/xdr/src/glusterfs3-xdr.h +++ /dev/null @@ -1,1394 +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 _GLUSTERFS3_XDR_H_RPCGEN -#define _GLUSTERFS3_XDR_H_RPCGEN - -#include <rpc/rpc.h> - - -#ifdef __cplusplus -extern "C" { -#endif - - -struct gf_statfs { - 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; -}; -typedef struct gf_statfs gf_statfs; - -struct gf_proto_flock { - u_int type; - u_int whence; - u_quad_t start; - u_quad_t len; - u_int pid; - struct { - u_int lk_owner_len; - char *lk_owner_val; - } lk_owner; -}; -typedef struct gf_proto_flock gf_proto_flock; - -struct gf_iatt { - char ia_gfid[16]; - u_quad_t ia_ino; - u_quad_t ia_dev; - u_int mode; - u_int ia_nlink; - u_int ia_uid; - u_int ia_gid; - u_quad_t ia_rdev; - u_quad_t ia_size; - u_int ia_blksize; - u_quad_t ia_blocks; - u_int ia_atime; - u_int ia_atime_nsec; - u_int ia_mtime; - u_int ia_mtime_nsec; - u_int ia_ctime; - u_int ia_ctime_nsec; -}; -typedef struct gf_iatt gf_iatt; - -struct gfs3_stat_req { - char gfid[16]; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_stat_req gfs3_stat_req; - -struct gfs3_stat_rsp { - int op_ret; - int op_errno; - struct gf_iatt stat; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_stat_rsp gfs3_stat_rsp; - -struct gfs3_readlink_req { - char gfid[16]; - u_int size; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_readlink_req gfs3_readlink_req; - -struct gfs3_readlink_rsp { - int op_ret; - int op_errno; - struct gf_iatt buf; - char *path; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_readlink_rsp gfs3_readlink_rsp; - -struct gfs3_mknod_req { - char pargfid[16]; - u_quad_t dev; - u_int mode; - u_int umask; - char *bname; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_mknod_req gfs3_mknod_req; - -struct gfs3_mknod_rsp { - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_mknod_rsp gfs3_mknod_rsp; - -struct gfs3_mkdir_req { - char pargfid[16]; - u_int mode; - u_int umask; - char *bname; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_mkdir_req gfs3_mkdir_req; - -struct gfs3_mkdir_rsp { - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_mkdir_rsp gfs3_mkdir_rsp; - -struct gfs3_unlink_req { - char pargfid[16]; - char *bname; - u_int xflags; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_unlink_req gfs3_unlink_req; - -struct gfs3_unlink_rsp { - int op_ret; - int op_errno; - struct gf_iatt preparent; - struct gf_iatt postparent; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_unlink_rsp gfs3_unlink_rsp; - -struct gfs3_rmdir_req { - char pargfid[16]; - int xflags; - char *bname; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_rmdir_req gfs3_rmdir_req; - -struct gfs3_rmdir_rsp { - int op_ret; - int op_errno; - struct gf_iatt preparent; - struct gf_iatt postparent; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_rmdir_rsp gfs3_rmdir_rsp; - -struct gfs3_symlink_req { - char pargfid[16]; - char *bname; - u_int umask; - char *linkname; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_symlink_req gfs3_symlink_req; - -struct gfs3_symlink_rsp { - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_symlink_rsp gfs3_symlink_rsp; - -struct gfs3_rename_req { - char oldgfid[16]; - char newgfid[16]; - char *oldbname; - char *newbname; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_rename_req gfs3_rename_req; - -struct gfs3_rename_rsp { - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preoldparent; - struct gf_iatt postoldparent; - struct gf_iatt prenewparent; - struct gf_iatt postnewparent; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_rename_rsp gfs3_rename_rsp; - -struct gfs3_link_req { - char oldgfid[16]; - char newgfid[16]; - char *newbname; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_link_req gfs3_link_req; - -struct gfs3_link_rsp { - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_link_rsp gfs3_link_rsp; - -struct gfs3_truncate_req { - char gfid[16]; - u_quad_t offset; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_truncate_req gfs3_truncate_req; - -struct gfs3_truncate_rsp { - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_truncate_rsp gfs3_truncate_rsp; - -struct gfs3_open_req { - char gfid[16]; - u_int flags; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_open_req gfs3_open_req; - -struct gfs3_open_rsp { - int op_ret; - int op_errno; - quad_t fd; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_open_rsp gfs3_open_rsp; - -struct gfs3_read_req { - char gfid[16]; - quad_t fd; - u_quad_t offset; - u_int size; - u_int flag; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_read_req gfs3_read_req; - -struct gfs3_read_rsp { - int op_ret; - int op_errno; - struct gf_iatt stat; - u_int size; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_read_rsp gfs3_read_rsp; - -struct gfs3_lookup_req { - char gfid[16]; - char pargfid[16]; - u_int flags; - char *bname; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_lookup_req gfs3_lookup_req; - -struct gfs3_lookup_rsp { - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt postparent; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_lookup_rsp gfs3_lookup_rsp; - -struct gfs3_write_req { - char gfid[16]; - quad_t fd; - u_quad_t offset; - u_int size; - u_int flag; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_write_req gfs3_write_req; - -struct gfs3_write_rsp { - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_write_rsp gfs3_write_rsp; - -struct gfs3_statfs_req { - char gfid[16]; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_statfs_req gfs3_statfs_req; - -struct gfs3_statfs_rsp { - int op_ret; - int op_errno; - struct gf_statfs statfs; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_statfs_rsp gfs3_statfs_rsp; - -struct gfs3_lk_req { - char gfid[16]; - quad_t fd; - u_int cmd; - u_int type; - struct gf_proto_flock flock; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_lk_req gfs3_lk_req; - -struct gfs3_lk_rsp { - int op_ret; - int op_errno; - struct gf_proto_flock flock; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_lk_rsp gfs3_lk_rsp; - -struct gfs3_inodelk_req { - char gfid[16]; - u_int cmd; - u_int type; - struct gf_proto_flock flock; - char *volume; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_inodelk_req gfs3_inodelk_req; - -struct gfs3_finodelk_req { - char gfid[16]; - quad_t fd; - u_int cmd; - u_int type; - struct gf_proto_flock flock; - char *volume; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_finodelk_req gfs3_finodelk_req; - -struct gfs3_flush_req { - char gfid[16]; - quad_t fd; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_flush_req gfs3_flush_req; - -struct gfs3_fsync_req { - char gfid[16]; - quad_t fd; - u_int data; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fsync_req gfs3_fsync_req; - -struct gfs3_fsync_rsp { - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fsync_rsp gfs3_fsync_rsp; - -struct gfs3_setxattr_req { - char gfid[16]; - u_int flags; - struct { - u_int dict_len; - char *dict_val; - } dict; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_setxattr_req gfs3_setxattr_req; - -struct gfs3_fsetxattr_req { - char gfid[16]; - quad_t fd; - u_int flags; - struct { - u_int dict_len; - char *dict_val; - } dict; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fsetxattr_req gfs3_fsetxattr_req; - -struct gfs3_xattrop_req { - char gfid[16]; - u_int flags; - struct { - u_int dict_len; - char *dict_val; - } dict; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_xattrop_req gfs3_xattrop_req; - -struct gfs3_xattrop_rsp { - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_xattrop_rsp gfs3_xattrop_rsp; - -struct gfs3_fxattrop_req { - char gfid[16]; - quad_t fd; - u_int flags; - struct { - u_int dict_len; - char *dict_val; - } dict; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fxattrop_req gfs3_fxattrop_req; - -struct gfs3_fxattrop_rsp { - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fxattrop_rsp gfs3_fxattrop_rsp; - -struct gfs3_getxattr_req { - char gfid[16]; - u_int namelen; - char *name; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_getxattr_req gfs3_getxattr_req; - -struct gfs3_getxattr_rsp { - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_getxattr_rsp gfs3_getxattr_rsp; - -struct gfs3_fgetxattr_req { - char gfid[16]; - quad_t fd; - u_int namelen; - char *name; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fgetxattr_req gfs3_fgetxattr_req; - -struct gfs3_fgetxattr_rsp { - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fgetxattr_rsp gfs3_fgetxattr_rsp; - -struct gfs3_removexattr_req { - char gfid[16]; - char *name; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_removexattr_req gfs3_removexattr_req; - -struct gfs3_fremovexattr_req { - char gfid[16]; - quad_t fd; - char *name; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fremovexattr_req gfs3_fremovexattr_req; - -struct gfs3_opendir_req { - char gfid[16]; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_opendir_req gfs3_opendir_req; - -struct gfs3_opendir_rsp { - int op_ret; - int op_errno; - quad_t fd; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_opendir_rsp gfs3_opendir_rsp; - -struct gfs3_fsyncdir_req { - char gfid[16]; - quad_t fd; - int data; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fsyncdir_req gfs3_fsyncdir_req; - -struct gfs3_readdir_req { - char gfid[16]; - quad_t fd; - u_quad_t offset; - u_int size; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_readdir_req gfs3_readdir_req; - -struct gfs3_readdirp_req { - char gfid[16]; - quad_t fd; - u_quad_t offset; - u_int size; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gfs3_readdirp_req gfs3_readdirp_req; - -struct gfs3_access_req { - char gfid[16]; - u_int mask; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_access_req gfs3_access_req; - -struct gfs3_create_req { - char pargfid[16]; - u_int flags; - u_int mode; - u_int umask; - char *bname; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_create_req gfs3_create_req; - -struct gfs3_create_rsp { - int op_ret; - int op_errno; - struct gf_iatt stat; - u_quad_t fd; - struct gf_iatt preparent; - struct gf_iatt postparent; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_create_rsp gfs3_create_rsp; - -struct gfs3_ftruncate_req { - char gfid[16]; - quad_t fd; - u_quad_t offset; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_ftruncate_req gfs3_ftruncate_req; - -struct gfs3_ftruncate_rsp { - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_ftruncate_rsp gfs3_ftruncate_rsp; - -struct gfs3_fstat_req { - char gfid[16]; - quad_t fd; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fstat_req gfs3_fstat_req; - -struct gfs3_fstat_rsp { - int op_ret; - int op_errno; - struct gf_iatt stat; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fstat_rsp gfs3_fstat_rsp; - -struct gfs3_entrylk_req { - char gfid[16]; - u_int cmd; - u_int type; - u_quad_t namelen; - char *name; - char *volume; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_entrylk_req gfs3_entrylk_req; - -struct gfs3_fentrylk_req { - char gfid[16]; - quad_t fd; - u_int cmd; - u_int type; - u_quad_t namelen; - char *name; - char *volume; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fentrylk_req gfs3_fentrylk_req; - -struct gfs3_setattr_req { - char gfid[16]; - struct gf_iatt stbuf; - int valid; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_setattr_req gfs3_setattr_req; - -struct gfs3_setattr_rsp { - int op_ret; - int op_errno; - struct gf_iatt statpre; - struct gf_iatt statpost; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_setattr_rsp gfs3_setattr_rsp; - -struct gfs3_fsetattr_req { - quad_t fd; - struct gf_iatt stbuf; - int valid; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fsetattr_req gfs3_fsetattr_req; - -struct gfs3_fsetattr_rsp { - int op_ret; - int op_errno; - struct gf_iatt statpre; - struct gf_iatt statpost; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fsetattr_rsp gfs3_fsetattr_rsp; - -struct gfs3_fallocate_req { - char gfid[16]; - quad_t fd; - u_int flags; - u_quad_t offset; - u_quad_t size; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fallocate_req gfs3_fallocate_req; - -struct gfs3_fallocate_rsp { - int op_ret; - int op_errno; - struct gf_iatt statpre; - struct gf_iatt statpost; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_fallocate_rsp gfs3_fallocate_rsp; - -struct gfs3_discard_req { - char gfid[16]; - quad_t fd; - u_quad_t offset; - u_quad_t size; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_discard_req gfs3_discard_req; - -struct gfs3_discard_rsp { - int op_ret; - int op_errno; - struct gf_iatt statpre; - struct gf_iatt statpost; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_discard_rsp gfs3_discard_rsp; - -struct gfs3_zerofill_req { - char gfid[16]; - quad_t fd; - u_quad_t offset; - u_quad_t size; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_zerofill_req gfs3_zerofill_req; - -struct gfs3_zerofill_rsp { - int op_ret; - int op_errno; - struct gf_iatt statpre; - struct gf_iatt statpost; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_zerofill_rsp gfs3_zerofill_rsp; - - -struct gfs3_rchecksum_req { - quad_t fd; - u_quad_t offset; - u_int len; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_rchecksum_req gfs3_rchecksum_req; - -struct gfs3_rchecksum_rsp { - int op_ret; - int op_errno; - u_int weak_checksum; - struct { - u_int strong_checksum_len; - char *strong_checksum_val; - } strong_checksum; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_rchecksum_rsp gfs3_rchecksum_rsp; - -struct gf_setvolume_req { - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gf_setvolume_req gf_setvolume_req; - -struct gf_setvolume_rsp { - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gf_setvolume_rsp gf_setvolume_rsp; - -struct gf_getspec_req { - u_int flags; - char *key; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gf_getspec_req gf_getspec_req; - -struct gf_getspec_rsp { - int op_ret; - int op_errno; - char *spec; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gf_getspec_rsp gf_getspec_rsp; - -struct gf_mgmt_hndsk_req { - struct { - u_int hndsk_len; - char *hndsk_val; - } hndsk; -}; -typedef struct gf_mgmt_hndsk_req gf_mgmt_hndsk_req; - -struct gf_mgmt_hndsk_rsp { - int op_ret; - int op_errno; - struct { - u_int hndsk_len; - char *hndsk_val; - } hndsk; -}; -typedef struct gf_mgmt_hndsk_rsp gf_mgmt_hndsk_rsp; - -struct gf_log_req { - struct { - u_int msg_len; - char *msg_val; - } msg; -}; -typedef struct gf_log_req gf_log_req; - -struct gf_notify_req { - u_int flags; - char *buf; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gf_notify_req gf_notify_req; - -struct gf_notify_rsp { - int op_ret; - int op_errno; - u_int flags; - char *buf; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gf_notify_rsp gf_notify_rsp; - -struct gfs3_releasedir_req { - char gfid[16]; - quad_t fd; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_releasedir_req gfs3_releasedir_req; - -struct gfs3_release_req { - char gfid[16]; - quad_t fd; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_release_req gfs3_release_req; - -struct gf_common_rsp { - int op_ret; - int op_errno; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gf_common_rsp gf_common_rsp; - -struct gfs3_dirlist { - u_quad_t d_ino; - u_quad_t d_off; - u_int d_len; - u_int d_type; - char *name; - struct gfs3_dirlist *nextentry; -}; -typedef struct gfs3_dirlist gfs3_dirlist; - -struct gfs3_readdir_rsp { - int op_ret; - int op_errno; - struct gfs3_dirlist *reply; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_readdir_rsp gfs3_readdir_rsp; - -struct gfs3_dirplist { - u_quad_t d_ino; - u_quad_t d_off; - u_int d_len; - u_int d_type; - char *name; - struct gf_iatt stat; - struct { - u_int dict_len; - char *dict_val; - } dict; - struct gfs3_dirplist *nextentry; -}; -typedef struct gfs3_dirplist gfs3_dirplist; - -struct gfs3_readdirp_rsp { - int op_ret; - int op_errno; - struct gfs3_dirplist *reply; - struct { - u_int xdata_len; - char *xdata_val; - } xdata; -}; -typedef struct gfs3_readdirp_rsp gfs3_readdirp_rsp; - -struct gf_set_lk_ver_rsp { - int op_ret; - int op_errno; - int lk_ver; -}; -typedef struct gf_set_lk_ver_rsp gf_set_lk_ver_rsp; - -struct gf_set_lk_ver_req { - char *uid; - int lk_ver; -}; -typedef struct gf_set_lk_ver_req gf_set_lk_ver_req; - -struct gf_event_notify_req { - int op; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gf_event_notify_req gf_event_notify_req; - -struct gf_event_notify_rsp { - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gf_event_notify_rsp gf_event_notify_rsp; - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_gf_statfs (XDR *, gf_statfs*); -extern bool_t xdr_gf_proto_flock (XDR *, gf_proto_flock*); -extern bool_t xdr_gf_iatt (XDR *, gf_iatt*); -extern bool_t xdr_gfs3_stat_req (XDR *, gfs3_stat_req*); -extern bool_t xdr_gfs3_stat_rsp (XDR *, gfs3_stat_rsp*); -extern bool_t xdr_gfs3_readlink_req (XDR *, gfs3_readlink_req*); -extern bool_t xdr_gfs3_readlink_rsp (XDR *, gfs3_readlink_rsp*); -extern bool_t xdr_gfs3_mknod_req (XDR *, gfs3_mknod_req*); -extern bool_t xdr_gfs3_mknod_rsp (XDR *, gfs3_mknod_rsp*); -extern bool_t xdr_gfs3_mkdir_req (XDR *, gfs3_mkdir_req*); -extern bool_t xdr_gfs3_mkdir_rsp (XDR *, gfs3_mkdir_rsp*); -extern bool_t xdr_gfs3_unlink_req (XDR *, gfs3_unlink_req*); -extern bool_t xdr_gfs3_unlink_rsp (XDR *, gfs3_unlink_rsp*); -extern bool_t xdr_gfs3_rmdir_req (XDR *, gfs3_rmdir_req*); -extern bool_t xdr_gfs3_rmdir_rsp (XDR *, gfs3_rmdir_rsp*); -extern bool_t xdr_gfs3_symlink_req (XDR *, gfs3_symlink_req*); -extern bool_t xdr_gfs3_symlink_rsp (XDR *, gfs3_symlink_rsp*); -extern bool_t xdr_gfs3_rename_req (XDR *, gfs3_rename_req*); -extern bool_t xdr_gfs3_rename_rsp (XDR *, gfs3_rename_rsp*); -extern bool_t xdr_gfs3_link_req (XDR *, gfs3_link_req*); -extern bool_t xdr_gfs3_link_rsp (XDR *, gfs3_link_rsp*); -extern bool_t xdr_gfs3_truncate_req (XDR *, gfs3_truncate_req*); -extern bool_t xdr_gfs3_truncate_rsp (XDR *, gfs3_truncate_rsp*); -extern bool_t xdr_gfs3_open_req (XDR *, gfs3_open_req*); -extern bool_t xdr_gfs3_open_rsp (XDR *, gfs3_open_rsp*); -extern bool_t xdr_gfs3_read_req (XDR *, gfs3_read_req*); -extern bool_t xdr_gfs3_read_rsp (XDR *, gfs3_read_rsp*); -extern bool_t xdr_gfs3_lookup_req (XDR *, gfs3_lookup_req*); -extern bool_t xdr_gfs3_lookup_rsp (XDR *, gfs3_lookup_rsp*); -extern bool_t xdr_gfs3_write_req (XDR *, gfs3_write_req*); -extern bool_t xdr_gfs3_write_rsp (XDR *, gfs3_write_rsp*); -extern bool_t xdr_gfs3_statfs_req (XDR *, gfs3_statfs_req*); -extern bool_t xdr_gfs3_statfs_rsp (XDR *, gfs3_statfs_rsp*); -extern bool_t xdr_gfs3_lk_req (XDR *, gfs3_lk_req*); -extern bool_t xdr_gfs3_lk_rsp (XDR *, gfs3_lk_rsp*); -extern bool_t xdr_gfs3_inodelk_req (XDR *, gfs3_inodelk_req*); -extern bool_t xdr_gfs3_finodelk_req (XDR *, gfs3_finodelk_req*); -extern bool_t xdr_gfs3_flush_req (XDR *, gfs3_flush_req*); -extern bool_t xdr_gfs3_fsync_req (XDR *, gfs3_fsync_req*); -extern bool_t xdr_gfs3_fsync_rsp (XDR *, gfs3_fsync_rsp*); -extern bool_t xdr_gfs3_setxattr_req (XDR *, gfs3_setxattr_req*); -extern bool_t xdr_gfs3_fsetxattr_req (XDR *, gfs3_fsetxattr_req*); -extern bool_t xdr_gfs3_xattrop_req (XDR *, gfs3_xattrop_req*); -extern bool_t xdr_gfs3_xattrop_rsp (XDR *, gfs3_xattrop_rsp*); -extern bool_t xdr_gfs3_fxattrop_req (XDR *, gfs3_fxattrop_req*); -extern bool_t xdr_gfs3_fxattrop_rsp (XDR *, gfs3_fxattrop_rsp*); -extern bool_t xdr_gfs3_getxattr_req (XDR *, gfs3_getxattr_req*); -extern bool_t xdr_gfs3_getxattr_rsp (XDR *, gfs3_getxattr_rsp*); -extern bool_t xdr_gfs3_fgetxattr_req (XDR *, gfs3_fgetxattr_req*); -extern bool_t xdr_gfs3_fgetxattr_rsp (XDR *, gfs3_fgetxattr_rsp*); -extern bool_t xdr_gfs3_removexattr_req (XDR *, gfs3_removexattr_req*); -extern bool_t xdr_gfs3_fremovexattr_req (XDR *, gfs3_fremovexattr_req*); -extern bool_t xdr_gfs3_opendir_req (XDR *, gfs3_opendir_req*); -extern bool_t xdr_gfs3_opendir_rsp (XDR *, gfs3_opendir_rsp*); -extern bool_t xdr_gfs3_fsyncdir_req (XDR *, gfs3_fsyncdir_req*); -extern bool_t xdr_gfs3_readdir_req (XDR *, gfs3_readdir_req*); -extern bool_t xdr_gfs3_readdirp_req (XDR *, gfs3_readdirp_req*); -extern bool_t xdr_gfs3_access_req (XDR *, gfs3_access_req*); -extern bool_t xdr_gfs3_create_req (XDR *, gfs3_create_req*); -extern bool_t xdr_gfs3_create_rsp (XDR *, gfs3_create_rsp*); -extern bool_t xdr_gfs3_ftruncate_req (XDR *, gfs3_ftruncate_req*); -extern bool_t xdr_gfs3_ftruncate_rsp (XDR *, gfs3_ftruncate_rsp*); -extern bool_t xdr_gfs3_fstat_req (XDR *, gfs3_fstat_req*); -extern bool_t xdr_gfs3_fstat_rsp (XDR *, gfs3_fstat_rsp*); -extern bool_t xdr_gfs3_entrylk_req (XDR *, gfs3_entrylk_req*); -extern bool_t xdr_gfs3_fentrylk_req (XDR *, gfs3_fentrylk_req*); -extern bool_t xdr_gfs3_setattr_req (XDR *, gfs3_setattr_req*); -extern bool_t xdr_gfs3_setattr_rsp (XDR *, gfs3_setattr_rsp*); -extern bool_t xdr_gfs3_fsetattr_req (XDR *, gfs3_fsetattr_req*); -extern bool_t xdr_gfs3_fsetattr_rsp (XDR *, gfs3_fsetattr_rsp*); -extern bool_t xdr_gfs3_fallocate_req (XDR *, gfs3_fallocate_req*); -extern bool_t xdr_gfs3_fallocate_rsp (XDR *, gfs3_fallocate_rsp*); -extern bool_t xdr_gfs3_discard_req (XDR *, gfs3_discard_req*); -extern bool_t xdr_gfs3_discard_rsp (XDR *, gfs3_discard_rsp*); -extern bool_t xdr_gfs3_zerofill_req (XDR *, gfs3_zerofill_req*); -extern bool_t xdr_gfs3_zerofill_rsp (XDR *, gfs3_zerofill_rsp*); -extern bool_t xdr_gfs3_rchecksum_req (XDR *, gfs3_rchecksum_req*); -extern bool_t xdr_gfs3_rchecksum_rsp (XDR *, gfs3_rchecksum_rsp*); -extern bool_t xdr_gf_setvolume_req (XDR *, gf_setvolume_req*); -extern bool_t xdr_gf_setvolume_rsp (XDR *, gf_setvolume_rsp*); -extern bool_t xdr_gf_getspec_req (XDR *, gf_getspec_req*); -extern bool_t xdr_gf_getspec_rsp (XDR *, gf_getspec_rsp*); -extern bool_t xdr_gf_mgmt_hndsk_req (XDR *, gf_mgmt_hndsk_req*); -extern bool_t xdr_gf_mgmt_hndsk_rsp (XDR *, gf_mgmt_hndsk_rsp*); -extern bool_t xdr_gf_log_req (XDR *, gf_log_req*); -extern bool_t xdr_gf_notify_req (XDR *, gf_notify_req*); -extern bool_t xdr_gf_notify_rsp (XDR *, gf_notify_rsp*); -extern bool_t xdr_gfs3_releasedir_req (XDR *, gfs3_releasedir_req*); -extern bool_t xdr_gfs3_release_req (XDR *, gfs3_release_req*); -extern bool_t xdr_gf_common_rsp (XDR *, gf_common_rsp*); -extern bool_t xdr_gfs3_dirlist (XDR *, gfs3_dirlist*); -extern bool_t xdr_gfs3_readdir_rsp (XDR *, gfs3_readdir_rsp*); -extern bool_t xdr_gfs3_dirplist (XDR *, gfs3_dirplist*); -extern bool_t xdr_gfs3_readdirp_rsp (XDR *, gfs3_readdirp_rsp*); -extern bool_t xdr_gf_set_lk_ver_rsp (XDR *, gf_set_lk_ver_rsp*); -extern bool_t xdr_gf_set_lk_ver_req (XDR *, gf_set_lk_ver_req*); -extern bool_t xdr_gf_event_notify_req (XDR *, gf_event_notify_req*); -extern bool_t xdr_gf_event_notify_rsp (XDR *, gf_event_notify_rsp*); - -#else /* K&R C */ -extern bool_t xdr_gf_statfs (); -extern bool_t xdr_gf_proto_flock (); -extern bool_t xdr_gf_iatt (); -extern bool_t xdr_gfs3_stat_req (); -extern bool_t xdr_gfs3_stat_rsp (); -extern bool_t xdr_gfs3_readlink_req (); -extern bool_t xdr_gfs3_readlink_rsp (); -extern bool_t xdr_gfs3_mknod_req (); -extern bool_t xdr_gfs3_mknod_rsp (); -extern bool_t xdr_gfs3_mkdir_req (); -extern bool_t xdr_gfs3_mkdir_rsp (); -extern bool_t xdr_gfs3_unlink_req (); -extern bool_t xdr_gfs3_unlink_rsp (); -extern bool_t xdr_gfs3_rmdir_req (); -extern bool_t xdr_gfs3_rmdir_rsp (); -extern bool_t xdr_gfs3_symlink_req (); -extern bool_t xdr_gfs3_symlink_rsp (); -extern bool_t xdr_gfs3_rename_req (); -extern bool_t xdr_gfs3_rename_rsp (); -extern bool_t xdr_gfs3_link_req (); -extern bool_t xdr_gfs3_link_rsp (); -extern bool_t xdr_gfs3_truncate_req (); -extern bool_t xdr_gfs3_truncate_rsp (); -extern bool_t xdr_gfs3_open_req (); -extern bool_t xdr_gfs3_open_rsp (); -extern bool_t xdr_gfs3_read_req (); -extern bool_t xdr_gfs3_read_rsp (); -extern bool_t xdr_gfs3_lookup_req (); -extern bool_t xdr_gfs3_lookup_rsp (); -extern bool_t xdr_gfs3_write_req (); -extern bool_t xdr_gfs3_write_rsp (); -extern bool_t xdr_gfs3_statfs_req (); -extern bool_t xdr_gfs3_statfs_rsp (); -extern bool_t xdr_gfs3_lk_req (); -extern bool_t xdr_gfs3_lk_rsp (); -extern bool_t xdr_gfs3_inodelk_req (); -extern bool_t xdr_gfs3_finodelk_req (); -extern bool_t xdr_gfs3_flush_req (); -extern bool_t xdr_gfs3_fsync_req (); -extern bool_t xdr_gfs3_fsync_rsp (); -extern bool_t xdr_gfs3_setxattr_req (); -extern bool_t xdr_gfs3_fsetxattr_req (); -extern bool_t xdr_gfs3_xattrop_req (); -extern bool_t xdr_gfs3_xattrop_rsp (); -extern bool_t xdr_gfs3_fxattrop_req (); -extern bool_t xdr_gfs3_fxattrop_rsp (); -extern bool_t xdr_gfs3_getxattr_req (); -extern bool_t xdr_gfs3_getxattr_rsp (); -extern bool_t xdr_gfs3_fgetxattr_req (); -extern bool_t xdr_gfs3_fgetxattr_rsp (); -extern bool_t xdr_gfs3_removexattr_req (); -extern bool_t xdr_gfs3_fremovexattr_req (); -extern bool_t xdr_gfs3_opendir_req (); -extern bool_t xdr_gfs3_opendir_rsp (); -extern bool_t xdr_gfs3_fsyncdir_req (); -extern bool_t xdr_gfs3_readdir_req (); -extern bool_t xdr_gfs3_readdirp_req (); -extern bool_t xdr_gfs3_access_req (); -extern bool_t xdr_gfs3_create_req (); -extern bool_t xdr_gfs3_create_rsp (); -extern bool_t xdr_gfs3_ftruncate_req (); -extern bool_t xdr_gfs3_ftruncate_rsp (); -extern bool_t xdr_gfs3_fstat_req (); -extern bool_t xdr_gfs3_fstat_rsp (); -extern bool_t xdr_gfs3_entrylk_req (); -extern bool_t xdr_gfs3_fentrylk_req (); -extern bool_t xdr_gfs3_setattr_req (); -extern bool_t xdr_gfs3_setattr_rsp (); -extern bool_t xdr_gfs3_fsetattr_req (); -extern bool_t xdr_gfs3_fsetattr_rsp (); -extern bool_t xdr_gfs3_fallocate_req (); -extern bool_t xdr_gfs3_fallocate_rsp (); -extern bool_t xdr_gfs3_discard_req (); -extern bool_t xdr_gfs3_discard_rsp (); -extern bool_t xdr_gfs3_zerofill_req (); -extern bool_t xdr_gfs3_zerofill_rsp (); -extern bool_t xdr_gfs3_rchecksum_req (); -extern bool_t xdr_gfs3_rchecksum_rsp (); -extern bool_t xdr_gf_setvolume_req (); -extern bool_t xdr_gf_setvolume_rsp (); -extern bool_t xdr_gf_getspec_req (); -extern bool_t xdr_gf_getspec_rsp (); -extern bool_t xdr_gf_mgmt_hndsk_req (); -extern bool_t xdr_gf_mgmt_hndsk_rsp (); -extern bool_t xdr_gf_log_req (); -extern bool_t xdr_gf_notify_req (); -extern bool_t xdr_gf_notify_rsp (); -extern bool_t xdr_gfs3_releasedir_req (); -extern bool_t xdr_gfs3_release_req (); -extern bool_t xdr_gf_common_rsp (); -extern bool_t xdr_gfs3_dirlist (); -extern bool_t xdr_gfs3_readdir_rsp (); -extern bool_t xdr_gfs3_dirplist (); -extern bool_t xdr_gfs3_readdirp_rsp (); -extern bool_t xdr_gf_set_lk_ver_rsp (); -extern bool_t xdr_gf_set_lk_ver_req (); -extern bool_t xdr_gf_event_notify_req (); -extern bool_t xdr_gf_event_notify_rsp (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_GLUSTERFS3_XDR_H_RPCGEN */ diff --git a/rpc/xdr/src/nlm4-xdr.c b/rpc/xdr/src/nlm4-xdr.c deleted file mode 100644 index caba05f58bd..00000000000 --- 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 8545694a658..00000000000 --- a/rpc/xdr/src/nlm4-xdr.h +++ /dev/null @@ -1,260 +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> -#include "xdr-common.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define MAXNETOBJ_SZ 1024 -#define LM_MAXSTRLEN 1024 -#define MAXNAMELEN 1025 - -#if defined(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 -#endif - -#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 e22ac99f26a..e2be3b7f0f7 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 3d75acc555e..00000000000 --- 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 ad8421857a4..00000000000 --- 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 1d3746c9ab8..00000000000 --- 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 58712737be3..00000000000 --- 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 9de642c1572..00000000000 --- 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 8f97b1aaa1f..8f97b1aaa1f 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 4766122e667..00000000000 --- 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 8e4ff4f45a0..00000000000 --- 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 6cb48a923ec..00000000000 --- 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 c43eab315c9..00000000000 --- 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/xdr-generic.h b/rpc/xdr/src/xdr-generic.h index bb3759bbe07..2547d7e545d 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 a497e9f5439..2be83924ac6 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/xlators/nfs/server/src/acl3.h b/xlators/nfs/server/src/acl3.h index 03d626f3e00..220bc9e78df 100644 --- a/xlators/nfs/server/src/acl3.h +++ b/xlators/nfs/server/src/acl3.h @@ -13,6 +13,11 @@ #include "glusterfs-acl.h" +#define ACL3_NULL 0 +#define ACL3_GETACL 1 +#define ACL3_SETACL 2 +#define ACL3_PROC_COUNT 3 + #define GF_ACL3_PORT 38469 #define GF_ACL GF_NFS"-ACL" diff --git a/xlators/nfs/server/src/nlm4.c b/xlators/nfs/server/src/nlm4.c index d0caa97c287..042cfeba17b 100644 --- a/xlators/nfs/server/src/nlm4.c +++ b/xlators/nfs/server/src/nlm4.c @@ -33,7 +33,6 @@ #include "nfs-generics.h" #include "rpc-clnt.h" #include "nsm-xdr.h" -#include "nlmcbk-xdr.h" #include "run.h" #include <unistd.h> #include <rpc/pmap_clnt.h> @@ -157,9 +156,9 @@ nlm4_prep_nlm4_testargs (nlm4_testargs *args, struct nfs3_fh *fh, nlm4_lkowner_t *oh, char *cookiebytes) { memset (args, 0, sizeof (*args)); - args->alock.fh.n_bytes = (void *)fh; - args->alock.oh.n_bytes = (void *)oh; - args->cookie.n_bytes = (void *)cookiebytes; + args->alock.fh.nlm4_netobj_val = (void *)fh; + args->alock.oh.nlm4_netobj_val = (void *)oh; + args->cookie.nlm4_netobj_val = (void *)cookiebytes; } void @@ -167,9 +166,9 @@ nlm4_prep_nlm4_lockargs (nlm4_lockargs *args, struct nfs3_fh *fh, nlm4_lkowner_t *oh, char *cookiebytes) { memset (args, 0, sizeof (*args)); - args->alock.fh.n_bytes = (void *)fh; - args->alock.oh.n_bytes = (void *)oh; - args->cookie.n_bytes = (void *)cookiebytes; + args->alock.fh.nlm4_netobj_val = (void *)fh; + args->alock.oh.nlm4_netobj_val = (void *)oh; + args->cookie.nlm4_netobj_val = (void *)cookiebytes; } void @@ -177,9 +176,9 @@ nlm4_prep_nlm4_cancargs (nlm4_cancargs *args, struct nfs3_fh *fh, nlm4_lkowner_t *oh, char *cookiebytes) { memset (args, 0, sizeof (*args)); - args->alock.fh.n_bytes = (void *)fh; - args->alock.oh.n_bytes = (void *)oh; - args->cookie.n_bytes = (void *)cookiebytes; + args->alock.fh.nlm4_netobj_val = (void *)fh; + args->alock.oh.nlm4_netobj_val = (void *)oh; + args->cookie.nlm4_netobj_val = (void *)cookiebytes; } void @@ -187,9 +186,9 @@ nlm4_prep_nlm4_unlockargs (nlm4_unlockargs *args, struct nfs3_fh *fh, nlm4_lkowner_t *oh, char *cookiebytes) { memset (args, 0, sizeof (*args)); - args->alock.fh.n_bytes = (void *)fh; - args->alock.oh.n_bytes = (void *)oh; - args->cookie.n_bytes = (void *)cookiebytes; + args->alock.fh.nlm4_netobj_val = (void *)fh; + args->alock.oh.nlm4_netobj_val = (void *)oh; + args->cookie.nlm4_netobj_val = (void *)cookiebytes; } void @@ -197,9 +196,9 @@ nlm4_prep_shareargs (nlm4_shareargs *args, struct nfs3_fh *fh, nlm4_lkowner_t *oh, char *cookiebytes) { memset (args, 0, sizeof (*args)); - args->share.fh.n_bytes = (void *)fh; - args->share.oh.n_bytes = (void *)oh; - args->cookie.n_bytes = (void *)cookiebytes; + args->share.fh.nlm4_netobj_val = (void *)fh; + args->share.oh.nlm4_netobj_val = (void *)oh; + args->cookie.nlm4_netobj_val = (void *)cookiebytes; } void @@ -210,22 +209,22 @@ nlm4_prep_freeallargs (nlm4_freeallargs *args, nlm4_lkowner_t *oh) } void -nlm_copy_lkowner (gf_lkowner_t *dst, netobj *src) +nlm_copy_lkowner (gf_lkowner_t *dst, nlm4_netobj *src) { - dst->len = src->n_len; - memcpy (dst->data, src->n_bytes, dst->len); + dst->len = src->nlm4_netobj_len; + memcpy (dst->data, src->nlm4_netobj_val, dst->len); } int -nlm_is_oh_same_lkowner (gf_lkowner_t *a, netobj *b) +nlm_is_oh_same_lkowner (gf_lkowner_t *a, nlm4_netobj *b) { if (!a || !b) { gf_log (GF_NLM, GF_LOG_ERROR, "invalid args"); return -1; } - return (a->len == b->n_len && - !memcmp (a->data, b->n_bytes, a->len)); + return (a->len == b->nlm4_netobj_len && + !memcmp (a->data, b->nlm4_netobj_val, a->len)); } nlm4_stats @@ -653,7 +652,7 @@ err: } int -nlm4_generic_reply (rpcsvc_request_t *req, netobj cookie, nlm4_stats stat) +nlm4_generic_reply (rpcsvc_request_t *req, nlm4_netobj cookie, nlm4_stats stat) { nlm4_res res; diff --git a/xlators/nfs/server/src/nlm4.h b/xlators/nfs/server/src/nlm4.h index 5b629611088..e234b69443a 100644 --- a/xlators/nfs/server/src/nlm4.h +++ b/xlators/nfs/server/src/nlm4.h @@ -31,6 +31,32 @@ #include "nlm4-xdr.h" #include "lkowner.h" +#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 + /* Registered with portmap */ #define GF_NLM4_PORT 38468 #define GF_NLM GF_NFS"-NLM" diff --git a/xlators/nfs/server/src/nlmcbk_svc.c b/xlators/nfs/server/src/nlmcbk_svc.c index e1b588765ce..20d3728d031 100644 --- a/xlators/nfs/server/src/nlmcbk_svc.c +++ b/xlators/nfs/server/src/nlmcbk_svc.c @@ -13,7 +13,6 @@ * It was generated using rpcgen. */ -#include "nlmcbk-xdr.h" #include "nlm4.h" #include "logging.h" #include <stdio.h> |