2 CTDB event daemon protocol
4 Copyright (C) Amitay Isaacs 2018
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_EVENT_PROTOCOL_API_H__
21 #define __CTDB_EVENT_PROTOCOL_API_H__
25 #include "event/event_protocol.h"
27 /* From event/event_protocol.c */
29 int ctdb_event_header_extract(uint8_t *buf
,
31 struct ctdb_event_header
*h
);
33 size_t ctdb_event_request_len(struct ctdb_event_header
*h
,
34 struct ctdb_event_request
*in
);
35 int ctdb_event_request_push(struct ctdb_event_header
*h
,
36 struct ctdb_event_request
*in
,
39 int ctdb_event_request_pull(uint8_t *buf
,
41 struct ctdb_event_header
*h
,
43 struct ctdb_event_request
**out
);
45 size_t ctdb_event_reply_len(struct ctdb_event_header
*h
,
46 struct ctdb_event_reply
*in
);
47 int ctdb_event_reply_push(struct ctdb_event_header
*h
,
48 struct ctdb_event_reply
*in
,
51 int ctdb_event_reply_pull(uint8_t *buf
,
53 struct ctdb_event_header
*h
,
55 struct ctdb_event_reply
**out
);
57 /* From event/event_protocol_util.c */
59 const char *ctdb_event_command_to_string(enum ctdb_event_command cmd
);
61 #endif /* __CTDB_EVENT_PROTOCOL_API_H__ */