24#ifndef XCOM_NETWORK_PROVIDER_NATIVE_LIB_H
25#define XCOM_NETWORK_PROVIDER_NATIVE_LIB_H
30#ifndef XCOM_WITHOUT_OPENSSL
37#include <openssl/err.h>
38#include <openssl/ssl.h>
41#define SYS_STRERROR_SIZE 512
50 socklen_t sock_size,
int timeout);
52 socklen_t sock_size,
int timeout);
67#ifndef XCOM_WITHOUT_OPENSSL
102 const char *server_cert_file,
103 const char *client_key_file,
104 const char *client_cert_file,
const char *ca_file,
105 const char *ca_path,
const char *crl_file,
106 const char *crl_path,
const char *cipher,
107 const char *tls_version,
108 const char *tls_ciphersuites);
Definition: xcom_network_provider_native_lib.h:43
static result create_server_socket()
Definition: xcom_network_provider_native_lib.cc:126
static result announce_tcp(xcom_port port)
Definition: xcom_network_provider_native_lib.cc:207
static int timed_connect(int fd, struct sockaddr *sock_addr, socklen_t sock_size)
Definition: xcom_network_provider_native_lib.cc:453
static int timed_connect_msec(int fd, struct sockaddr *sock_addr, socklen_t sock_size, int timeout)
Definition: xcom_network_provider_native_lib.cc:341
static struct addrinfo * does_node_have_v4_address(struct addrinfo *retrieved)
Retrieves a node IPv4 address, if it exists.
Definition: xcom_network_provider_native_lib.cc:510
static void gcs_shutdown_socket(int *sock)
Definition: xcom_network_provider_native_lib.cc:311
static int timed_connect_sec(int fd, struct sockaddr *sock_addr, socklen_t sock_size, int timeout)
Definition: xcom_network_provider_native_lib.cc:460
static result gcs_close_socket(int *sock)
Definition: xcom_network_provider_native_lib.cc:317
static result checked_create_socket(int domain, int type, int protocol)
Definition: xcom_network_provider_native_lib.cc:468
static result xcom_checked_socket(int domain, int type, int protocol)
Wrapper function which retries and checks errors from socket.
Definition: xcom_network_provider_native_lib.cc:111
static int allowlist_socket_accept(int fd, site_def const *xcom_config)
Definition: xcom_network_provider_native_lib.cc:285
static result create_server_socket_v4()
Definition: xcom_network_provider_native_lib.cc:177
static result gcs_shut_close_socket(int *sock)
Definition: xcom_network_provider_native_lib.cc:328
static void init_server_addr(struct sockaddr **sock_addr, socklen_t *sock_len, xcom_port port, int family)
Initializes a sockaddr prepared to be used in bind()
Definition: xcom_network_provider_native_lib.cc:77
Definition: xcom_network_provider_native_lib.h:74
static void xcom_cleanup_ssl()
Definition: xcom_network_provider_ssl_native_lib.cc:545
static int ssl_verify_server_cert(SSL *ssl, const char *server_hostname)
Definition: xcom_network_provider_ssl_native_lib.cc:578
static void xcom_destroy_ssl()
Definition: xcom_network_provider_ssl_native_lib.cc:551
static int xcom_init_ssl(const char *server_key_file, const char *server_cert_file, const char *client_key_file, const char *client_cert_file, const char *ca_file, const char *ca_path, const char *crl_file, const char *crl_path, const char *cipher, const char *tls_version, const char *tls_ciphersuites)
Definition: xcom_network_provider_ssl_native_lib.cc:467
static MYSQL * sock
Definition: mysqlcheck.cc:56
constexpr value_type ssl
Definition: classic_protocol_constants.h:49
static bool timeout(bool(*wait_condition)())
Timeout function.
Definition: log0meb.cc:496
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:33
required string type
Definition: replication_group_member_actions.proto:34
struct sockaddr sockaddr
Definition: sock_probe_win32.h:63
Definition: site_struct.h:43
unsigned short xcom_port
Definition: xcom_common.h:46
SSL_CTX * client_ctx
Definition: xcom_network_provider_ssl_native_lib.cc:163
SSL_CTX * server_ctx
Definition: xcom_network_provider_ssl_native_lib.cc:162