1PREFIX	__repmgr
2
3INCLUDE #include "db_int.h"
4INCLUDE #include "dbinc/db_swap.h"
5INCLUDE
6
7BEGIN_MSG handshake
8ARG	port		u_int16_t
9ARG	alignment	u_int16_t
10ARG	ack_policy	u_int32_t
11ARG	flags		u_int32_t
12END
13
14BEGIN_MSG v3handshake
15ARG	port		u_int16_t
16ARG	priority	u_int32_t
17ARG	flags		u_int32_t
18END
19
20BEGIN_MSG v2handshake
21ARG	port		u_int16_t
22ARG	priority	u_int32_t
23END
24
25BEGIN_MSG parm_refresh
26ARG	ack_policy	u_int32_t
27ARG	flags		u_int32_t
28END
29
30BEGIN_MSG permlsn
31ARG	generation	u_int32_t
32ARG	lsn		DB_LSN
33END
34
35BEGIN_MSG version_proposal
36ARG	min		u_int32_t
37ARG	max		u_int32_t
38END
39
40BEGIN_MSG version_confirmation
41ARG	version		u_int32_t
42END
43
44BEGIN_MSG msg_hdr
45ARG	type		u_int8_t
46ARG	word1		u_int32_t
47ARG	word2		u_int32_t
48END
49
50/* Metadata that goes along with user message on a DB_CHANNEL. */
51BEGIN_MSG msg_metadata
52ARG	tag		u_int32_t
53ARG	limit		u_int32_t
54ARG	flags		u_int32_t
55END
56
57/*
58 * The membership database has a record for each site in the group, plus one
59 * extra meta-data record.  The key of the meta-data record has a zero-length
60 * host, and a port value of 0.
61 */
62BEGIN_MSG membership_key check_length
63ARG	host		DBT
64ARG	port		u_int16_t
65END
66
67BEGIN_MSG membership_data
68ARG	flags           u_int32_t
69END
70
71/*
72 * The "format" identifies the content and layout of the records within the
73 * membership database (i.e., some of the items defined here in this *.msg
74 * file).  It should be incremented when the layouts change in future Berkeley
75 * DB releases.  The "version" counts group changes that the application makes
76 * by adding or removing sites; thus it varies dynamically thoughout the life of
77 * a group, during a single release of Berkeley DB.
78 */
79BEGIN_MSG member_metadata
80ARG	format		u_int32_t
81ARG	version		u_int32_t
82END
83
84/*
85 * When a new site wants to join a group, it "guesses" that the configured
86 * "helper" site is the master, and sends the request there.  When that guess
87 * is wrong, the helper site responds with the location of the current master,
88 * in effect "forwarding" the request.
89 */
90BEGIN_MSG gm_fwd check_length
91ARG	host		DBT
92ARG	port		u_int16_t
93ARG	gen		u_int32_t
94END
95
96/* Membership list version header: */
97BEGIN_MSG membr_vers
98ARG	version		u_int32_t
99ARG	gen		u_int32_t
100END
101BEGIN_MSG site_info check_length
102ARG	host		DBT
103ARG	port		u_int16_t
104ARG	flags		u_int32_t
105END
106
107/*
108 * If site A breaks or rejects a connection from site B, it first
109 * tries to send B this message containing site A's currently known
110 * membership DB version.  Site B can use this to decide what to do.
111 * If site B knows of a later version, it should retry the connection
112 * to site A later, polling at it until site A catches up.  However, if
113 * site B's known version is less, it means that site B is no longer in
114 * the group, and so instead it should shut down and notify the application.
115 */
116BEGIN_MSG connect_reject
117ARG	version		u_int32_t
118ARG	gen		u_int32_t
119END
120