diff options
Diffstat (limited to 'xlators/protocol/lib/src')
-rw-r--r-- | xlators/protocol/lib/src/Makefile.am | 14 | ||||
-rw-r--r-- | xlators/protocol/lib/src/authenticate.c | 249 | ||||
-rw-r--r-- | xlators/protocol/lib/src/authenticate.h | 60 | ||||
-rw-r--r-- | xlators/protocol/lib/src/cli-xdr.c | 408 | ||||
-rw-r--r-- | xlators/protocol/lib/src/cli-xdr.h | 185 | ||||
-rw-r--r-- | xlators/protocol/lib/src/gluster1.h | 304 | ||||
-rw-r--r-- | xlators/protocol/lib/src/gluster1.x | 169 | ||||
-rw-r--r-- | xlators/protocol/lib/src/gluster1_xdr.c | 349 | ||||
-rw-r--r-- | xlators/protocol/lib/src/glusterd1.h | 157 | ||||
-rw-r--r-- | xlators/protocol/lib/src/glusterd1.x | 87 | ||||
-rw-r--r-- | xlators/protocol/lib/src/glusterd1_xdr.c | 180 | ||||
-rw-r--r-- | xlators/protocol/lib/src/glusterfs-xdr.c | 1733 | ||||
-rw-r--r-- | xlators/protocol/lib/src/glusterfs-xdr.h | 1286 | ||||
-rw-r--r-- | xlators/protocol/lib/src/glusterfs3.x | 765 | ||||
-rw-r--r-- | xlators/protocol/lib/src/msg-xdr.c | 1212 | ||||
-rw-r--r-- | xlators/protocol/lib/src/msg-xdr.h | 524 | ||||
-rw-r--r-- | xlators/protocol/lib/src/protocol-common.h | 138 |
17 files changed, 0 insertions, 7820 deletions
diff --git a/xlators/protocol/lib/src/Makefile.am b/xlators/protocol/lib/src/Makefile.am deleted file mode 100644 index abd8ef83e65..00000000000 --- a/xlators/protocol/lib/src/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -lib_LTLIBRARIES = libgfproto1.la - -libgfproto1_la_CFLAGS = -fPIC -Wall -g -shared -nostartfiles $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) - -libgfproto1_la_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -D_GNU_SOURCE \ - -D$(GF_HOST_OS) -DLIBDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/auth\" \ - -I$(CONTRIBDIR)/rbtree -I$(top_srcdir)/libglusterfs/src/ \ - -I$(top_srcdir)/rpc/rpc-lib/src/ - -libgfproto1_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la - -libgfproto1_la_SOURCES = authenticate.c msg-xdr.c glusterfs-xdr.c gluster1_xdr.c glusterd1_xdr.c cli-xdr.c - -noinst_HEADERS = authenticate.h protocol-common.h msg-xdr.h glusterfs-xdr.h cli-xdr.h glusterd1.h gluster1.h diff --git a/xlators/protocol/lib/src/authenticate.c b/xlators/protocol/lib/src/authenticate.c deleted file mode 100644 index 5205b54df61..00000000000 --- a/xlators/protocol/lib/src/authenticate.c +++ /dev/null @@ -1,249 +0,0 @@ -/* - Copyright (c) 2007-2010 Gluster, Inc. <http://www.gluster.com> - This file is part of GlusterFS. - - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. -*/ - -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - -#include <stdio.h> -#include <dlfcn.h> -#include <errno.h> -#include "authenticate.h" - -static void -init (dict_t *this, - char *key, - data_t *value, - void *data) -{ - void *handle = NULL; - char *auth_file = NULL; - auth_handle_t *auth_handle = NULL; - auth_fn_t authenticate = NULL; - int *error = NULL; - int ret = 0; - - /* It gets over written */ - error = data; - - if (!strncasecmp (key, "ip", strlen ("ip"))) { - gf_log ("authenticate", GF_LOG_ERROR, - "AUTHENTICATION MODULE \"IP\" HAS BEEN REPLACED " - "BY \"ADDR\""); - dict_set (this, key, data_from_dynptr (NULL, 0)); - /* TODO: 1.3.x backword compatibility */ - // *error = -1; - // return; - key = "addr"; - } - - ret = gf_asprintf (&auth_file, "%s/%s.so", LIBDIR, key); - if (-1 == ret) { - gf_log ("authenticate", GF_LOG_ERROR, "asprintf failed"); - dict_set (this, key, data_from_dynptr (NULL, 0)); - *error = -1; - return; - } - - handle = dlopen (auth_file, RTLD_LAZY); - if (!handle) { - gf_log ("authenticate", GF_LOG_ERROR, "dlopen(%s): %s\n", - auth_file, dlerror ()); - dict_set (this, key, data_from_dynptr (NULL, 0)); - GF_FREE (auth_file); - *error = -1; - return; - } - GF_FREE (auth_file); - - authenticate = dlsym (handle, "gf_auth"); - if (!authenticate) { - gf_log ("authenticate", GF_LOG_ERROR, - "dlsym(gf_auth) on %s\n", dlerror ()); - dict_set (this, key, data_from_dynptr (NULL, 0)); - *error = -1; - return; - } - - auth_handle = GF_CALLOC (1, sizeof (*auth_handle), - gf_common_mt_auth_handle_t); - if (!auth_handle) { - gf_log ("authenticate", GF_LOG_ERROR, "Out of memory"); - dict_set (this, key, data_from_dynptr (NULL, 0)); - *error = -1; - return; - } - auth_handle->vol_opt = GF_CALLOC (1, sizeof (volume_opt_list_t), - gf_common_mt_volume_opt_list_t); - auth_handle->vol_opt->given_opt = dlsym (handle, "options"); - if (auth_handle->vol_opt->given_opt == NULL) { - gf_log ("authenticate", GF_LOG_DEBUG, - "volume option validation not specified"); - } - - auth_handle->authenticate = authenticate; - auth_handle->handle = handle; - - dict_set (this, key, - data_from_dynptr (auth_handle, sizeof (*auth_handle))); -} - -static void -fini (dict_t *this, - char *key, - data_t *value, - void *data) -{ - auth_handle_t *handle = data_to_ptr (value); - if (handle) { - dlclose (handle->handle); - } -} - -int32_t -gf_auth_init (xlator_t *xl, dict_t *auth_modules) -{ - int ret = 0; - auth_handle_t *handle = NULL; - data_pair_t *pair = NULL; - dict_foreach (auth_modules, init, &ret); - if (!ret) { - pair = auth_modules->members_list; - while (pair) { - handle = data_to_ptr (pair->value); - if (handle) { - list_add_tail (&(handle->vol_opt->list), - &(xl->volume_options)); - if (-1 == - validate_xlator_volume_options (xl, - handle->vol_opt->given_opt)) { - gf_log ("authenticate", GF_LOG_ERROR, - "volume option validation " - "failed"); - ret = -1; - } - } - pair = pair->next; - } - } - if (ret) { - gf_log (xl->name, GF_LOG_ERROR, "authentication init failed"); - dict_foreach (auth_modules, fini, &ret); - ret = -1; - } - return ret; -} - -static dict_t *__input_params; -static dict_t *__config_params; - -void -map (dict_t *this, - char *key, - data_t *value, - void *data) -{ - dict_t *res = data; - auth_fn_t authenticate; - auth_handle_t *handle = NULL; - - if (value && (handle = data_to_ptr (value)) && - (authenticate = handle->authenticate)) { - dict_set (res, key, - int_to_data (authenticate (__input_params, - __config_params))); - } else { - dict_set (res, key, int_to_data (AUTH_DONT_CARE)); - } -} - -void -reduce (dict_t *this, - char *key, - data_t *value, - void *data) -{ - int64_t val = 0; - int64_t *res = data; - if (!data) - return; - - val = data_to_int64 (value); - switch (val) - { - case AUTH_ACCEPT: - if (AUTH_DONT_CARE == *res) - *res = AUTH_ACCEPT; - break; - - case AUTH_REJECT: - *res = AUTH_REJECT; - break; - - case AUTH_DONT_CARE: - break; - } -} - - -auth_result_t -gf_authenticate (dict_t *input_params, - dict_t *config_params, - dict_t *auth_modules) -{ - dict_t *results = NULL; - int64_t result = AUTH_DONT_CARE; - - results = get_new_dict (); - __input_params = input_params; - __config_params = config_params; - - dict_foreach (auth_modules, map, results); - - dict_foreach (results, reduce, &result); - if (AUTH_DONT_CARE == result) { - data_t *peerinfo_data = dict_get (input_params, "peer-info-name"); - char *name = NULL; - - if (peerinfo_data) { - name = peerinfo_data->data; - } - - gf_log ("auth", GF_LOG_ERROR, - "no authentication module is interested in " - "accepting remote-client %s", name); - result = AUTH_REJECT; - } - - dict_destroy (results); - return result; -} - -void -gf_auth_fini (dict_t *auth_modules) -{ - int32_t dummy; - - dict_foreach (auth_modules, fini, &dummy); -} diff --git a/xlators/protocol/lib/src/authenticate.h b/xlators/protocol/lib/src/authenticate.h deleted file mode 100644 index 93d73741b0a..00000000000 --- a/xlators/protocol/lib/src/authenticate.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (c) 2007-2009 Gluster, Inc. <http://www.gluster.com> - This file is part of GlusterFS. - - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. -*/ - -#ifndef _AUTHENTICATE_H -#define _AUTHENTICATE_H - -#ifndef _CONFIG_H -#define _CONFIG_H -#include "config.h" -#endif - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - -#include <stdio.h> -#include <fnmatch.h> -#include "dict.h" -#include "compat.h" -#include "list.h" -#include "xlator.h" - -typedef enum { - AUTH_ACCEPT, - AUTH_REJECT, - AUTH_DONT_CARE -} auth_result_t; - -typedef auth_result_t (*auth_fn_t) (dict_t *input_params, - dict_t *config_params); - -typedef struct { - void *handle; - auth_fn_t authenticate; - volume_opt_list_t *vol_opt; -} auth_handle_t; - -auth_result_t gf_authenticate (dict_t *input_params, - dict_t *config_params, - dict_t *auth_modules); -int32_t gf_auth_init (xlator_t *xl, dict_t *auth_modules); -void gf_auth_fini (dict_t *auth_modules); - -#endif /* _AUTHENTICATE_H */ diff --git a/xlators/protocol/lib/src/cli-xdr.c b/xlators/protocol/lib/src/cli-xdr.c deleted file mode 100644 index ba9565261c1..00000000000 --- a/xlators/protocol/lib/src/cli-xdr.c +++ /dev/null @@ -1,408 +0,0 @@ -/* - Copyright (c) 2007-2010 Gluster, Inc. <http://www.gluster.com> - This file is part of GlusterFS. - - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. -*/ - - -#include "cli-xdr.h" - - -ssize_t -gf_xdr_serialize_cli_probe_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_probe_rsp); - -} - -ssize_t -gf_xdr_to_cli_probe_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_probe_req); -} - -ssize_t -gf_xdr_to_cli_probe_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_probe_rsp); -} - -ssize_t -gf_xdr_from_cli_probe_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_probe_req); -} - -ssize_t -gf_xdr_serialize_cli_deprobe_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_deprobe_rsp); - -} - -ssize_t -gf_xdr_to_cli_deprobe_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_deprobe_req); -} - -ssize_t -gf_xdr_to_cli_deprobe_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_deprobe_rsp); -} - -ssize_t -gf_xdr_from_cli_deprobe_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_deprobe_req); -} - -ssize_t -gf_xdr_serialize_cli_peer_list_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_peer_list_rsp); - -} - -ssize_t -gf_xdr_to_cli_peer_list_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_peer_list_req); -} - -ssize_t -gf_xdr_to_cli_peer_list_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_peer_list_rsp); -} - -ssize_t -gf_xdr_from_cli_peer_list_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_peer_list_req); -} -ssize_t -gf_xdr_serialize_cli_create_vol_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_create_vol_rsp); - -} - -ssize_t -gf_xdr_to_cli_create_vol_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_create_vol_req); -} - -ssize_t -gf_xdr_to_cli_create_vol_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_create_vol_rsp); -} - -ssize_t -gf_xdr_from_cli_create_vol_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_create_vol_req); -} - - -ssize_t -gf_xdr_serialize_cli_delete_vol_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_delete_vol_rsp); - -} - -ssize_t -gf_xdr_to_cli_delete_vol_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_delete_vol_req); -} - - -ssize_t -gf_xdr_to_cli_delete_vol_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_delete_vol_rsp); -} - -ssize_t -gf_xdr_from_cli_delete_vol_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_delete_vol_req); -} - -ssize_t -gf_xdr_serialize_cli_start_vol_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_start_vol_rsp); - -} - -ssize_t -gf_xdr_to_cli_start_vol_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_start_vol_req); -} - -ssize_t -gf_xdr_to_cli_start_vol_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_start_vol_rsp); -} - -ssize_t -gf_xdr_from_cli_start_vol_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_start_vol_req); -} - - -ssize_t -gf_xdr_serialize_cli_stop_vol_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_stop_vol_rsp); - -} - -ssize_t -gf_xdr_to_cli_stop_vol_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_stop_vol_req); -} - -ssize_t -gf_xdr_to_cli_stop_vol_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_stop_vol_rsp); -} - -ssize_t -gf_xdr_from_cli_stop_vol_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_stop_vol_req); -} - - -ssize_t -gf_xdr_serialize_cli_rename_vol_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_rename_vol_rsp); - -} - -ssize_t -gf_xdr_to_cli_rename_vol_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_rename_vol_req); -} - -ssize_t -gf_xdr_to_cli_rename_vol_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_rename_vol_rsp); -} - -ssize_t -gf_xdr_from_cli_rename_vol_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_rename_vol_req); -} - - -ssize_t -gf_xdr_serialize_cli_defrag_vol_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_defrag_vol_rsp); - -} - -ssize_t -gf_xdr_to_cli_defrag_vol_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_defrag_vol_rsp); -} - -ssize_t -gf_xdr_to_cli_defrag_vol_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_defrag_vol_req); -} - -ssize_t -gf_xdr_from_cli_defrag_vol_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_defrag_vol_req); -} - - - -ssize_t -gf_xdr_serialize_cli_add_brick_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_add_brick_rsp); - -} - -ssize_t -gf_xdr_to_cli_add_brick_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_add_brick_req); -} - -ssize_t -gf_xdr_to_cli_add_brick_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_add_brick_rsp); -} - -ssize_t -gf_xdr_from_cli_add_brick_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_add_brick_req); -} - - -ssize_t -gf_xdr_serialize_cli_remove_brick_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_remove_brick_rsp); - -} - -ssize_t -gf_xdr_to_cli_remove_brick_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_remove_brick_req); -} - - -ssize_t -gf_xdr_to_cli_remove_brick_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_remove_brick_rsp); -} - -ssize_t -gf_xdr_from_cli_remove_brick_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_remove_brick_req); -} - - -ssize_t -gf_xdr_serialize_cli_replace_brick_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_replace_brick_rsp); - -} - -ssize_t -gf_xdr_to_cli_replace_brick_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_replace_brick_req); -} - -ssize_t -gf_xdr_to_cli_replace_brick_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_replace_brick_rsp); -} - -ssize_t -gf_xdr_from_cli_replace_brick_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_replace_brick_req); -} - -ssize_t -gf_xdr_serialize_cli_set_vol_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf1_cli_set_vol_rsp); - -} - -ssize_t -gf_xdr_to_cli_set_vol_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_set_vol_req); -} - -ssize_t -gf_xdr_to_cli_set_vol_rsp (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf1_cli_set_vol_rsp); -} - -ssize_t -gf_xdr_from_cli_set_vol_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf1_cli_set_vol_req); -} diff --git a/xlators/protocol/lib/src/cli-xdr.h b/xlators/protocol/lib/src/cli-xdr.h deleted file mode 100644 index 2ec4f95241e..00000000000 --- a/xlators/protocol/lib/src/cli-xdr.h +++ /dev/null @@ -1,185 +0,0 @@ -/* - Copyright (c) 2007-2010 Gluster, Inc. <http://www.gluster.com> - This file is part of GlusterFS. - - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. -*/ - - -#ifndef _MSG_CLI_XDR_H -#define _MSG_CLI_XDR_H - -#include <sys/uio.h> - -#include "msg-xdr.h" -#include "gluster1.h" - -ssize_t -gf_xdr_serialize_cli_probe_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_probe_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_probe_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_probe_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_deprobe_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_deprobe_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_deprobe_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_deprobe_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_peer_list_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_peer_list_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_peer_list_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_peer_list_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_create_vol_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_create_vol_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_create_vol_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_create_vol_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_delete_vol_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_delete_vol_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_delete_vol_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_delete_vol_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_start_vol_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_start_vol_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_start_vol_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_start_vol_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_stop_vol_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_stop_vol_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_stop_vol_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_stop_vol_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_rename_vol_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_rename_vol_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_rename_vol_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_rename_vol_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_defrag_vol_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_defrag_vol_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_defrag_vol_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_to_cli_defrag_vol_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_serialize_cli_add_brick_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_add_brick_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_add_brick_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_add_brick_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_remove_brick_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_remove_brick_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_remove_brick_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_remove_brick_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_replace_brick_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_replace_brick_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_replace_brick_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_replace_brick_req (struct iovec outmsg, void *req); - -ssize_t -gf_xdr_serialize_cli_set_vol_rsp (struct iovec outmsg, void *rsp); - -ssize_t -gf_xdr_to_cli_set_vol_req (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_to_cli_set_vol_rsp (struct iovec inmsg, void *args); - -ssize_t -gf_xdr_from_cli_set_vol_req (struct iovec outmsg, void *req); - -#endif /* !_MSG_CLI_XDR_H */ diff --git a/xlators/protocol/lib/src/gluster1.h b/xlators/protocol/lib/src/gluster1.h deleted file mode 100644 index 81948b34aac..00000000000 --- a/xlators/protocol/lib/src/gluster1.h +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _GLUSTER1_H_RPCGEN -#define _GLUSTER1_H_RPCGEN - -#include <rpc/rpc.h> - - -#ifdef __cplusplus -extern "C" { -#endif - - -enum gf1_cluster_type { - GF_CLUSTER_TYPE_NONE = 0, - GF_CLUSTER_TYPE_STRIPE = 0 + 1, - GF_CLUSTER_TYPE_REPLICATE = 0 + 2, -}; -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_STOP = 0 + 2, - GF_REPLACE_OP_PAUSE = 0 + 3, - GF_REPLACE_OP_ABORT = 0 + 4, - GF_REPLACE_OP_STATUS = 0 + 5, -}; -typedef enum gf1_cli_replace_op gf1_cli_replace_op; - -enum gf1_cli_enum_friends_list { - GF_CLI_LIST_ALL = 1, -}; -typedef enum gf1_cli_enum_friends_list gf1_cli_enum_friends_list; - -struct gf1_cli_probe_req { - char *hostname; -}; -typedef struct gf1_cli_probe_req gf1_cli_probe_req; - -struct gf1_cli_probe_rsp { - int op_ret; - int op_errno; - char *hostname; -}; -typedef struct gf1_cli_probe_rsp gf1_cli_probe_rsp; - -struct gf1_cli_deprobe_req { - char *hostname; -}; -typedef struct gf1_cli_deprobe_req gf1_cli_deprobe_req; - -struct gf1_cli_deprobe_rsp { - int op_ret; - int op_errno; - char *hostname; -}; -typedef struct gf1_cli_deprobe_rsp gf1_cli_deprobe_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_create_vol_req { - char *volname; - gf1_cluster_type type; - int count; - struct { - u_int bricks_len; - char *bricks_val; - } bricks; -}; -typedef struct gf1_cli_create_vol_req gf1_cli_create_vol_req; - -struct gf1_cli_create_vol_rsp { - int op_ret; - int op_errno; - char *volname; -}; -typedef struct gf1_cli_create_vol_rsp gf1_cli_create_vol_rsp; - -struct gf1_cli_delete_vol_req { - char *volname; -}; -typedef struct gf1_cli_delete_vol_req gf1_cli_delete_vol_req; - -struct gf1_cli_delete_vol_rsp { - int op_ret; - int op_errno; - char *volname; -}; -typedef struct gf1_cli_delete_vol_rsp gf1_cli_delete_vol_rsp; - -struct gf1_cli_start_vol_req { - char *volname; -}; -typedef struct gf1_cli_start_vol_req gf1_cli_start_vol_req; - -struct gf1_cli_start_vol_rsp { - int op_ret; - int op_errno; - char *volname; -}; -typedef struct gf1_cli_start_vol_rsp gf1_cli_start_vol_rsp; - -struct gf1_cli_stop_vol_req { - char *volname; -}; -typedef struct gf1_cli_stop_vol_req gf1_cli_stop_vol_req; - -struct gf1_cli_stop_vol_rsp { - int op_ret; - int op_errno; - char *volname; -}; -typedef struct gf1_cli_stop_vol_rsp gf1_cli_stop_vol_rsp; - -struct gf1_cli_rename_vol_req { - char *old_volname; - char *new_volname; -}; -typedef struct gf1_cli_rename_vol_req gf1_cli_rename_vol_req; - -struct gf1_cli_rename_vol_rsp { - int op_ret; - int op_errno; - char *volname; -}; -typedef struct gf1_cli_rename_vol_rsp gf1_cli_rename_vol_rsp; - -struct gf1_cli_defrag_vol_req { - char *volname; -}; -typedef struct gf1_cli_defrag_vol_req gf1_cli_defrag_vol_req; - -struct gf1_cli_defrag_vol_rsp { - int op_ret; - int op_errno; - char *volname; -}; -typedef struct gf1_cli_defrag_vol_rsp gf1_cli_defrag_vol_rsp; - -struct gf1_cli_add_brick_req { - char *volname; - gf1_cluster_type type; - int count; - struct { - u_int bricks_len; - char *bricks_val; - } bricks; -}; -typedef struct gf1_cli_add_brick_req gf1_cli_add_brick_req; - -struct gf1_cli_add_brick_rsp { - int op_ret; - int op_errno; - char *volname; -}; -typedef struct gf1_cli_add_brick_rsp gf1_cli_add_brick_rsp; - -struct gf1_cli_remove_brick_req { - char *volname; - gf1_cluster_type type; - int count; - struct { - u_int bricks_len; - char *bricks_val; - } bricks; -}; -typedef struct gf1_cli_remove_brick_req gf1_cli_remove_brick_req; - -struct gf1_cli_remove_brick_rsp { - int op_ret; - int op_errno; - char *volname; -}; -typedef struct gf1_cli_remove_brick_rsp gf1_cli_remove_brick_rsp; - -struct gf1_cli_replace_brick_req { - char *volname; - gf1_cli_replace_op op; - struct { - u_int src_brick_len; - char *src_brick_val; - } src_brick; - struct { - u_int dst_brick_len; - char *dst_brick_val; - } dst_brick; -}; -typedef struct gf1_cli_replace_brick_req gf1_cli_replace_brick_req; - -struct gf1_cli_replace_brick_rsp { - int op_ret; - int op_errno; - char *volname; -}; -typedef struct gf1_cli_replace_brick_rsp gf1_cli_replace_brick_rsp; - -struct gf1_cli_set_vol_req { - char *volname; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gf1_cli_set_vol_req gf1_cli_set_vol_req; - -struct gf1_cli_set_vol_rsp { - int op_ret; - int op_errno; - char *volname; -}; -typedef struct gf1_cli_set_vol_rsp gf1_cli_set_vol_rsp; - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -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_cli_enum_friends_list (XDR *, gf1_cli_enum_friends_list*); -extern bool_t xdr_gf1_cli_probe_req (XDR *, gf1_cli_probe_req*); -extern bool_t xdr_gf1_cli_probe_rsp (XDR *, gf1_cli_probe_rsp*); -extern bool_t xdr_gf1_cli_deprobe_req (XDR *, gf1_cli_deprobe_req*); -extern bool_t xdr_gf1_cli_deprobe_rsp (XDR *, gf1_cli_deprobe_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_create_vol_req (XDR *, gf1_cli_create_vol_req*); -extern bool_t xdr_gf1_cli_create_vol_rsp (XDR *, gf1_cli_create_vol_rsp*); -extern bool_t xdr_gf1_cli_delete_vol_req (XDR *, gf1_cli_delete_vol_req*); -extern bool_t xdr_gf1_cli_delete_vol_rsp (XDR *, gf1_cli_delete_vol_rsp*); -extern bool_t xdr_gf1_cli_start_vol_req (XDR *, gf1_cli_start_vol_req*); -extern bool_t xdr_gf1_cli_start_vol_rsp (XDR *, gf1_cli_start_vol_rsp*); -extern bool_t xdr_gf1_cli_stop_vol_req (XDR *, gf1_cli_stop_vol_req*); -extern bool_t xdr_gf1_cli_stop_vol_rsp (XDR *, gf1_cli_stop_vol_rsp*); -extern bool_t xdr_gf1_cli_rename_vol_req (XDR *, gf1_cli_rename_vol_req*); -extern bool_t xdr_gf1_cli_rename_vol_rsp (XDR *, gf1_cli_rename_vol_rsp*); -extern bool_t xdr_gf1_cli_defrag_vol_req (XDR *, gf1_cli_defrag_vol_req*); -extern bool_t xdr_gf1_cli_defrag_vol_rsp (XDR *, gf1_cli_defrag_vol_rsp*); -extern bool_t xdr_gf1_cli_add_brick_req (XDR *, gf1_cli_add_brick_req*); -extern bool_t xdr_gf1_cli_add_brick_rsp (XDR *, gf1_cli_add_brick_rsp*); -extern bool_t xdr_gf1_cli_remove_brick_req (XDR *, gf1_cli_remove_brick_req*); -extern bool_t xdr_gf1_cli_remove_brick_rsp (XDR *, gf1_cli_remove_brick_rsp*); -extern bool_t xdr_gf1_cli_replace_brick_req (XDR *, gf1_cli_replace_brick_req*); -extern bool_t xdr_gf1_cli_replace_brick_rsp (XDR *, gf1_cli_replace_brick_rsp*); -extern bool_t xdr_gf1_cli_set_vol_req (XDR *, gf1_cli_set_vol_req*); -extern bool_t xdr_gf1_cli_set_vol_rsp (XDR *, gf1_cli_set_vol_rsp*); - -#else /* K&R C */ -extern bool_t xdr_gf1_cluster_type (); -extern bool_t xdr_gf1_cli_replace_op (); -extern bool_t xdr_gf1_cli_enum_friends_list (); -extern bool_t xdr_gf1_cli_probe_req (); -extern bool_t xdr_gf1_cli_probe_rsp (); -extern bool_t xdr_gf1_cli_deprobe_req (); -extern bool_t xdr_gf1_cli_deprobe_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_create_vol_req (); -extern bool_t xdr_gf1_cli_create_vol_rsp (); -extern bool_t xdr_gf1_cli_delete_vol_req (); -extern bool_t xdr_gf1_cli_delete_vol_rsp (); -extern bool_t xdr_gf1_cli_start_vol_req (); -extern bool_t xdr_gf1_cli_start_vol_rsp (); -extern bool_t xdr_gf1_cli_stop_vol_req (); -extern bool_t xdr_gf1_cli_stop_vol_rsp (); -extern bool_t xdr_gf1_cli_rename_vol_req (); -extern bool_t xdr_gf1_cli_rename_vol_rsp (); -extern bool_t xdr_gf1_cli_defrag_vol_req (); -extern bool_t xdr_gf1_cli_defrag_vol_rsp (); -extern bool_t xdr_gf1_cli_add_brick_req (); -extern bool_t xdr_gf1_cli_add_brick_rsp (); -extern bool_t xdr_gf1_cli_remove_brick_req (); -extern bool_t xdr_gf1_cli_remove_brick_rsp (); -extern bool_t xdr_gf1_cli_replace_brick_req (); -extern bool_t xdr_gf1_cli_replace_brick_rsp (); -extern bool_t xdr_gf1_cli_set_vol_req (); -extern bool_t xdr_gf1_cli_set_vol_rsp (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_GLUSTER1_H_RPCGEN */ diff --git a/xlators/protocol/lib/src/gluster1.x b/xlators/protocol/lib/src/gluster1.x deleted file mode 100644 index a8af1b7d658..00000000000 --- a/xlators/protocol/lib/src/gluster1.x +++ /dev/null @@ -1,169 +0,0 @@ - enum gf1_cluster_type { - GF_CLUSTER_TYPE_NONE = 0, - GF_CLUSTER_TYPE_STRIPE, - GF_CLUSTER_TYPE_REPLICATE -} ; - - enum gf1_cli_replace_op { - GF_REPLACE_OP_NONE = 0, - GF_REPLACE_OP_START, - GF_REPLACE_OP_STOP, - GF_REPLACE_OP_PAUSE, - GF_REPLACE_OP_ABORT, - GF_REPLACE_OP_STATUS -} ; - -enum gf1_cli_enum_friends_list { - GF_CLI_LIST_ALL = 1 -} ; - - struct gf1_cli_probe_req { - string hostname<>; -} ; - - struct gf1_cli_probe_rsp { - int op_ret; - int op_errno; - string hostname<>; -} ; - - struct gf1_cli_deprobe_req { - string hostname<>; -} ; - - struct gf1_cli_deprobe_rsp { - int op_ret; - int op_errno; - string hostname<>; -} ; - -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_create_vol_req { - string volname<>; - gf1_cluster_type type; - int count; - opaque bricks<>; -} ; - - struct gf1_cli_create_vol_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; - - struct gf1_cli_delete_vol_req { - string volname<>; -} ; - - struct gf1_cli_delete_vol_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; - - struct gf1_cli_start_vol_req { - string volname<>; -} ; - - - struct gf1_cli_start_vol_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; - - struct gf1_cli_stop_vol_req { - string volname<>; -} ; - - - struct gf1_cli_stop_vol_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; - - - struct gf1_cli_rename_vol_req { - string old_volname<>; - string new_volname<>; -} ; - - struct gf1_cli_rename_vol_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; - - struct gf1_cli_defrag_vol_req { - string volname<>; -} ; - - struct gf1_cli_defrag_vol_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; - - struct gf1_cli_add_brick_req { - string volname<>; - gf1_cluster_type type; - int count; - opaque bricks<>; -} ; - - struct gf1_cli_add_brick_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; - - struct gf1_cli_remove_brick_req { - string volname<>; - gf1_cluster_type type; - int count; - opaque bricks<>; -} ; - - - struct gf1_cli_remove_brick_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; - - struct gf1_cli_replace_brick_req { - string volname<>; - gf1_cli_replace_op op; - opaque src_brick<>; - opaque dst_brick<>; -} ; - - struct gf1_cli_replace_brick_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; - - -struct gf1_cli_set_vol_req { - string volname<>; - opaque dict<>; -} ; - - - struct gf1_cli_set_vol_rsp { - int op_ret; - int op_errno; - string volname<>; -} ; diff --git a/xlators/protocol/lib/src/gluster1_xdr.c b/xlators/protocol/lib/src/gluster1_xdr.c deleted file mode 100644 index 9a44b9989ae..00000000000 --- a/xlators/protocol/lib/src/gluster1_xdr.c +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "gluster1.h" - -bool_t -xdr_gf1_cluster_type (XDR *xdrs, gf1_cluster_type *objp) -{ - - 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) -{ - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_enum_friends_list (XDR *xdrs, gf1_cli_enum_friends_list *objp) -{ - - if (!xdr_enum (xdrs, (enum_t *) objp)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_probe_req (XDR *xdrs, gf1_cli_probe_req *objp) -{ - - if (!xdr_string (xdrs, &objp->hostname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_probe_rsp (XDR *xdrs, gf1_cli_probe_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->hostname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_deprobe_req (XDR *xdrs, gf1_cli_deprobe_req *objp) -{ - - if (!xdr_string (xdrs, &objp->hostname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_deprobe_rsp (XDR *xdrs, gf1_cli_deprobe_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->hostname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_peer_list_req (XDR *xdrs, gf1_cli_peer_list_req *objp) -{ - - 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) -{ - - 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_create_vol_req (XDR *xdrs, gf1_cli_create_vol_req *objp) -{ - - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - if (!xdr_gf1_cluster_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_int (xdrs, &objp->count)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->bricks.bricks_val, (u_int *) &objp->bricks.bricks_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_create_vol_rsp (XDR *xdrs, gf1_cli_create_vol_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_delete_vol_req (XDR *xdrs, gf1_cli_delete_vol_req *objp) -{ - - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_delete_vol_rsp (XDR *xdrs, gf1_cli_delete_vol_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_start_vol_req (XDR *xdrs, gf1_cli_start_vol_req *objp) -{ - - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_start_vol_rsp (XDR *xdrs, gf1_cli_start_vol_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_stop_vol_req (XDR *xdrs, gf1_cli_stop_vol_req *objp) -{ - - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_stop_vol_rsp (XDR *xdrs, gf1_cli_stop_vol_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_rename_vol_req (XDR *xdrs, gf1_cli_rename_vol_req *objp) -{ - - if (!xdr_string (xdrs, &objp->old_volname, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->new_volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_rename_vol_rsp (XDR *xdrs, gf1_cli_rename_vol_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_defrag_vol_req (XDR *xdrs, gf1_cli_defrag_vol_req *objp) -{ - - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_defrag_vol_rsp (XDR *xdrs, gf1_cli_defrag_vol_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_add_brick_req (XDR *xdrs, gf1_cli_add_brick_req *objp) -{ - - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - if (!xdr_gf1_cluster_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_int (xdrs, &objp->count)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->bricks.bricks_val, (u_int *) &objp->bricks.bricks_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_add_brick_rsp (XDR *xdrs, gf1_cli_add_brick_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_remove_brick_req (XDR *xdrs, gf1_cli_remove_brick_req *objp) -{ - - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - if (!xdr_gf1_cluster_type (xdrs, &objp->type)) - return FALSE; - if (!xdr_int (xdrs, &objp->count)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->bricks.bricks_val, (u_int *) &objp->bricks.bricks_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_remove_brick_rsp (XDR *xdrs, gf1_cli_remove_brick_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_replace_brick_req (XDR *xdrs, gf1_cli_replace_brick_req *objp) -{ - - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - if (!xdr_gf1_cli_replace_op (xdrs, &objp->op)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->src_brick.src_brick_val, (u_int *) &objp->src_brick.src_brick_len, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->dst_brick.dst_brick_val, (u_int *) &objp->dst_brick.dst_brick_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_replace_brick_rsp (XDR *xdrs, gf1_cli_replace_brick_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_set_vol_req (XDR *xdrs, gf1_cli_set_vol_req *objp) -{ - - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf1_cli_set_vol_rsp (XDR *xdrs, gf1_cli_set_vol_rsp *objp) -{ - - if (!xdr_int (xdrs, &objp->op_ret)) - return FALSE; - if (!xdr_int (xdrs, &objp->op_errno)) - return FALSE; - if (!xdr_string (xdrs, &objp->volname, ~0)) - return FALSE; - return TRUE; -} diff --git a/xlators/protocol/lib/src/glusterd1.h b/xlators/protocol/lib/src/glusterd1.h deleted file mode 100644 index ee5fb9c7db3..00000000000 --- a/xlators/protocol/lib/src/glusterd1.h +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _GLUSTERD1_H_RPCGEN -#define _GLUSTERD1_H_RPCGEN - -#include <rpc/rpc.h> - - -#ifdef __cplusplus -extern "C" { -#endif - - -struct gd1_mgmt_probe_req { - u_char uuid[16]; - char *hostname; -}; -typedef struct gd1_mgmt_probe_req gd1_mgmt_probe_req; - -struct gd1_mgmt_probe_rsp { - u_char uuid[16]; - char *hostname; -}; -typedef struct gd1_mgmt_probe_rsp gd1_mgmt_probe_rsp; - -struct gd1_mgmt_friend_req { - u_char uuid[16]; - char *hostname; -}; -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; -}; -typedef struct gd1_mgmt_friend_rsp gd1_mgmt_friend_rsp; - -struct gd1_mgmt_unfriend_req { - u_char uuid[16]; - char *hostname; -}; -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; -}; -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; -}; -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; -}; -typedef struct gd1_mgmt_commit_op_rsp gd1_mgmt_commit_op_rsp; - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -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*); - -#else /* K&R C */ -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 (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_GLUSTERD1_H_RPCGEN */ diff --git a/xlators/protocol/lib/src/glusterd1.x b/xlators/protocol/lib/src/glusterd1.x deleted file mode 100644 index 935fde4ef1b..00000000000 --- a/xlators/protocol/lib/src/glusterd1.x +++ /dev/null @@ -1,87 +0,0 @@ - - struct gd1_mgmt_probe_req { - unsigned char uuid[16]; - string hostname<>; -} ; - - struct gd1_mgmt_probe_rsp { - unsigned char uuid[16]; - string hostname<>; -} ; - -struct gd1_mgmt_friend_req { - unsigned char uuid[16]; - string hostname<>; -} ; - -struct gd1_mgmt_friend_rsp { - unsigned char uuid[16]; - string hostname<>; - int op_ret; - int op_errno; -} ; - -struct gd1_mgmt_unfriend_req { - unsigned char uuid[16]; - string hostname<>; -} ; - -struct gd1_mgmt_unfriend_rsp { - unsigned char uuid[16]; - string hostname<>; - int op_ret; - int op_errno; -} ; - -struct gd1_mgmt_cluster_lock_req { - unsigned char uuid[16]; -} ; - -struct gd1_mgmt_cluster_lock_rsp { - unsigned char uuid[16]; - int op_ret; - int op_errno; -} ; - -struct gd1_mgmt_cluster_unlock_req { - unsigned char uuid[16]; -} ; - -struct gd1_mgmt_cluster_unlock_rsp { - unsigned char uuid[16]; - int op_ret; - int op_errno; -} ; - -struct gd1_mgmt_stage_op_req { - unsigned char uuid[16]; - int op; - opaque buf<>; -} ; - - -struct gd1_mgmt_stage_op_rsp { - unsigned char uuid[16]; - int op; - int op_ret; - int op_errno; -} ; - -struct gd1_mgmt_commit_op_req { - unsigned char uuid[16]; - int op; - opaque buf<>; -} ; - - -struct gd1_mgmt_commit_op_rsp { - unsigned char uuid[16]; - int op; - int op_ret; - int op_errno; -} ; - - - - - diff --git a/xlators/protocol/lib/src/glusterd1_xdr.c b/xlators/protocol/lib/src/glusterd1_xdr.c deleted file mode 100644 index b35cc35804c..00000000000 --- a/xlators/protocol/lib/src/glusterd1_xdr.c +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "glusterd1.h" - -bool_t -xdr_gd1_mgmt_probe_req (XDR *xdrs, gd1_mgmt_probe_req *objp) -{ - 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; - return TRUE; -} - -bool_t -xdr_gd1_mgmt_probe_rsp (XDR *xdrs, gd1_mgmt_probe_rsp *objp) -{ - 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; - return TRUE; -} - -bool_t -xdr_gd1_mgmt_friend_req (XDR *xdrs, gd1_mgmt_friend_req *objp) -{ - 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; - return TRUE; -} - -bool_t -xdr_gd1_mgmt_friend_rsp (XDR *xdrs, gd1_mgmt_friend_rsp *objp) -{ - 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; - return TRUE; -} - -bool_t -xdr_gd1_mgmt_unfriend_req (XDR *xdrs, gd1_mgmt_unfriend_req *objp) -{ - 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; - return TRUE; -} - -bool_t -xdr_gd1_mgmt_unfriend_rsp (XDR *xdrs, gd1_mgmt_unfriend_rsp *objp) -{ - 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; - return TRUE; -} - -bool_t -xdr_gd1_mgmt_cluster_lock_req (XDR *xdrs, gd1_mgmt_cluster_lock_req *objp) -{ - 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) -{ - 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) -{ - 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) -{ - 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) -{ - 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) -{ - 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_commit_op_req (XDR *xdrs, gd1_mgmt_commit_op_req *objp) -{ - 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) -{ - 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; -} diff --git a/xlators/protocol/lib/src/glusterfs-xdr.c b/xlators/protocol/lib/src/glusterfs-xdr.c deleted file mode 100644 index 92b8c2ed247..00000000000 --- a/xlators/protocol/lib/src/glusterfs-xdr.c +++ /dev/null @@ -1,1733 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#include "glusterfs-xdr.h" -#include "iatt.h" - -bool_t -xdr_gf_statfs (XDR *xdrs, gf_statfs *objp) -{ - - 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_flock (XDR *xdrs, gf_flock *objp) -{ - - 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; - return TRUE; -} - -bool_t -xdr_gf_iatt (XDR *xdrs, gf_iatt *objp) -{ - register int32_t *buf; - - if (xdrs->x_op == XDR_ENCODE) { - if (!xdr_u_quad_t (xdrs, &objp->ia_ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_gen)) - 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_u_quad_t (xdrs, &objp->ia_ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_gen)) - 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_u_quad_t (xdrs, &objp->ia_ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ia_gen)) - 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) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_stat_rsp (XDR *xdrs, gfs3_stat_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_readlink_req (XDR *xdrs, gfs3_readlink_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->size)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_readlink_rsp (XDR *xdrs, gfs3_readlink_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->buf)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_mknod_req (XDR *xdrs, gfs3_mknod_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->par)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->dev)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_mknod_rsp (XDR *xdrs, gfs3_mknod_rsp *objp) -{ - - 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_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; - return TRUE; -} - -bool_t -xdr_gfs3_mkdir_req (XDR *xdrs, gfs3_mkdir_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->par)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_mkdir_rsp (XDR *xdrs, gfs3_mkdir_rsp *objp) -{ - - 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_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; - return TRUE; -} - -bool_t -xdr_gfs3_unlink_req (XDR *xdrs, gfs3_unlink_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->par)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_unlink_rsp (XDR *xdrs, gfs3_unlink_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->preparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_rmdir_req (XDR *xdrs, gfs3_rmdir_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->par)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_rmdir_rsp (XDR *xdrs, gfs3_rmdir_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->preparent)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_symlink_req (XDR *xdrs, gfs3_symlink_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->par)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->linkname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_symlink_rsp (XDR *xdrs, gfs3_symlink_rsp *objp) -{ - - 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_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; - return TRUE; -} - -bool_t -xdr_gfs3_rename_req (XDR *xdrs, gfs3_rename_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->oldpar)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->oldgen)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->newpar)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->newgen)) - return FALSE; - if (!xdr_string (xdrs, &objp->oldpath, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->oldbname, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->newpath, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->newbname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_rename_rsp (XDR *xdrs, gfs3_rename_rsp *objp) -{ - - 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_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; - return TRUE; -} - -bool_t -xdr_gfs3_link_req (XDR *xdrs, gfs3_link_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->oldino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->oldgen)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->newpar)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->newgen)) - return FALSE; - if (!xdr_string (xdrs, &objp->oldpath, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->newpath, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->newbname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_link_rsp (XDR *xdrs, gfs3_link_rsp *objp) -{ - - 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_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; - return TRUE; -} - -bool_t -xdr_gfs3_truncate_req (XDR *xdrs, gfs3_truncate_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_truncate_rsp (XDR *xdrs, gfs3_truncate_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->prestat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->poststat)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_open_req (XDR *xdrs, gfs3_open_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->wbflags)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_open_rsp (XDR *xdrs, gfs3_open_rsp *objp) -{ - - 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_quad_t (xdrs, &objp->fd)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_read_req (XDR *xdrs, gfs3_read_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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; - return TRUE; -} - -bool_t -xdr_gfs3_read_rsp (XDR *xdrs, gfs3_read_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->size)) - return FALSE; - - return TRUE; -} - -bool_t -xdr_gfs3_lookup_req (XDR *xdrs, gfs3_lookup_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->par)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~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_gfs3_lookup_rsp (XDR *xdrs, gfs3_lookup_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->postparent)) - 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_write_req (XDR *xdrs, gfs3_write_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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; - return TRUE; -} - -bool_t -xdr_gfs3_write_rsp (XDR *xdrs, gfs3_write_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->prestat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->poststat)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_statfs_req (XDR *xdrs, gfs3_statfs_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_statfs_rsp (XDR *xdrs, gfs3_statfs_rsp *objp) -{ - - 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_gf_statfs (xdrs, &objp->statfs)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_lk_req (XDR *xdrs, gfs3_lk_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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_flock (xdrs, &objp->flock)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_lk_rsp (XDR *xdrs, gfs3_lk_rsp *objp) -{ - - 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_gf_flock (xdrs, &objp->flock)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_inodelk_req (XDR *xdrs, gfs3_inodelk_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->cmd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->type)) - return FALSE; - if (!xdr_gf_flock (xdrs, &objp->flock)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->volume, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_finodelk_req (XDR *xdrs, gfs3_finodelk_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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_flock (xdrs, &objp->flock)) - return FALSE; - if (!xdr_string (xdrs, &objp->volume, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_flush_req (XDR *xdrs, gfs3_flush_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsync_req (XDR *xdrs, gfs3_fsync_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->data)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsync_rsp (XDR *xdrs, gfs3_fsync_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->prestat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->poststat)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_setxattr_req (XDR *xdrs, gfs3_setxattr_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsetxattr_req (XDR *xdrs, gfs3_fsetxattr_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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; - return TRUE; -} - -bool_t -xdr_gfs3_xattrop_req (XDR *xdrs, gfs3_xattrop_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_xattrop_rsp (XDR *xdrs, gfs3_xattrop_rsp *objp) -{ - - 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_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fxattrop_req (XDR *xdrs, gfs3_fxattrop_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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; - return TRUE; -} - -bool_t -xdr_gfs3_fxattrop_rsp (XDR *xdrs, gfs3_fxattrop_rsp *objp) -{ - - 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_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_getxattr_req (XDR *xdrs, gfs3_getxattr_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->namelen)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_getxattr_rsp (XDR *xdrs, gfs3_getxattr_rsp *objp) -{ - - 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_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fgetxattr_req (XDR *xdrs, gfs3_fgetxattr_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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; - return TRUE; -} - -bool_t -xdr_gfs3_fgetxattr_rsp (XDR *xdrs, gfs3_fgetxattr_rsp *objp) -{ - - 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_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_removexattr_req (XDR *xdrs, gfs3_removexattr_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_opendir_req (XDR *xdrs, gfs3_opendir_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_opendir_rsp (XDR *xdrs, gfs3_opendir_rsp *objp) -{ - - 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_quad_t (xdrs, &objp->fd)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsyncdir_req (XDR *xdrs, gfs3_fsyncdir_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_int (xdrs, &objp->data)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_readdir_req (XDR *xdrs, gfs3_readdir_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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; - return TRUE; -} - -bool_t -xdr_gfs3_readdirp_req (XDR *xdrs, gfs3_readdirp_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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; - return TRUE; -} - -bool_t -xdr_gf_setvolume_req (XDR *xdrs, gf_setvolume_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - 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_setvolume_rsp (XDR *xdrs, gf_setvolume_rsp *objp) -{ - - 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_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) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mask)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_create_req (XDR *xdrs, gfs3_create_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->par)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->mode)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->bname, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_create_rsp (XDR *xdrs, gfs3_create_rsp *objp) -{ - - 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_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; - return TRUE; -} - -bool_t -xdr_gfs3_ftruncate_req (XDR *xdrs, gfs3_ftruncate_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->offset)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_ftruncate_rsp (XDR *xdrs, gfs3_ftruncate_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->prestat)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->poststat)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fstat_req (XDR *xdrs, gfs3_fstat_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fstat_rsp (XDR *xdrs, gfs3_fstat_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->stat)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_entrylk_req (XDR *xdrs, gfs3_entrylk_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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->path, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->name, ~0)) - return FALSE; - if (!xdr_string (xdrs, &objp->volume, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fentrylk_req (XDR *xdrs, gfs3_fentrylk_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - 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; - return TRUE; -} - - -bool_t -xdr_gfs3_setattr_req (XDR *xdrs, gfs3_setattr_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->stbuf)) - return FALSE; - if (!xdr_int (xdrs, &objp->valid)) - return FALSE; - if (!xdr_string (xdrs, &objp->path, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_setattr_rsp (XDR *xdrs, gfs3_setattr_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->statpre)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->statpost)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_fsetattr_req (XDR *xdrs, gfs3_fsetattr_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - 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; - return TRUE; -} - -bool_t -xdr_gfs3_fsetattr_rsp (XDR *xdrs, gfs3_fsetattr_rsp *objp) -{ - - 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_gf_iatt (xdrs, &objp->statpre)) - return FALSE; - if (!xdr_gf_iatt (xdrs, &objp->statpost)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_rchecksum_req (XDR *xdrs, gfs3_rchecksum_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - 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->len)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_rchecksum_rsp (XDR *xdrs, gfs3_rchecksum_rsp *objp) -{ - register int32_t *buf; - - - if (xdrs->x_op == XDR_ENCODE) { - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - 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; - return TRUE; - } else if (xdrs->x_op == XDR_DECODE) { - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - 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; - return TRUE; - } - - 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_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; - return TRUE; -} - -bool_t -xdr_gf_getspec_req (XDR *xdrs, gf_getspec_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_string (xdrs, &objp->key, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_getspec_rsp (XDR *xdrs, gf_getspec_rsp *objp) -{ - - 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_string (xdrs, &objp->spec, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_log_req (XDR *xdrs, gf_log_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - 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) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_string (xdrs, &objp->buf, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_notify_rsp (XDR *xdrs, gf_notify_rsp *objp) -{ - register int32_t *buf; - - if (xdrs->x_op == XDR_ENCODE) { - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - 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; - return TRUE; - } else if (xdrs->x_op == XDR_DECODE) { - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - 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; - return TRUE; - } - - 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_u_int (xdrs, &objp->flags)) - return FALSE; - if (!xdr_string (xdrs, &objp->buf, ~0)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_releasedir_req (XDR *xdrs, gfs3_releasedir_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_release_req (XDR *xdrs, gfs3_release_req *objp) -{ - - if (!xdr_u_quad_t (xdrs, &objp->gfs_id)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->ino)) - return FALSE; - if (!xdr_u_quad_t (xdrs, &objp->gen)) - return FALSE; - if (!xdr_quad_t (xdrs, &objp->fd)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gf_common_rsp (XDR *xdrs, gf_common_rsp *objp) -{ - - 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; - return TRUE; -} - - -bool_t -xdr_gfs3_dirlist (XDR *xdrs, gfs3_dirlist *objp) -{ - 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) -{ - 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->reply, sizeof (gfs3_dirlist), (xdrproc_t) xdr_gfs3_dirlist)) - return FALSE; - return TRUE; -} - -bool_t -xdr_gfs3_dirplist (XDR *xdrs, gfs3_dirplist *objp) -{ - 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_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) -{ - 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->reply, sizeof (struct gfs3_dirplist), (xdrproc_t) xdr_gfs3_dirplist)) - return FALSE; - return TRUE; -} diff --git a/xlators/protocol/lib/src/glusterfs-xdr.h b/xlators/protocol/lib/src/glusterfs-xdr.h deleted file mode 100644 index a3afe8861ac..00000000000 --- a/xlators/protocol/lib/src/glusterfs-xdr.h +++ /dev/null @@ -1,1286 +0,0 @@ -/* - * Please do not edit this file. - * It was generated using rpcgen. - */ - -#ifndef _GLUSTERFS3_H_RPCGEN -#define _GLUSTERFS3_H_RPCGEN - -#include <rpc/rpc.h> -#include "xdr-common.h" -#include "iatt.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -#define GF_O_ACCMODE 003 -#define GF_O_RDONLY 00 -#define GF_O_WRONLY 01 -#define GF_O_RDWR 02 -#define GF_O_CREAT 0100 -#define GF_O_EXCL 0200 -#define GF_O_NOCTTY 0400 -#define GF_O_TRUNC 01000 -#define GF_O_APPEND 02000 -#define GF_O_NONBLOCK 04000 -#define GF_O_SYNC 010000 -#define GF_O_ASYNC 020000 - -#define GF_O_DIRECT 040000 -#define GF_O_DIRECTORY 0200000 -#define GF_O_NOFOLLOW 0400000 -#define GF_O_NOATIME 01000000 -#define GF_O_CLOEXEC 02000000 - -#define GF_O_LARGEFILE 0100000 - -#define XLATE_BIT(from, to, bit) do { \ - if (from & bit) \ - to = to | GF_##bit; \ - } while (0) - -#define UNXLATE_BIT(from, to, bit) do { \ - if (from & GF_##bit) \ - to = to | bit; \ - } while (0) - -#define XLATE_ACCESSMODE(from, to) do { \ - switch (from & O_ACCMODE) { \ - case O_RDONLY: to |= GF_O_RDONLY; \ - break; \ - case O_WRONLY: to |= GF_O_WRONLY; \ - break; \ - case O_RDWR: to |= GF_O_RDWR; \ - break; \ - } \ - } while (0) - -#define UNXLATE_ACCESSMODE(from, to) do { \ - switch (from & GF_O_ACCMODE) { \ - case GF_O_RDONLY: to |= O_RDONLY; \ - break; \ - case GF_O_WRONLY: to |= O_WRONLY; \ - break; \ - case GF_O_RDWR: to |= O_RDWR; \ - break; \ - } \ - } while (0) - -static inline uint32_t -gf_flags_from_flags (uint32_t flags) -{ - uint32_t gf_flags = 0; - - XLATE_ACCESSMODE (flags, gf_flags); - - XLATE_BIT (flags, gf_flags, O_CREAT); - XLATE_BIT (flags, gf_flags, O_EXCL); - XLATE_BIT (flags, gf_flags, O_NOCTTY); - XLATE_BIT (flags, gf_flags, O_TRUNC); - XLATE_BIT (flags, gf_flags, O_APPEND); - XLATE_BIT (flags, gf_flags, O_NONBLOCK); - XLATE_BIT (flags, gf_flags, O_SYNC); - XLATE_BIT (flags, gf_flags, O_ASYNC); - - XLATE_BIT (flags, gf_flags, O_DIRECT); - XLATE_BIT (flags, gf_flags, O_DIRECTORY); - XLATE_BIT (flags, gf_flags, O_NOFOLLOW); -#ifdef O_NOATIME - XLATE_BIT (flags, gf_flags, O_NOATIME); -#endif -#ifdef O_CLOEXEC - XLATE_BIT (flags, gf_flags, O_CLOEXEC); -#endif - XLATE_BIT (flags, gf_flags, O_LARGEFILE); - - return gf_flags; -} - -static inline uint32_t -gf_flags_to_flags (uint32_t gf_flags) -{ - uint32_t flags = 0; - - UNXLATE_ACCESSMODE (gf_flags, flags); - - UNXLATE_BIT (gf_flags, flags, O_CREAT); - UNXLATE_BIT (gf_flags, flags, O_EXCL); - UNXLATE_BIT (gf_flags, flags, O_NOCTTY); - UNXLATE_BIT (gf_flags, flags, O_TRUNC); - UNXLATE_BIT (gf_flags, flags, O_APPEND); - UNXLATE_BIT (gf_flags, flags, O_NONBLOCK); - UNXLATE_BIT (gf_flags, flags, O_SYNC); - UNXLATE_BIT (gf_flags, flags, O_ASYNC); - - UNXLATE_BIT (gf_flags, flags, O_DIRECT); - UNXLATE_BIT (gf_flags, flags, O_DIRECTORY); - UNXLATE_BIT (gf_flags, flags, O_NOFOLLOW); -#ifdef O_NOATIME - UNXLATE_BIT (gf_flags, flags, O_NOATIME); -#endif -#ifdef O_CLOEXEC - UNXLATE_BIT (gf_flags, flags, O_CLOEXEC); -#endif - UNXLATE_BIT (gf_flags, flags, O_LARGEFILE); - - return flags; -} - - -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; - -static inline void -gf_statfs_to_statfs (struct gf_statfs *gf_stat, struct statvfs *stat) -{ - if (!stat || !gf_stat) - return; - - stat->f_bsize = (gf_stat->bsize); - stat->f_frsize = (gf_stat->frsize); - stat->f_blocks = (gf_stat->blocks); - stat->f_bfree = (gf_stat->bfree); - stat->f_bavail = (gf_stat->bavail); - stat->f_files = (gf_stat->files); - stat->f_ffree = (gf_stat->ffree); - stat->f_favail = (gf_stat->favail); - stat->f_fsid = (gf_stat->fsid); - stat->f_flag = (gf_stat->flag); - stat->f_namemax = (gf_stat->namemax); -} - - -static inline void -gf_statfs_from_statfs (struct gf_statfs *gf_stat, struct statvfs *stat) -{ - if (!stat || !gf_stat) - return; - - gf_stat->bsize = stat->f_bsize; - gf_stat->frsize = stat->f_frsize; - gf_stat->blocks = stat->f_blocks; - gf_stat->bfree = stat->f_bfree; - gf_stat->bavail = stat->f_bavail; - gf_stat->files = stat->f_files; - gf_stat->ffree = stat->f_ffree; - gf_stat->favail = stat->f_favail; - gf_stat->fsid = stat->f_fsid; - gf_stat->flag = stat->f_flag; - gf_stat->namemax = stat->f_namemax; -} - -struct gf_flock { - u_int type; - u_int whence; - u_quad_t start; - u_quad_t len; - u_int pid; -}; -typedef struct gf_flock gf_flock; - - -static inline void -gf_flock_to_flock (struct gf_flock *gf_flock, struct flock *flock) -{ - if (!flock || !gf_flock) - return; - - flock->l_type = gf_flock->type; - flock->l_whence = gf_flock->whence; - flock->l_start = gf_flock->start; - flock->l_len = gf_flock->len; - flock->l_pid = gf_flock->pid; -} - - -static inline void -gf_flock_from_flock (struct gf_flock *gf_flock, struct flock *flock) -{ - if (!flock || !gf_flock) - return; - - gf_flock->type = (flock->l_type); - gf_flock->whence = (flock->l_whence); - gf_flock->start = (flock->l_start); - gf_flock->len = (flock->l_len); - gf_flock->pid = (flock->l_pid); -} - -struct gf_iatt { - u_quad_t ia_ino; - u_quad_t ia_gen; - 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; -} __attribute__((packed)); -typedef struct gf_iatt gf_iatt; - - -static inline void -gf_stat_to_iatt (struct gf_iatt *gf_stat, struct iatt *iatt) -{ - if (!iatt || !gf_stat) - return; - - iatt->ia_ino = gf_stat->ia_ino ; - iatt->ia_gen = gf_stat->ia_gen ; - iatt->ia_dev = gf_stat->ia_dev ; - iatt->ia_type = ia_type_from_st_mode (gf_stat->mode) ; - iatt->ia_prot = ia_prot_from_st_mode (gf_stat->mode) ; - iatt->ia_nlink = gf_stat->ia_nlink ; - iatt->ia_uid = gf_stat->ia_uid ; - iatt->ia_gid = gf_stat->ia_gid ; - iatt->ia_rdev = gf_stat->ia_rdev ; - iatt->ia_size = gf_stat->ia_size ; - iatt->ia_blksize = gf_stat->ia_blksize ; - iatt->ia_blocks = gf_stat->ia_blocks ; - iatt->ia_atime = gf_stat->ia_atime ; - iatt->ia_atime_nsec = gf_stat->ia_atime_nsec ; - iatt->ia_mtime = gf_stat->ia_mtime ; - iatt->ia_mtime_nsec = gf_stat->ia_mtime_nsec ; - iatt->ia_ctime = gf_stat->ia_ctime ; - iatt->ia_ctime_nsec = gf_stat->ia_ctime_nsec ; -} - - -static inline void -gf_stat_from_iatt (struct gf_iatt *gf_stat, struct iatt *iatt) -{ - if (!iatt || !gf_stat) - return; - - gf_stat->ia_ino = iatt->ia_ino ; - gf_stat->ia_gen = iatt->ia_gen ; - gf_stat->ia_dev = iatt->ia_dev ; - gf_stat->mode = st_mode_from_ia (iatt->ia_prot, iatt->ia_type); - gf_stat->ia_nlink = iatt->ia_nlink ; - gf_stat->ia_uid = iatt->ia_uid ; - gf_stat->ia_gid = iatt->ia_gid ; - gf_stat->ia_rdev = iatt->ia_rdev ; - gf_stat->ia_size = iatt->ia_size ; - gf_stat->ia_blksize = iatt->ia_blksize ; - gf_stat->ia_blocks = iatt->ia_blocks ; - gf_stat->ia_atime = iatt->ia_atime ; - gf_stat->ia_atime_nsec = iatt->ia_atime_nsec ; - gf_stat->ia_mtime = iatt->ia_mtime ; - gf_stat->ia_mtime_nsec = iatt->ia_mtime_nsec ; - gf_stat->ia_ctime = iatt->ia_ctime ; - gf_stat->ia_ctime_nsec = iatt->ia_ctime_nsec ; -} - - -/* Gluster FS Payload structures */ - -struct gfs3_stat_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - char *path; -}; -typedef struct gfs3_stat_req gfs3_stat_req; - -struct gfs3_stat_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; -}; -typedef struct gfs3_stat_rsp gfs3_stat_rsp; - -struct gfs3_readlink_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - u_int size; - char *path; -}; -typedef struct gfs3_readlink_req gfs3_readlink_req; - -struct gfs3_readlink_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt buf; - char *path; -}; -typedef struct gfs3_readlink_rsp gfs3_readlink_rsp; - -struct gfs3_mknod_req { - u_quad_t gfs_id; - u_quad_t par; - u_quad_t gen; - u_quad_t dev; - u_int mode; - char *path; - char *bname; -}; -typedef struct gfs3_mknod_req gfs3_mknod_req; - -struct gfs3_mknod_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; -typedef struct gfs3_mknod_rsp gfs3_mknod_rsp; - -struct gfs3_mkdir_req { - u_quad_t gfs_id; - u_quad_t par; - u_quad_t gen; - u_int mode; - char *path; - char *bname; -}; -typedef struct gfs3_mkdir_req gfs3_mkdir_req; - -struct gfs3_mkdir_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; -typedef struct gfs3_mkdir_rsp gfs3_mkdir_rsp; - -struct gfs3_unlink_req { - u_quad_t gfs_id; - u_quad_t par; - u_quad_t gen; - char *path; - char *bname; -}; -typedef struct gfs3_unlink_req gfs3_unlink_req; - -struct gfs3_unlink_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; -typedef struct gfs3_unlink_rsp gfs3_unlink_rsp; - -struct gfs3_rmdir_req { - u_quad_t gfs_id; - u_quad_t par; - u_quad_t gen; - char *path; - char *bname; -}; -typedef struct gfs3_rmdir_req gfs3_rmdir_req; - -struct gfs3_rmdir_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; -typedef struct gfs3_rmdir_rsp gfs3_rmdir_rsp; - -struct gfs3_symlink_req { - u_quad_t gfs_id; - u_quad_t par; - u_quad_t gen; - char *path; - char *bname; - char *linkname; -}; -typedef struct gfs3_symlink_req gfs3_symlink_req; - -struct gfs3_symlink_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; -typedef struct gfs3_symlink_rsp gfs3_symlink_rsp; - -struct gfs3_rename_req { - u_quad_t gfs_id; - u_quad_t oldpar; - u_quad_t oldgen; - u_quad_t newpar; - u_quad_t newgen; - char *oldpath; - char *oldbname; - char *newpath; - char *newbname; -}; -typedef struct gfs3_rename_req gfs3_rename_req; - -struct gfs3_rename_rsp { - u_quad_t gfs_id; - 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; -}; -typedef struct gfs3_rename_rsp gfs3_rename_rsp; - -struct gfs3_link_req { - u_quad_t gfs_id; - u_quad_t oldino; - u_quad_t oldgen; - u_quad_t newpar; - u_quad_t newgen; - char *oldpath; - char *newpath; - char *newbname; -}; -typedef struct gfs3_link_req gfs3_link_req; - -struct gfs3_link_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; -typedef struct gfs3_link_rsp gfs3_link_rsp; - -struct gfs3_truncate_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - u_quad_t offset; - char *path; -}; -typedef struct gfs3_truncate_req gfs3_truncate_req; - -struct gfs3_truncate_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; -}; -typedef struct gfs3_truncate_rsp gfs3_truncate_rsp; - -struct gfs3_open_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - u_int flags; - u_int wbflags; - char *path; -}; -typedef struct gfs3_open_req gfs3_open_req; - -struct gfs3_open_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - quad_t fd; -}; -typedef struct gfs3_open_rsp gfs3_open_rsp; - -struct gfs3_read_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_quad_t offset; - u_int size; -}; -typedef struct gfs3_read_req gfs3_read_req; - -struct gfs3_read_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - u_int size; -} __attribute__((packed)); -typedef struct gfs3_read_rsp gfs3_read_rsp; - -struct gfs3_lookup_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t par; - u_quad_t gen; - u_int flags; - char *path; - char *bname; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gfs3_lookup_req gfs3_lookup_req; - -struct gfs3_lookup_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt postparent; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gfs3_lookup_rsp gfs3_lookup_rsp; - -struct gfs3_write_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_quad_t offset; - u_int size; -} __attribute__((packed)); -typedef struct gfs3_write_req gfs3_write_req; - -struct gfs3_write_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; -}; -typedef struct gfs3_write_rsp gfs3_write_rsp; - -struct gfs3_statfs_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - char *path; -}; -typedef struct gfs3_statfs_req gfs3_statfs_req; - -struct gfs3_statfs_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_statfs statfs; -}; -typedef struct gfs3_statfs_rsp gfs3_statfs_rsp; - -struct gfs3_lk_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_int cmd; - u_int type; - struct gf_flock flock; -}; -typedef struct gfs3_lk_req gfs3_lk_req; - -struct gfs3_lk_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_flock flock; -}; -typedef struct gfs3_lk_rsp gfs3_lk_rsp; - -struct gfs3_inodelk_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - u_int cmd; - u_int type; - struct gf_flock flock; - char *path; - char *volume; -}; -typedef struct gfs3_inodelk_req gfs3_inodelk_req; - -struct gfs3_finodelk_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_int cmd; - u_int type; - struct gf_flock flock; - char *volume; -}; -typedef struct gfs3_finodelk_req gfs3_finodelk_req; - -struct gfs3_flush_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; -}; -typedef struct gfs3_flush_req gfs3_flush_req; - -struct gfs3_fsync_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_int data; -}; -typedef struct gfs3_fsync_req gfs3_fsync_req; - -struct gfs3_fsync_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; -}; -typedef struct gfs3_fsync_rsp gfs3_fsync_rsp; - -struct gfs3_setxattr_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - u_int flags; - struct { - u_int dict_len; - char *dict_val; - } dict; - char *path; -}; -typedef struct gfs3_setxattr_req gfs3_setxattr_req; - -struct gfs3_fsetxattr_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_int flags; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gfs3_fsetxattr_req gfs3_fsetxattr_req; - -struct gfs3_xattrop_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - u_int flags; - struct { - u_int dict_len; - char *dict_val; - } dict; - char *path; -}; -typedef struct gfs3_xattrop_req gfs3_xattrop_req; - -struct gfs3_xattrop_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gfs3_xattrop_rsp gfs3_xattrop_rsp; - -struct gfs3_fxattrop_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_int flags; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gfs3_fxattrop_req gfs3_fxattrop_req; - -struct gfs3_fxattrop_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gfs3_fxattrop_rsp gfs3_fxattrop_rsp; - -struct gfs3_getxattr_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - u_int namelen; - char *path; - char *name; -}; -typedef struct gfs3_getxattr_req gfs3_getxattr_req; - -struct gfs3_getxattr_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gfs3_getxattr_rsp gfs3_getxattr_rsp; - -struct gfs3_fgetxattr_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_int namelen; - char *name; -}; -typedef struct gfs3_fgetxattr_req gfs3_fgetxattr_req; - -struct gfs3_fgetxattr_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gfs3_fgetxattr_rsp gfs3_fgetxattr_rsp; - -struct gfs3_removexattr_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - char *path; - char *name; -}; -typedef struct gfs3_removexattr_req gfs3_removexattr_req; - -struct gfs3_opendir_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - char *path; -}; -typedef struct gfs3_opendir_req gfs3_opendir_req; - -struct gfs3_opendir_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - quad_t fd; -}; -typedef struct gfs3_opendir_rsp gfs3_opendir_rsp; - -struct gfs3_fsyncdir_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - int data; -}; -typedef struct gfs3_fsyncdir_req gfs3_fsyncdir_req; - -struct gfs3_readdir_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_quad_t offset; - u_int size; -}; -typedef struct gfs3_readdir_req gfs3_readdir_req; - -struct gfs3_readdirp_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_quad_t offset; - u_int size; -}; -typedef struct gfs3_readdirp_req gfs3_readdirp_req; - -struct gf_setvolume_req { - u_quad_t gfs_id; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gf_setvolume_req gf_setvolume_req; - -struct gf_setvolume_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct { - u_int dict_len; - char *dict_val; - } dict; -}; -typedef struct gf_setvolume_rsp gf_setvolume_rsp; - -struct gfs3_access_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - u_int mask; - char *path; -}; -typedef struct gfs3_access_req gfs3_access_req; - -struct gfs3_create_req { - u_quad_t gfs_id; - u_quad_t par; - u_quad_t gen; - u_int flags; - u_int mode; - char *path; - char *bname; -}; -typedef struct gfs3_create_req gfs3_create_req; - -struct gfs3_create_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - u_quad_t fd; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; -typedef struct gfs3_create_rsp gfs3_create_rsp; - -struct gfs3_ftruncate_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_quad_t offset; -}; -typedef struct gfs3_ftruncate_req gfs3_ftruncate_req; - -struct gfs3_ftruncate_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; -}; -typedef struct gfs3_ftruncate_rsp gfs3_ftruncate_rsp; - -struct gfs3_fstat_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; -}; -typedef struct gfs3_fstat_req gfs3_fstat_req; - -struct gfs3_fstat_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; -}; -typedef struct gfs3_fstat_rsp gfs3_fstat_rsp; - -struct gfs3_entrylk_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - u_int cmd; - u_int type; - u_quad_t namelen; - char *path; - char *name; - char *volume; -}; -typedef struct gfs3_entrylk_req gfs3_entrylk_req; - -struct gfs3_fentrylk_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; - u_int cmd; - u_int type; - u_quad_t namelen; - char *name; - char *volume; -}; -typedef struct gfs3_fentrylk_req gfs3_fentrylk_req; - - -struct gfs3_setattr_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - struct gf_iatt stbuf; - int valid; - char *path; -}; -typedef struct gfs3_setattr_req gfs3_setattr_req; - -struct gfs3_setattr_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt statpre; - struct gf_iatt statpost; -}; -typedef struct gfs3_setattr_rsp gfs3_setattr_rsp; - -struct gfs3_fsetattr_req { - u_quad_t gfs_id; - quad_t fd; - struct gf_iatt stbuf; - int valid; -}; -typedef struct gfs3_fsetattr_req gfs3_fsetattr_req; - -struct gfs3_fsetattr_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gf_iatt statpre; - struct gf_iatt statpost; -}; -typedef struct gfs3_fsetattr_rsp gfs3_fsetattr_rsp; - -struct gfs3_rchecksum_req { - u_quad_t gfs_id; - quad_t fd; - u_quad_t offset; - u_int len; -}; -typedef struct gfs3_rchecksum_req gfs3_rchecksum_req; - -struct gfs3_rchecksum_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - u_int weak_checksum; - struct { - u_int strong_checksum_len; - char *strong_checksum_val; - } strong_checksum; -}; -typedef struct gfs3_rchecksum_rsp gfs3_rchecksum_rsp; - -struct gf_getspec_req { - u_quad_t gfs_id; - u_int flags; - char *key; -}; -typedef struct gf_getspec_req gf_getspec_req; - -struct gf_getspec_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - char *spec; -}; -typedef struct gf_getspec_rsp gf_getspec_rsp; - -struct gf_log_req { - u_quad_t gfs_id; - struct { - u_int msg_len; - char *msg_val; - } msg; -}; -typedef struct gf_log_req gf_log_req; - -struct gf_notify_req { - u_quad_t gfs_id; - u_int flags; - char *buf; -}; -typedef struct gf_notify_req gf_notify_req; - -struct gf_notify_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - u_int flags; - char *buf; -}; -typedef struct gf_notify_rsp gf_notify_rsp; - -struct gfs3_releasedir_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; -}; -typedef struct gfs3_releasedir_req gfs3_releasedir_req; - -struct gfs3_release_req { - u_quad_t gfs_id; - u_quad_t ino; - u_quad_t gen; - quad_t fd; -}; -typedef struct gfs3_release_req gfs3_release_req; - -struct gf_common_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; -}; -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 { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gfs3_dirlist *reply; -}; -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 gfs3_dirplist *nextentry; -}; -typedef struct gfs3_dirplist gfs3_dirplist; - -struct gfs3_readdirp_rsp { - u_quad_t gfs_id; - int op_ret; - int op_errno; - struct gfs3_dirplist *reply; -}; -typedef struct gfs3_readdirp_rsp gfs3_readdirp_rsp; - - -/* the xdr functions */ - -#if defined(__STDC__) || defined(__cplusplus) -extern bool_t xdr_gf_statfs (XDR *, gf_statfs*); -extern bool_t xdr_gf_flock (XDR *, gf_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_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_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_gfs3_readdirp_req (XDR *, gfs3_readdirp_req*); -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_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_rchecksum_req (XDR *, gfs3_rchecksum_req*); -extern bool_t xdr_gfs3_rchecksum_rsp (XDR *, gfs3_rchecksum_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_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*); - -#else /* K&R C */ -extern bool_t xdr_gf_statfs (); -extern bool_t xdr_gf_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_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_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_gfs3_readdirp_req (); -extern bool_t xdr_gf_setvolume_req (); -extern bool_t xdr_gf_setvolume_rsp (); -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_rchecksum_req (); -extern bool_t xdr_gfs3_rchecksum_rsp (); -extern bool_t xdr_gfs3_releasedir_req (); -extern bool_t xdr_gfs3_release_req (); -extern bool_t xdr_gf_getspec_req (); -extern bool_t xdr_gf_getspec_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_gf_common_rsp (); - -#endif /* K&R C */ - -#ifdef __cplusplus -} -#endif - -#endif /* !_GLUSTERFS3_H_RPCGEN */ diff --git a/xlators/protocol/lib/src/glusterfs3.x b/xlators/protocol/lib/src/glusterfs3.x deleted file mode 100644 index cafe965efaf..00000000000 --- a/xlators/protocol/lib/src/glusterfs3.x +++ /dev/null @@ -1,765 +0,0 @@ -#define GF_REQUEST_MAXGROUPS 16 -struct gf_statfs { - unsigned hyper bsize; - unsigned hyper frsize; - unsigned hyper blocks; - unsigned hyper bfree; - unsigned hyper bavail; - unsigned hyper files; - unsigned hyper ffree; - unsigned hyper favail; - unsigned hyper fsid; - unsigned hyper flag; - unsigned hyper namemax; -}; - -struct gf_flock { - unsigned int type; - unsigned int whence; - unsigned hyper start; - unsigned hyper len; - unsigned int pid; -} ; - - -struct gf_iatt { - unsigned hyper ia_ino; /* inode number */ - unsigned hyper ia_gen; /* generation number */ - unsigned hyper ia_dev; /* backing device ID */ - unsigned int mode; /* mode (type + protection )*/ - unsigned int ia_nlink; /* Link count */ - unsigned int ia_uid; /* user ID of owner */ - unsigned int ia_gid; /* group ID of owner */ - unsigned hyper ia_rdev; /* device ID (if special file) */ - unsigned hyper ia_size; /* file size in bytes */ - unsigned int ia_blksize; /* blocksize for filesystem I/O */ - unsigned hyper ia_blocks; /* number of 512B blocks allocated */ - unsigned int ia_atime; /* last access time */ - unsigned int ia_atime_nsec; - unsigned int ia_mtime; /* last modification time */ - unsigned int ia_mtime_nsec; - unsigned int ia_ctime; /* last status change time */ - unsigned int ia_ctime_nsec; -}; - -struct gfs3_stat_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - string path<>; /* NULL terminated */ -}; -struct gfs3_stat_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; -} ; - - -struct gfs3_readlink_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - unsigned int size; - string path<>; /* NULL terminated */ -} ; - struct gfs3_readlink_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt buf; - string path<>; /* NULL terminated */ -} ; - - - struct gfs3_mknod_req { - unsigned hyper gfs_id; - unsigned hyper par; - unsigned hyper gen; - unsigned hyper dev; - unsigned int mode; - string path<>; /* NULL terminated */ - string bname<>; /* NULL terminated */ -} ; - struct gfs3_mknod_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; - - - struct gfs3_mkdir_req { - unsigned hyper gfs_id; - unsigned hyper par; - unsigned hyper gen; - unsigned int mode; - string path<>; /* NULL terminated */ - string bname<>; /* NULL terminated */ -} ; - struct gfs3_mkdir_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; -} ; - - - struct gfs3_unlink_req { - unsigned hyper gfs_id; - unsigned hyper par; - unsigned hyper gen; - string path<>; /* NULL terminated */ - string bname<>; /* NULL terminated */ -}; - struct gfs3_unlink_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; - - - struct gfs3_rmdir_req { - unsigned hyper gfs_id; - unsigned hyper par; - unsigned hyper gen; - string path<>; - string bname<>; /* NULL terminated */ -}; - struct gfs3_rmdir_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; - - - struct gfs3_symlink_req { - unsigned hyper gfs_id; - unsigned hyper par; - unsigned hyper gen; - string path<>; - string bname<>; - string linkname<>; -}; - struct gfs3_symlink_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; - - - struct gfs3_rename_req { - unsigned hyper gfs_id; - unsigned hyper oldpar; - unsigned hyper oldgen; - unsigned hyper newpar; - unsigned hyper newgen; - string oldpath<>; - string oldbname<>; /* NULL terminated */ - string newpath<>; - string newbname<>; /* NULL terminated */ -}; - struct gfs3_rename_rsp { - unsigned hyper gfs_id; - 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 gfs3_link_req { - unsigned hyper gfs_id; - unsigned hyper oldino; - unsigned hyper oldgen; - unsigned hyper newpar; - unsigned hyper newgen; - string oldpath<>; - string newpath<>; - string newbname<>; -}; - struct gfs3_link_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt preparent; - struct gf_iatt postparent; -}; - - struct gfs3_truncate_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - unsigned hyper offset; - string path<>; -}; - struct gfs3_truncate_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; -}; - - - struct gfs3_open_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - unsigned int flags; - unsigned int wbflags; - string path<>; -}; - struct gfs3_open_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - hyper fd; -}; - - - struct gfs3_read_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned hyper offset; - unsigned int size; -}; - struct gfs3_read_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - string buf<>; -} ; - -struct gfs3_lookup_req { - unsigned hyper gfs_id; - unsigned hyper ino; /* NOTE: used only in case of 'root' lookup */ - unsigned hyper par; - unsigned hyper gen; - unsigned int flags; - string path<>; - string bname<>; - opaque dict<>; -}; - struct gfs3_lookup_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - struct gf_iatt postparent; - opaque dict<>; -} ; - - - - struct gfs3_write_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned hyper offset; - unsigned int size; -}; - struct gfs3_write_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; -} ; - - - struct gfs3_statfs_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - string path<>; -} ; - struct gfs3_statfs_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_statfs statfs; -} ; - - struct gfs3_lk_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned int cmd; - unsigned int type; - struct gf_flock flock; -} ; - struct gfs3_lk_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_flock flock; -} ; - - struct gfs3_inodelk_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - unsigned int cmd; - unsigned int type; - struct gf_flock flock; - string path<>; - string volume<>; -} ; - -struct gfs3_finodelk_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned int cmd; - unsigned int type; - struct gf_flock flock; - string volume<>; -} ; - - - struct gfs3_flush_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; -} ; - - - struct gfs3_fsync_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned int data; -} ; - struct gfs3_fsync_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; -} ; - - - struct gfs3_setxattr_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - unsigned int flags; - opaque dict<>; - string path<>; -} ; - - - - struct gfs3_fsetxattr_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned int flags; - opaque dict<>; -} ; - - - - struct gfs3_xattrop_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - unsigned int flags; - opaque dict<>; - string path<>; -} ; - - struct gfs3_xattrop_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - opaque dict<>; -} ; - - - struct gfs3_fxattrop_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned int flags; - opaque dict<>; -} ; - - struct gfs3_fxattrop_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - opaque dict<>; -} ; - - - struct gfs3_getxattr_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - unsigned int namelen; - string path<>; - string name<>; -} ; - struct gfs3_getxattr_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - opaque dict<>; -} ; - - - struct gfs3_fgetxattr_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned int namelen; - string name<>; -} ; - struct gfs3_fgetxattr_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - opaque dict<>; -} ; - - - struct gfs3_removexattr_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - string path<>; - string name<>; -} ; - - - - struct gfs3_opendir_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - string path<>; -} ; - struct gfs3_opendir_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - hyper fd; -} ; - - - struct gfs3_fsyncdir_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - int data; -} ; - - struct gfs3_readdir_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned hyper offset; - unsigned int size; -}; -struct gfs3_dirlist { - unsigned hyper d_ino; - unsigned hyper d_off; - unsigned int d_len; - unsigned int d_type; - char *name; - struct gfs3_dirlist *nextentry; -}; - -struct gfs3_readdir_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gfs3_dirlist reply; -}; - - - -struct gfs3_dirplist { - unsigned hyper d_ino; - unsigned hyper d_off; - unsigned int d_len; - unsigned int d_type; - char *name; - struct gf_iatt name_attributes; - struct gfs3_dirplist *nextentry; -}; - -struct gfs3_readdirp_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gfs3_dirlistp reply; -}; - - - struct gfs3_readdirp_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned hyper offset; - unsigned int size; -} ; - - - struct gf_setvolume_req { - unsigned hyper gfs_id; - opaque dict<>; -} ; - struct gf_setvolume_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - opaque dict<>; -} ; - -struct gfs3_access_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - unsigned int mask; - string path<>; -} ; - - -struct gfs3_create_req { - unsigned hyper gfs_id; - unsigned hyper par; - unsigned hyper gen; - unsigned int flags; - unsigned int mode; - string path<>; - string bname<>; -} ; -struct gfs3_create_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; - unsigned hyper fd; - struct gf_iatt preparent; - struct gf_iatt postparent; -} ; - - - -struct gfs3_ftruncate_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned hyper offset; -} ; -struct gfs3_ftruncate_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt prestat; - struct gf_iatt poststat; -} ; - - -struct gfs3_fstat_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; -} ; - struct gfs3_fstat_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt stat; -} ; - - - - struct gfs3_entrylk_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - unsigned int cmd; - unsigned int type; - unsigned hyper namelen; - string path<>; - string name<>; - string volume<>; -}; - - struct gfs3_fentrylk_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; - unsigned int cmd; - unsigned int type; - unsigned hyper namelen; - string name<>; - string volume<>; -}; - - - struct gfs3_setattr_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - struct gf_iatt stbuf; - int valid; - string path<>; -} ; - struct gfs3_setattr_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt statpre; - struct gf_iatt statpost; -} ; - - struct gfs3_fsetattr_req { - unsigned hyper gfs_id; - hyper fd; - struct gf_iatt stbuf; - int valid; -} ; - struct gfs3_fsetattr_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - struct gf_iatt statpre; - struct gf_iatt statpost; -} ; - - struct gfs3_rchecksum_req { - unsigned hyper gfs_id; - hyper fd; - unsigned hyper offset; - unsigned int len; -} ; - struct gfs3_rchecksum_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - unsigned int weak_checksum; - opaque strong_checksum<>; -} ; - struct gfs3_releasedir_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; -} ; - -struct gfs3_release_req { - unsigned hyper gfs_id; - unsigned hyper ino; - unsigned hyper gen; - hyper fd; -} ; - - - struct gf_getspec_req { - unsigned hyper gfs_id; - unsigned int flags; - string key<>; -} ; - struct gf_getspec_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - string spec<>; -} ; - - - struct gf_log_req { - unsigned hyper gfs_id; - opaque msg<>; -}; - - struct gf_notify_req { - unsigned hyper gfs_id; - unsigned int flags; - string buf<>; -} ; - struct gf_notify_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; - unsigned int flags; - string buf<>; -} ; - - - -struct gf_common_rsp { - unsigned hyper gfs_id; - int op_ret; - int op_errno; -} ; - - -struct gf_dump_req { - unsigned hyper gfs_id; -}; - -struct gf_prog_detail { - string progname<>; - unsigned hyper prognum; - unsigned hyper progver; - struct gf_prog_detail *next; -}; - -struct gf_dump_rsp { - unsigned hyper gfs_id; - struct gf_prog_detail *prog; -}; - -struct auth_glusterfs_parms { - unsigned int pid; - unsigned int uid; - unsigned int gid; - - /* Number of groups being sent through the array above. */ - unsigned int ngrps; - - /* Array of groups to which the uid belongs apart from the primary group - * in gid. - */ - unsigned int groups[GF_REQUEST_MAXGROUPS]; - - unsigned hyper lk_owner; -}; diff --git a/xlators/protocol/lib/src/msg-xdr.c b/xlators/protocol/lib/src/msg-xdr.c deleted file mode 100644 index 9c5b8b81b38..00000000000 --- a/xlators/protocol/lib/src/msg-xdr.c +++ /dev/null @@ -1,1212 +0,0 @@ -/* - Copyright (c) 2007-2010 Gluster, Inc. <http://www.gluster.com> - This file is part of GlusterFS. - - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. -*/ - - -#include "msg-xdr.h" - - -ssize_t -xdr_serialize_generic (struct iovec outmsg, void *res, xdrproc_t proc) -{ - ssize_t ret = -1; - XDR xdr; - - if ((!outmsg.iov_base) || (!res) || (!proc)) - return -1; - - xdrmem_create (&xdr, outmsg.iov_base, (unsigned int)outmsg.iov_len, - XDR_ENCODE); - - if (!proc (&xdr, res)) { - ret = -1; - goto ret; - } - - ret = xdr_encoded_length (xdr); - -ret: - return ret; -} - - -ssize_t -xdr_to_generic (struct iovec inmsg, void *args, xdrproc_t proc) -{ - XDR xdr; - ssize_t ret = -1; - - if ((!inmsg.iov_base) || (!args) || (!proc)) - return -1; - - xdrmem_create (&xdr, inmsg.iov_base, (unsigned int)inmsg.iov_len, - XDR_DECODE); - - if (!proc (&xdr, args)) { - ret = -1; - goto ret; - } - - ret = xdr_decoded_length (xdr); -ret: - return ret; -} - - -ssize_t -xdr_to_generic_payload (struct iovec inmsg, void *args, xdrproc_t proc, - struct iovec *pendingpayload) -{ - XDR xdr; - ssize_t ret = -1; - - if ((!inmsg.iov_base) || (!args) || (!proc)) - return -1; - - xdrmem_create (&xdr, inmsg.iov_base, (unsigned int)inmsg.iov_len, - XDR_DECODE); - - if (!proc (&xdr, args)) { - ret = -1; - goto ret; - } - - ret = xdr_decoded_length (xdr); - - if (pendingpayload) { - pendingpayload->iov_base = xdr_decoded_remaining_addr (xdr); - pendingpayload->iov_len = xdr_decoded_remaining_len (xdr); - } - -ret: - return ret; -} - -/* Encode */ - -ssize_t -xdr_serialize_getspec_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf_getspec_rsp); - -} - -ssize_t -xdr_serialize_lookup_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_lookup_rsp); - -} - -ssize_t -xdr_serialize_common_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf_common_rsp); - -} - -ssize_t -xdr_serialize_setvolume_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf_setvolume_rsp); - -} -ssize_t -xdr_serialize_statfs_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_statfs_rsp); - -} -ssize_t -xdr_serialize_stat_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_stat_rsp); - -} -ssize_t -xdr_serialize_fstat_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_fstat_rsp); - -} -ssize_t -xdr_serialize_open_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_open_rsp); - -} -ssize_t -xdr_serialize_read_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_read_rsp); - -} -ssize_t -xdr_serialize_write_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_write_rsp); - -} -ssize_t -xdr_serialize_rename_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_rename_rsp); - -} -ssize_t -xdr_serialize_fsync_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_fsync_rsp); - -} -ssize_t -xdr_serialize_rmdir_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_rmdir_rsp); -} -ssize_t -xdr_serialize_unlink_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_unlink_rsp); -} -ssize_t -xdr_serialize_writev_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_write_rsp); -} -ssize_t -xdr_serialize_readv_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_read_rsp); -} -ssize_t -xdr_serialize_readdir_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_readdir_rsp); -} -ssize_t -xdr_serialize_readdirp_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_readdirp_rsp); -} -ssize_t -xdr_serialize_rchecksum_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_rchecksum_rsp); -} -ssize_t -xdr_serialize_setattr_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_setattr_rsp); -} -ssize_t -xdr_serialize_fsetattr_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_fsetattr_rsp); -} - -ssize_t -xdr_serialize_readlink_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_readlink_rsp); - -} -ssize_t -xdr_serialize_symlink_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_symlink_rsp); - -} -ssize_t -xdr_serialize_create_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_create_rsp); - -} -ssize_t -xdr_serialize_link_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_link_rsp); - -} -ssize_t -xdr_serialize_mkdir_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_mkdir_rsp); - -} -ssize_t -xdr_serialize_mknod_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_mknod_rsp); - -} -ssize_t -xdr_serialize_getxattr_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_getxattr_rsp); - -} -ssize_t -xdr_serialize_fgetxattr_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_fgetxattr_rsp); - -} -ssize_t -xdr_serialize_xattrop_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_xattrop_rsp); - -} -ssize_t -xdr_serialize_fxattrop_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_fxattrop_rsp); -} - -ssize_t -xdr_serialize_truncate_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_truncate_rsp); -} - -ssize_t -xdr_serialize_lk_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_lk_rsp); -} - -ssize_t -xdr_serialize_opendir_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_opendir_rsp); -} - -ssize_t -xdr_serialize_ftruncate_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_serialize_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_ftruncate_rsp); -} - - -ssize_t -xdr_to_lookup_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_lookup_req); -} - -ssize_t -xdr_to_getspec_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf_getspec_req); - -} - -ssize_t -xdr_to_setvolume_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gf_setvolume_req); - -} - -ssize_t -xdr_to_statfs_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_statfs_req); - -} - -ssize_t -xdr_to_fsync_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_fsync_req); - -} - -ssize_t -xdr_to_flush_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_flush_req); - -} - -ssize_t -xdr_to_xattrop_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_xattrop_req); - -} - -ssize_t -xdr_to_fxattrop_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_fxattrop_req); - -} - -ssize_t -xdr_to_getxattr_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_getxattr_req); - -} -ssize_t -xdr_to_fgetxattr_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_fgetxattr_req); - -} -ssize_t -xdr_to_open_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_open_req); - -} -ssize_t -xdr_to_create_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_create_req); - -} -ssize_t -xdr_to_symlink_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_symlink_req); -} -ssize_t -xdr_to_link_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_link_req); -} -ssize_t -xdr_to_readlink_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_readlink_req); -} -ssize_t -xdr_to_rename_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_rename_req); -} -ssize_t -xdr_to_mkdir_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_mkdir_req); -} -ssize_t -xdr_to_mknod_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_mknod_req); -} -ssize_t -xdr_to_readv_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_read_req); -} -ssize_t -xdr_to_writev_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_write_req); -} - -ssize_t -xdr_to_readdir_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_readdir_req); -} - -ssize_t -xdr_to_opendir_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_opendir_req); -} - -ssize_t -xdr_to_rmdir_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_rmdir_req); -} - -ssize_t -xdr_to_fsetxattr_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_fsetxattr_req); -} -ssize_t -xdr_to_setattr_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_setattr_req); -} -ssize_t -xdr_to_fsetattr_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_fsetattr_req); -} - -ssize_t -xdr_to_finodelk_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_finodelk_req); -} - -ssize_t -xdr_to_inodelk_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_inodelk_req); -} - -ssize_t -xdr_to_ftruncate_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_ftruncate_req); -} - -ssize_t -xdr_to_fsyncdir_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_fsyncdir_req); -} - -ssize_t -xdr_to_fstat_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_fstat_req); -} -ssize_t -xdr_to_rchecksum_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_rchecksum_req); -} -ssize_t -xdr_to_removexattr_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_removexattr_req); -} -ssize_t -xdr_to_setxattr_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_setxattr_req); -} - -ssize_t -xdr_to_fentrylk_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_fentrylk_req); -} - -ssize_t -xdr_to_entrylk_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_entrylk_req); -} - -ssize_t -xdr_to_lk_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_lk_req); -} - -ssize_t -xdr_to_stat_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_stat_req); -} - -ssize_t -xdr_to_release_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_release_req); -} - -ssize_t -xdr_to_readdirp_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_readdirp_req); -} -ssize_t -xdr_to_truncate_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_truncate_req); -} -ssize_t -xdr_to_access_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_access_req); -} -ssize_t -xdr_to_unlink_req (struct iovec inmsg, void *args) -{ - return xdr_to_generic (inmsg, (void *)args, - (xdrproc_t)xdr_gfs3_unlink_req); -} - -ssize_t -xdr_from_lookup_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_lookup_req); - -} - -ssize_t -xdr_from_stat_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_stat_req); - -} - -ssize_t -xdr_from_fstat_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_fstat_req); - -} - -ssize_t -xdr_from_mkdir_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_mkdir_req); - -} - -ssize_t -xdr_from_mknod_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_mknod_req); - -} - -ssize_t -xdr_from_symlink_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_symlink_req); - -} - -ssize_t -xdr_from_readlink_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_readlink_req); - -} - -ssize_t -xdr_from_rename_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_rename_req); - -} - -ssize_t -xdr_from_link_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_link_req); - -} - -ssize_t -xdr_from_create_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_create_req); - -} - -ssize_t -xdr_from_open_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_open_req); - -} - -ssize_t -xdr_from_opendir_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_opendir_req); - -} - -ssize_t -xdr_from_readdir_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_readdir_req); - -} - -ssize_t -xdr_from_readdirp_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_readdirp_req); - -} - -ssize_t -xdr_from_fsyncdir_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_fsyncdir_req); - -} -ssize_t -xdr_from_releasedir_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_releasedir_req); - -} -ssize_t -xdr_from_release_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_release_req); - -} -ssize_t -xdr_from_lk_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_lk_req); - -} -ssize_t -xdr_from_entrylk_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_entrylk_req); - -} -ssize_t -xdr_from_fentrylk_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_fentrylk_req); - -} -ssize_t -xdr_from_inodelk_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_inodelk_req); - -} -ssize_t -xdr_from_finodelk_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_finodelk_req); - -} -ssize_t -xdr_from_setxattr_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_setxattr_req); - -} -ssize_t -xdr_from_fsetxattr_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_fsetxattr_req); - -} -ssize_t -xdr_from_getxattr_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_getxattr_req); - -} -ssize_t -xdr_from_fgetxattr_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_fgetxattr_req); - -} -ssize_t -xdr_from_removexattr_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_removexattr_req); - -} -ssize_t -xdr_from_xattrop_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_xattrop_req); - -} -ssize_t -xdr_from_fxattrop_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_fxattrop_req); - -} -ssize_t -xdr_from_access_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_access_req); - -} -ssize_t -xdr_from_setattr_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_setattr_req); - -} -ssize_t -xdr_from_truncate_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_truncate_req); - -} -ssize_t -xdr_from_ftruncate_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_ftruncate_req); - -} -ssize_t -xdr_from_fsetattr_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_fsetattr_req); - -} -ssize_t -xdr_from_readv_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_read_req); - -} -ssize_t -xdr_from_writev_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_write_req); - -} -ssize_t -xdr_from_fsync_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_fsync_req); - -} -ssize_t -xdr_from_flush_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_flush_req); - -} -ssize_t -xdr_from_statfs_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_statfs_req); - -} -ssize_t -xdr_from_rchecksum_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_rchecksum_req); - -} -ssize_t -xdr_from_getspec_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf_getspec_req); - -} -ssize_t -xdr_from_setvolume_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gf_setvolume_req); - -} -ssize_t -xdr_from_rmdir_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_rmdir_req); - -} -ssize_t -xdr_from_unlink_req (struct iovec outmsg, void *req) -{ - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_unlink_req); - -} - -/* Client decode */ - -ssize_t -xdr_to_lookup_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_lookup_rsp); - -} - -ssize_t -xdr_to_stat_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_stat_rsp); - -} - -ssize_t -xdr_to_fstat_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_fstat_rsp); - -} - -ssize_t -xdr_to_mkdir_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_mkdir_rsp); - -} - -ssize_t -xdr_to_mknod_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_mknod_rsp); - -} - -ssize_t -xdr_to_symlink_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_symlink_rsp); - -} - -ssize_t -xdr_to_readlink_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_readlink_rsp); - -} - -ssize_t -xdr_to_rename_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_rename_rsp); - -} - -ssize_t -xdr_to_link_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_link_rsp); - -} - -ssize_t -xdr_to_create_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_create_rsp); - -} - -ssize_t -xdr_to_open_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_open_rsp); - -} - -ssize_t -xdr_to_opendir_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_opendir_rsp); - -} - -ssize_t -xdr_to_readdir_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_readdir_rsp); - -} - -ssize_t -xdr_to_readdirp_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_readdirp_rsp); - -} -ssize_t -xdr_to_lk_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_lk_rsp); - -} -ssize_t -xdr_to_getxattr_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_getxattr_rsp); - -} -ssize_t -xdr_to_fgetxattr_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_fgetxattr_rsp); - -} -ssize_t -xdr_to_xattrop_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_xattrop_rsp); - -} -ssize_t -xdr_to_fxattrop_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_fxattrop_rsp); - -} -ssize_t -xdr_to_setattr_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_setattr_rsp); - -} -ssize_t -xdr_to_truncate_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_truncate_rsp); - -} -ssize_t -xdr_to_ftruncate_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_ftruncate_rsp); - -} -ssize_t -xdr_to_fsetattr_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_fsetattr_rsp); - -} -ssize_t -xdr_to_readv_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_read_rsp); - -} -ssize_t -xdr_to_writev_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_write_rsp); - -} -ssize_t -xdr_to_fsync_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_fsync_rsp); - -} -ssize_t -xdr_to_statfs_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_statfs_rsp); - -} -ssize_t -xdr_to_rchecksum_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_rchecksum_rsp); - -} -ssize_t -xdr_to_getspec_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf_getspec_rsp); - -} -ssize_t -xdr_to_setvolume_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf_setvolume_rsp); - -} -ssize_t -xdr_to_rmdir_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_rmdir_rsp); - -} -ssize_t -xdr_to_unlink_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gfs3_unlink_rsp); - -} -ssize_t -xdr_to_common_rsp (struct iovec outmsg, void *rsp) -{ - return xdr_to_generic (outmsg, (void *)rsp, - (xdrproc_t)xdr_gf_common_rsp); - -} - -ssize_t -xdr_to_mgmt_probe_query_req (struct iovec outmsg, void *req) -{ - - return xdr_serialize_generic (outmsg, (void *)req, - (xdrproc_t)xdr_gfs3_setattr_req); -} diff --git a/xlators/protocol/lib/src/msg-xdr.h b/xlators/protocol/lib/src/msg-xdr.h deleted file mode 100644 index 364819a399b..00000000000 --- a/xlators/protocol/lib/src/msg-xdr.h +++ /dev/null @@ -1,524 +0,0 @@ -/* - Copyright (c) 2007-2010 Gluster, Inc. <http://www.gluster.com> - This file is part of GlusterFS. - - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. -*/ - - -#ifndef _MSG_XDR_H -#define _MSG_XDR_H - -#include <sys/uio.h> - -#include "glusterfs-xdr.h" - -#define xdr_decoded_remaining_addr(xdr) ((&xdr)->x_private) -#define xdr_decoded_remaining_len(xdr) ((&xdr)->x_handy) -#define xdr_encoded_length(xdr) (((size_t)(&xdr)->x_private) - ((size_t)(&xdr)->x_base)) -#define xdr_decoded_length(xdr) (((size_t)(&xdr)->x_private) - ((size_t)(&xdr)->x_base)) - - -/* FOPS */ -ssize_t -xdr_serialize_lookup_rsp (struct iovec outmsg, void *resp); - -ssize_t -xdr_serialize_getspec_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_common_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_setvolume_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_open_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_create_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_mknod_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_mkdir_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_symlink_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_link_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_rename_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_writev_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_readv_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_readdir_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_readdirp_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_opendir_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_setattr_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_fsetattr_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_truncate_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_ftruncate_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_statfs_rsp (struct iovec outmsg, void *rsp); - - -ssize_t -xdr_serialize_lk_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_xattrop_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_fxattrop_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_getxattr_rsp (struct iovec outmsg, void *rsp); - - -ssize_t -xdr_serialize_fgetxattr_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_unlink_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_rmdir_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_rchecksum_rsp (struct iovec outmsg, void *rsp); - - -ssize_t -xdr_serialize_fstat_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_fsync_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_readlink_rsp (struct iovec outmsg, void *rsp); - -ssize_t -xdr_serialize_stat_rsp (struct iovec outmsg, void *rsp); - - -ssize_t -xdr_to_lookup_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_getspec_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_setvolume_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_statfs_req (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_stat_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_getattr_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fstat_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_setattr_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fsetattr_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_readv_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_writev_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fsetattr_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_readlink_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_create_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_open_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_release_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_xattrop_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fxattrop_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_setxattr_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fsetxattr_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_flush_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_unlink_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fsync_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_ftruncate_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_truncate_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_getxattr_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fgetxattr_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_removexattr_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_entrylk_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fentrylk_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_inodelk_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_finodelk_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_lk_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_access_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_opendir_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_readdirp_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_readdir_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fsyncdir_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_mknod_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_mkdir_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_symlink_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_rmdir_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_rchecksum_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_rename_req (struct iovec inmsg, void *args); - -ssize_t -xdr_to_link_req (struct iovec inmsg, void *args); - -ssize_t -xdr_from_lookup_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_getspec_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_stat_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_access_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_truncate_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_ftruncate_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_readlink_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_writev_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_readv_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_flush_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_fstat_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_fsync_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_open_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_unlink_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_rmdir_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_fsyncdir_req (struct iovec outmsg, void *args); - - -ssize_t -xdr_from_fsetxattr_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_setxattr_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_getxattr_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_fgetxattr_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_statfs_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_opendir_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_lk_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_inodelk_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_finodelk_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_entrylk_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_fentrylk_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_removexattr_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_xattrop_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_fxattrop_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_rchecksum_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_readdir_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_readdirp_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_setattr_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_fsetattr_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_symlink_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_rename_req (struct iovec outmsg, void *args); - - -ssize_t -xdr_from_link_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_rename_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_create_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_mkdir_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_mknod_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_releasedir_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_release_req (struct iovec outmsg, void *args); - -ssize_t -xdr_from_setvolume_req (struct iovec outmsg, void *args); - -ssize_t -xdr_to_setvolume_rsp (struct iovec inmsg, void *args); - - - -ssize_t -xdr_to_statfs_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_stat_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fstat_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_rename_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_readlink_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_link_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_access_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_truncate_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_ftruncate_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_unlink_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_rmdir_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_open_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_create_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_mkdir_rsp (struct iovec inmsg, void *args); - - -ssize_t -xdr_to_mknod_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_setattr_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fsetattr_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_common_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_getxattr_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fxattrop_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_xattrop_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_symlink_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_fgetxattr_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_rchecksum_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_lk_rsp (struct iovec inmsg, void *args); -ssize_t -xdr_to_readdirp_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_to_readdir_rsp (struct iovec inmsg, void *args); -ssize_t -xdr_to_opendir_rsp (struct iovec inmsg, void *args); -ssize_t -xdr_to_lookup_rsp (struct iovec inmsg, void *args); -ssize_t -xdr_to_readv_rsp (struct iovec inmsg, void *args); -ssize_t -xdr_to_getspec_rsp (struct iovec inmsg, void *args); - -ssize_t -xdr_serialize_generic (struct iovec outmsg, void *res, xdrproc_t proc); - -ssize_t -xdr_to_generic (struct iovec inmsg, void *args, xdrproc_t proc); - -ssize_t -xdr_to_generic_payload (struct iovec inmsg, void *args, xdrproc_t proc, - struct iovec *pendingpayload); -#endif /* !_MSG_XDR_H */ diff --git a/xlators/protocol/lib/src/protocol-common.h b/xlators/protocol/lib/src/protocol-common.h deleted file mode 100644 index c4fc12a7042..00000000000 --- a/xlators/protocol/lib/src/protocol-common.h +++ /dev/null @@ -1,138 +0,0 @@ -/* - Copyright (c) 2007-2010 Gluster, Inc. <http://www.gluster.com> - This file is part of GlusterFS. - - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. -*/ - -#ifndef _PROTOCOL_COMMON_H -#define _PROTOCOL_COMMON_H - -enum gf_fop_procnum { - GFS3_OP_NULL, /* 0 */ - GFS3_OP_STAT, - GFS3_OP_READLINK, - GFS3_OP_MKNOD, - GFS3_OP_MKDIR, - GFS3_OP_UNLINK, - GFS3_OP_RMDIR, - GFS3_OP_SYMLINK, - GFS3_OP_RENAME, - GFS3_OP_LINK, - GFS3_OP_TRUNCATE, - GFS3_OP_OPEN, - GFS3_OP_READ, - GFS3_OP_WRITE, - GFS3_OP_STATFS, - GFS3_OP_FLUSH, - GFS3_OP_FSYNC, - GFS3_OP_SETXATTR, - GFS3_OP_GETXATTR, - GFS3_OP_REMOVEXATTR, - GFS3_OP_OPENDIR, - GFS3_OP_FSYNCDIR, - GFS3_OP_ACCESS, - GFS3_OP_CREATE, - GFS3_OP_FTRUNCATE, - GFS3_OP_FSTAT, - GFS3_OP_LK, - GFS3_OP_LOOKUP, - GFS3_OP_READDIR, - GFS3_OP_INODELK, - GFS3_OP_FINODELK, - GFS3_OP_ENTRYLK, - GFS3_OP_FENTRYLK, - GFS3_OP_XATTROP, - GFS3_OP_FXATTROP, - GFS3_OP_FGETXATTR, - GFS3_OP_FSETXATTR, - GFS3_OP_RCHECKSUM, - GFS3_OP_SETATTR, - GFS3_OP_FSETATTR, - GFS3_OP_READDIRP, - GFS3_OP_RELEASE, - GFS3_OP_RELEASEDIR, - GFS3_OP_MAXVALUE, -} ; - -enum gf_handshake_procnum { - GF_HNDSK_NULL, - GF_HNDSK_SETVOLUME, - GF_HNDSK_GETSPEC, - GF_HNDSK_PING, - GF_HNDSK_MAXVALUE, -}; - -enum gf_mgmt_procnum { - GD_MGMT_NULL, /* 0 */ - GD_MGMT_PROBE_QUERY, - GD_MGMT_FRIEND_ADD, - GD_MGMT_CLUSTER_LOCK, - GD_MGMT_CLUSTER_UNLOCK, - GD_MGMT_STAGE_OP, - GD_MGMT_COMMIT_OP, - GD_MGMT_FRIEND_REMOVE, - GD_MGMT_CLI_PROBE, - GD_MGMT_CLI_DEPROBE, - GD_MGMT_CLI_LIST_FRIENDS, - GD_MGMT_CLI_CREATE_VOLUME, - GD_MGMT_CLI_GET_VOLUME, - GD_MGMT_CLI_DELETE_VOLUME, - GD_MGMT_CLI_START_VOLUME, - GD_MGMT_CLI_STOP_VOLUME, - GD_MGMT_CLI_RENAME_VOLUME, - GD_MGMT_CLI_DEFRAG_VOLUME, - GD_MGMT_CLI_SET_VOLUME, - GD_MGMT_CLI_ADD_BRICK, - GD_MGMT_CLI_REMOVE_BRICK, - GD_MGMT_CLI_REPLACE_BRICK, - GD_MGMT_MAXVALUE, -}; - -enum gf_cli_procnum { - GF1_CLI_NULL = GD_MGMT_MAXVALUE+1, /* 0 */ - GF1_CLI_PROBE, - GF1_CLI_DEPROBE, - GF1_CLI_LIST_FRIENDS, - GF1_CLI_CREATE_VOLUME, - GF1_CLI_GET_VOLUME, - GF1_CLI_DELETE_VOLUME, - GF1_CLI_START_VOLUME, - GF1_CLI_STOP_VOLUME, - GF1_CLI_RENAME_VOLUME, - GF1_CLI_DEFRAG_VOLUME, - GF1_CLI_SET_VOLUME, - GF1_CLI_ADD_BRICK, - GF1_CLI_REMOVE_BRICK, - GF1_CLI_REPLACE_BRICK, - GF1_CLI_MAXVALUE, -}; - -#define GLUSTER3_1_FOP_PROGRAM 1298437 /* Completely random */ -#define GLUSTER3_1_FOP_VERSION 310 /* 3.1.0 */ -#define GLUSTER3_1_FOP_PROCCNT GFS3_OP_MAXVALUE - -#define GLUSTERD1_MGMT_PROGRAM 1298433 /* Completely random */ -#define GLUSTERD1_MGMT_VERSION 1 /* 0.0.1 */ -#define GLUSTERD1_MGMT_PROCCNT GD_MGMT_MAXVALUE - -#define GLUSTER3_1_CLI_PROGRAM 1298433 /* Completely random */ -#define GLUSTER3_1_CLI_VERSION 1 /* 0.0.1 */ -#define GLUSTER3_1_CLI_PROCCNT GF1_CLI_MAXVALUE - -#define GLUSTER_HNDSK_PROGRAM 14398633 /* Completely random */ -#define GLUSTER_HNDSK_VERSION 1 /* 0.0.1 */ - -#endif /* !_PROTOCOL_COMMON_H */ |