root/include/crm/common/remote_internal.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright 2008-2020 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 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  * \internal
  38  * \brief Perform client TLS handshake after establishing TCP socket
  39  *
  40  * \param[in] remote      Newly established remote connection
  41  * \param[in] timeout_ms  Abort if entire handshake is not complete within this
  42  *
  43  * \return Standard Pacemaker return code
  44  */
  45 int pcmk__tls_client_handshake(pcmk__remote_t *remote, int timeout_ms);
  46 
  47 #  endif    // HAVE_GNUTLS_GNUTLS_H
  48 #endif      // PCMK__REMOTE__H

/* [previous][next][first][last][top][bottom][index][help] */