1
2
3
4
5
6
7
8
9
10 #ifndef PCMK__REMOTE__H
11 # define PCMK__REMOTE__H
12
13
14
15 typedef struct pcmk__remote_s pcmk__remote_t;
16
17 int pcmk__remote_send_xml(pcmk__remote_t *remote, xmlNode *msg);
18 int pcmk__remote_ready(pcmk__remote_t *remote, int timeout_ms);
19 int pcmk__read_remote_message(pcmk__remote_t *remote, int timeout_ms);
20 xmlNode *pcmk__remote_message_xml(pcmk__remote_t *remote);
21 int pcmk__connect_remote(const char *host, int port, int timeout_ms,
22 int *timer_id, int *sock_fd, void *userdata,
23 void (*callback) (void *userdata, int rc, int sock));
24 int pcmk__accept_remote_connection(int ssock, int *csock);
25 void pcmk__sockaddr2str(void *sa, char *s);
26
27 # ifdef HAVE_GNUTLS_GNUTLS_H
28 # include <gnutls/gnutls.h>
29
30 gnutls_session_t *pcmk__new_tls_session(int csock, unsigned int conn_type,
31 gnutls_credentials_type_t cred_type,
32 void *credentials);
33 int pcmk__init_tls_dh(gnutls_dh_params_t *dh_params);
34 int pcmk__read_handshake_data(pcmk__client_t *client);
35
36
37
38
39
40
41
42
43
44
45 int pcmk__tls_client_handshake(pcmk__remote_t *remote, int timeout_ms);
46
47 # endif
48 #endif