pacemaker  2.0.2-debe490
Scalable High-Availability cluster resource manager
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
remote_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2018 the Pacemaker project contributors
3  *
4  * The version control history for this file may have further details.
5  *
6  * This source code is licensed under the GNU Lesser General Public License
7  * version 2.1 or later (LGPLv2.1+) WITHOUT ANY WARRANTY.
8  */
9 
10 #ifndef PCMK__REMOTE__H
11 # define PCMK__REMOTE__H
12 
13 // internal functions from remote.c
14 
15 typedef struct crm_remote_s crm_remote_t;
16 
17 int crm_remote_send(crm_remote_t *remote, xmlNode *msg);
18 int crm_remote_ready(crm_remote_t *remote, int total_timeout /*ms */ );
19 gboolean crm_remote_recv(crm_remote_t *remote, int total_timeout /*ms */,
20  int *disconnected);
21 xmlNode *crm_remote_parse_buffer(crm_remote_t *remote);
22 int crm_remote_tcp_connect(const char *host, int port);
23 int crm_remote_tcp_connect_async(const char *host, int port,
24  int timeout /*ms */,
25  int *timer_id, void *userdata,
26  void (*callback) (void *userdata, int sock));
27 int crm_remote_accept(int ssock);
28 void crm_sockaddr2str(void *sa, char *s);
29 
30 # ifdef HAVE_GNUTLS_GNUTLS_H
31 # include <gnutls/gnutls.h>
32 
33 gnutls_session_t *pcmk__new_tls_session(int csock, unsigned int conn_type,
34  gnutls_credentials_type_t cred_type,
35  void *credentials);
36 int pcmk__init_tls_dh(gnutls_dh_params_t *dh_params);
37 int pcmk__read_handshake_data(crm_client_t *client);
38 
47 int crm_initiate_client_tls_handshake(crm_remote_t *remote, int timeout_ms);
48 
49 # endif // HAVE_GNUTLS_GNUTLS_H
50 #endif // PCMK__REMOTE__H
int crm_remote_tcp_connect(const char *host, int port)
Definition: remote.c:1090
int crm_remote_accept(int ssock)
Definition: remote.c:1125
AIS_Host host
Definition: internal.h:86
int crm_remote_send(crm_remote_t *remote, xmlNode *msg)
Definition: remote.c:481
void gnutls_session_t
Definition: cib_remote.c:42
int crm_remote_ready(crm_remote_t *remote, int total_timeout)
Definition: remote.c:602
int crm_remote_tcp_connect_async(const char *host, int port, int timeout, int *timer_id, void *userdata, void(*callback)(void *userdata, int sock))
Definition: remote.c:1006
gboolean crm_remote_recv(crm_remote_t *remote, int total_timeout, int *disconnected)
Definition: remote.c:764
void crm_sockaddr2str(void *sa, char *s)
Convert an IP address (IPv4 or IPv6) to a string for logging.
Definition: remote.c:1106
xmlNode * crm_remote_parse_buffer(crm_remote_t *remote)
Definition: remote.c:530