2 protocol tests - ctdb protocol
4 Copyright (C) Amitay Isaacs 2017
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef __CTDB_PROTOCOL_COMMON_CTDB_H__
21 #define __CTDB_PROTOCOL_COMMON_CTDB_H__
24 #include "system/network.h"
29 #include "protocol/protocol.h"
31 void fill_ctdb_req_header(struct ctdb_req_header *h);
32 void verify_ctdb_req_header(struct ctdb_req_header *h,
33 struct ctdb_req_header *h2);
35 void fill_ctdb_req_call(TALLOC_CTX *mem_ctx, struct ctdb_req_call *c);
36 void verify_ctdb_req_call(struct ctdb_req_call *c, struct ctdb_req_call *c2);
38 void fill_ctdb_reply_call(TALLOC_CTX *mem_ctx, struct ctdb_reply_call *c);
39 void verify_ctdb_reply_call(struct ctdb_reply_call *c,
40 struct ctdb_reply_call *c2);
42 void fill_ctdb_reply_error(TALLOC_CTX *mem_ctx, struct ctdb_reply_error *c);
43 void verify_ctdb_reply_error(struct ctdb_reply_error *c,
44 struct ctdb_reply_error *c2);
46 void fill_ctdb_req_dmaster(TALLOC_CTX *mem_ctx, struct ctdb_req_dmaster *c);
47 void verify_ctdb_req_dmaster(struct ctdb_req_dmaster *c,
48 struct ctdb_req_dmaster *c2);
50 void fill_ctdb_reply_dmaster(TALLOC_CTX *mem_ctx,
51 struct ctdb_reply_dmaster *c);
52 void verify_ctdb_reply_dmaster(struct ctdb_reply_dmaster *c,
53 struct ctdb_reply_dmaster *c2);
55 void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx,
56 struct ctdb_req_control_data *cd,
58 void verify_ctdb_req_control_data(struct ctdb_req_control_data *cd,
59 struct ctdb_req_control_data *cd2);
61 void fill_ctdb_req_control(TALLOC_CTX *mem_ctx, struct ctdb_req_control *c,
63 void verify_ctdb_req_control(struct ctdb_req_control *c,
64 struct ctdb_req_control *c2);
66 void fill_ctdb_reply_control_data(TALLOC_CTX *mem_ctx,
67 struct ctdb_reply_control_data *cd,
69 void verify_ctdb_reply_control_data(struct ctdb_reply_control_data *cd,
70 struct ctdb_reply_control_data *cd2);
72 void fill_ctdb_reply_control(TALLOC_CTX *mem_ctx,
73 struct ctdb_reply_control *c, uint32_t opcode);
74 void verify_ctdb_reply_control(struct ctdb_reply_control *c,
75 struct ctdb_reply_control *c2);
77 void fill_ctdb_message_data(TALLOC_CTX *mem_ctx, union ctdb_message_data *md,
79 void verify_ctdb_message_data(union ctdb_message_data *md,
80 union ctdb_message_data *md2, uint64_t srvid);
82 void fill_ctdb_req_message(TALLOC_CTX *mem_ctx, struct ctdb_req_message *c,
84 void verify_ctdb_req_message(struct ctdb_req_message *c,
85 struct ctdb_req_message *c2);
87 void fill_ctdb_req_message_data(TALLOC_CTX *mem_ctx,
88 struct ctdb_req_message_data *c);
89 void verify_ctdb_req_message_data(struct ctdb_req_message_data *c,
90 struct ctdb_req_message_data *c2);
92 void fill_ctdb_req_keepalive(TALLOC_CTX *mem_ctx,
93 struct ctdb_req_keepalive *c);
94 void verify_ctdb_req_keepalive(struct ctdb_req_keepalive *c,
95 struct ctdb_req_keepalive *c2);
97 void fill_ctdb_req_tunnel(TALLOC_CTX *mem_ctx, struct ctdb_req_tunnel *c);
98 void verify_ctdb_req_tunnel(struct ctdb_req_tunnel *c,
99 struct ctdb_req_tunnel *c2);
101 #endif /* __CTDB_PROTOCOL_COMMON_CTDB_H__ */