This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

master - ccs: move comm_headers.h to ccs/daemon


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=890badb2946d136ca4be89dd4dbdab9ce2ae8f65
Commit:        890badb2946d136ca4be89dd4dbdab9ce2ae8f65
Parent:        ae590e550cdc69a78ffff4ef9297d898c50d4e3b
Author:        Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate:    Thu Aug 7 07:05:48 2008 +0200
Committer:     Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Thu Aug 14 15:18:02 2008 +0200

ccs: move comm_headers.h to ccs/daemon

comm_headers.h defines the protocol to talk to ccsd.

move it to daemon and fix inclusion paths for the users.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
 ccs/daemon/comm_headers.h      |   48 ++++++++++++++++++++++++++++++++++++++++
 ccs/include/comm_headers.h     |   48 ----------------------------------------
 ccs/libccscompat/Makefile      |    2 +-
 config/tools/ccs_tool/Makefile |    2 +-
 4 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/ccs/daemon/comm_headers.h b/ccs/daemon/comm_headers.h
new file mode 100644
index 0000000..4187fba
--- /dev/null
+++ b/ccs/daemon/comm_headers.h
@@ -0,0 +1,48 @@
+#ifndef __COMM_HEADERS_DOT_H__
+#define __COMM_HEADERS_DOT_H__
+
+#include <byteswap.h>
+#include <endian.h>
+
+/* Types of requests */
+#define COMM_CONNECT    1
+#define COMM_DISCONNECT 2
+#define COMM_GET        3
+#define COMM_GET_LIST   4
+#define COMM_SET        5
+#define COMM_GET_STATE  6
+#define COMM_SET_STATE  7
+#define COMM_BROADCAST  8
+#define COMM_UPDATE     9
+
+/* Request flags */
+#define COMM_CONNECT_FORCE          1
+#define COMM_CONNECT_BLOCKING       2
+#define COMM_SET_STATE_RESET_QUERY  4
+#define COMM_BROADCAST_FROM_QUORATE 8
+#define COMM_UPDATE_NOTICE	    16
+#define COMM_UPDATE_NOTICE_ACK	    32
+#define COMM_UPDATE_COMMIT	    64
+#define COMM_UPDATE_COMMIT_ACK	    128
+
+typedef struct comm_header_s {
+  int comm_type;
+  int comm_flags;  /* flags that tune a particular type of operation */
+  int comm_desc;
+  int comm_error;
+  int comm_payload_size;
+} comm_header_t;
+
+#define COMM_LOCAL_SOCKET "/var/run/cluster/ccsd.sock"
+
+static inline void swab_header(comm_header_t *head) {
+#if __BYTE_ORDER == __BIG_ENDIAN
+  head->comm_type = bswap_32(head->comm_type);
+  head->comm_flags = bswap_32(head->comm_flags);
+  head->comm_desc = bswap_32(head->comm_desc);
+  head->comm_error = bswap_32(head->comm_error);
+  head->comm_payload_size = bswap_32(head->comm_payload_size);
+#endif
+}
+
+#endif /* __COMM_HEADERS_DOT_H__ */
diff --git a/ccs/include/comm_headers.h b/ccs/include/comm_headers.h
deleted file mode 100644
index 4187fba..0000000
--- a/ccs/include/comm_headers.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef __COMM_HEADERS_DOT_H__
-#define __COMM_HEADERS_DOT_H__
-
-#include <byteswap.h>
-#include <endian.h>
-
-/* Types of requests */
-#define COMM_CONNECT    1
-#define COMM_DISCONNECT 2
-#define COMM_GET        3
-#define COMM_GET_LIST   4
-#define COMM_SET        5
-#define COMM_GET_STATE  6
-#define COMM_SET_STATE  7
-#define COMM_BROADCAST  8
-#define COMM_UPDATE     9
-
-/* Request flags */
-#define COMM_CONNECT_FORCE          1
-#define COMM_CONNECT_BLOCKING       2
-#define COMM_SET_STATE_RESET_QUERY  4
-#define COMM_BROADCAST_FROM_QUORATE 8
-#define COMM_UPDATE_NOTICE	    16
-#define COMM_UPDATE_NOTICE_ACK	    32
-#define COMM_UPDATE_COMMIT	    64
-#define COMM_UPDATE_COMMIT_ACK	    128
-
-typedef struct comm_header_s {
-  int comm_type;
-  int comm_flags;  /* flags that tune a particular type of operation */
-  int comm_desc;
-  int comm_error;
-  int comm_payload_size;
-} comm_header_t;
-
-#define COMM_LOCAL_SOCKET "/var/run/cluster/ccsd.sock"
-
-static inline void swab_header(comm_header_t *head) {
-#if __BYTE_ORDER == __BIG_ENDIAN
-  head->comm_type = bswap_32(head->comm_type);
-  head->comm_flags = bswap_32(head->comm_flags);
-  head->comm_desc = bswap_32(head->comm_desc);
-  head->comm_error = bswap_32(head->comm_error);
-  head->comm_payload_size = bswap_32(head->comm_payload_size);
-#endif
-}
-
-#endif /* __COMM_HEADERS_DOT_H__ */
diff --git a/ccs/libccscompat/Makefile b/ccs/libccscompat/Makefile
index 73041d7..886c81c 100644
--- a/ccs/libccscompat/Makefile
+++ b/ccs/libccscompat/Makefile
@@ -11,5 +11,5 @@ include $(OBJDIR)/make/uninstall.mk
 
 CFLAGS += -D_FILE_OFFSET_BITS=64
 CFLAGS += -fPIC
-CFLAGS += -I$(S)/../include
+CFLAGS += -I$(S)/../daemon
 CFLAGS += -I${incdir}
diff --git a/config/tools/ccs_tool/Makefile b/config/tools/ccs_tool/Makefile
index 428b9fa..43803ab 100644
--- a/config/tools/ccs_tool/Makefile
+++ b/config/tools/ccs_tool/Makefile
@@ -26,7 +26,7 @@ endif
 
 CFLAGS += -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 CFLAGS += -I${cmanincdir} `xml2-config --cflags`
-CFLAGS += -I${ccsincdir} -I$(SRCDIR)/ccs/include
+CFLAGS += -I${ccsincdir} -I$(SRCDIR)/ccs/daemon
 CFLAGS += -I$(SRCDIR)/ccs/libccscompat
 CFLAGS += -I${incdir}
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]