summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-07-14 16:26:17 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-14 15:02:50 -0700
commit47dc8def246c6338cb95e71b4656962a5f74ee90 (patch)
treec627dd8f4c0743eccd85143be1399a1e505b95f2 /rpc/rpc-lib/src
parent2865e149c48eb5ed028cffb12e1e5273b47f2b1d (diff)
protocol/lib: rename files to standardized names and places
- move xlators/protocol/lib/* to rpc/xdr/ - rename CLI and glusterd XDR filenames - remove xlators/protocol/lib (libgfproto1.so) Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
Diffstat (limited to 'rpc/rpc-lib/src')
-rw-r--r--rpc/rpc-lib/src/Makefile.am5
-rw-r--r--rpc/rpc-lib/src/protocol-common.h138
2 files changed, 141 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/Makefile.am b/rpc/rpc-lib/src/Makefile.am
index 986eb95ce..9e37797bd 100644
--- a/rpc/rpc-lib/src/Makefile.am
+++ b/rpc/rpc-lib/src/Makefile.am
@@ -7,10 +7,11 @@ libgfrpc_la_SOURCES = auth-unix.c rpcsvc-auth.c rpcsvc.c auth-null.c \
libgfrpc_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la
noinst_HEADERS = rpcsvc.h rpc-transport.h xdr-common.h xdr-rpc.h xdr-rpcclnt.h \
- rpc-clnt.h rpcsvc-common.h
+ rpc-clnt.h rpcsvc-common.h protocol-common.h
+
AM_CFLAGS = -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall -D$(GF_HOST_OS)\
-I$(top_srcdir)/libglusterfs/src -shared -nostartfiles $(GF_CFLAGS) \
- -I$(top_srcdir)/xlators/protocol/lib/src \
+ -I$(top_srcdir)/rpc/xdr/src \
-DRPC_TRANSPORTDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/rpc-transport\"
CLEANFILES = *~
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h
new file mode 100644
index 000000000..c4fc12a70
--- /dev/null
+++ b/rpc/rpc-lib/src/protocol-common.h
@@ -0,0 +1,138 @@
+/*
+ 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 */