wscript: separate embedded_heimdal from system_heimdal
[Samba.git] / ctdb / event / event_protocol_api.h
blobe2ab439fd840796c83ce5580c0676ee0711ef84f
1 /*
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__
23 #include <talloc.h>
25 #include "event/event_protocol.h"
27 /* From event/event_protocol.c */
29 int ctdb_event_header_extract(uint8_t *buf,
30 size_t buflen,
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,
37 uint8_t *buf,
38 size_t *buflen);
39 int ctdb_event_request_pull(uint8_t *buf,
40 size_t buflen,
41 struct ctdb_event_header *h,
42 TALLOC_CTX *mem_ctx,
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,
49 uint8_t *buf,
50 size_t *buflen);
51 int ctdb_event_reply_pull(uint8_t *buf,
52 size_t buflen,
53 struct ctdb_event_header *h,
54 TALLOC_CTX *mem_ctx,
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__ */