From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3167 invoked by alias); 14 Aug 2008 15:43:10 -0000 Received: (qmail 2967 invoked by alias); 14 Aug 2008 15:43:08 -0000 X-Spam-Status: No, hits=1.6 required=5.0 tests=AWL,BAYES_99,KAM_MX,SPF_HELO_PASS X-Spam-Check-By: sourceware.org X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on bastion.fedora.phx.redhat.com X-Spam-Level: Subject: master - ccs: move comm_headers.h to ccs/daemon To: cluster-cvs-relay@redhat.com X-Project: Cluster Project X-Git-Module: cluster.git X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: ae590e550cdc69a78ffff4ef9297d898c50d4e3b X-Git-Newrev: 890badb2946d136ca4be89dd4dbdab9ce2ae8f65 From: "Fabio M. Di Nitto" Message-Id: <20080814142654.6AB3B120047@lists.fedorahosted.org> Date: Thu, 14 Aug 2008 15:52:00 -0000 X-Scanned-By: MIMEDefang 2.58 on 172.16.52.254 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q3/txt/msg00262.txt.bz2 Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=890badb2946d136ca4be89dd4dbdab9ce2ae8f65 Commit: 890badb2946d136ca4be89dd4dbdab9ce2ae8f65 Parent: ae590e550cdc69a78ffff4ef9297d898c50d4e3b Author: Fabio M. Di Nitto AuthorDate: Thu Aug 7 07:05:48 2008 +0200 Committer: Fabio M. Di Nitto 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 --- 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 +#include + +/* 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 -#include - -/* 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}