summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/socket/src/socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-transport/socket/src/socket.h')
-rw-r--r--rpc/rpc-transport/socket/src/socket.h34
1 files changed, 10 insertions, 24 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h
index f1bfba45076..8a2eda70605 100644
--- a/rpc/rpc-transport/socket/src/socket.h
+++ b/rpc/rpc-transport/socket/src/socket.h
@@ -14,6 +14,7 @@
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/x509v3.h>
+#include <openssl/x509_vfy.h>
#ifdef HAVE_OPENSSL_DH_H
#include <openssl/dh.h>
#endif
@@ -21,13 +22,7 @@
#include <openssl/ecdh.h>
#endif
-#include "gf-event.h"
#include "rpc-transport.h"
-#include "logging.h"
-#include "dict.h"
-#include "mem-pool.h"
-#include "globals.h"
-#include "refcount.h"
#ifndef MAX_IOVEC
#define MAX_IOVEC 16
@@ -109,11 +104,12 @@ struct ioq {
};
struct iovec vector[MAX_IOVEC];
- int count;
struct iovec *pending_vector;
+ int count;
int pending_count;
struct iobref *iobref;
uint32_t fraghdr;
+ char _pad[4];
};
typedef struct {
@@ -172,13 +168,13 @@ struct gf_sock_incoming {
char *proghdr_base_addr;
struct iobuf *iobuf;
size_t iobuf_size;
- int count;
struct gf_sock_incoming_frag frag;
struct iovec vector[2];
struct iovec payload_vector;
struct iobref *iobref;
rpc_request_info_t *request_info;
struct iovec *pending_vector;
+ int count;
int pending_count;
size_t total_bytes_read;
@@ -187,19 +183,11 @@ struct gf_sock_incoming {
size_t ra_served;
char *ra_buf;
uint32_t fraghdr;
- char complete_record;
msg_type_t msg_type;
sp_rpcrecord_state_t record_state;
+ char _pad[4];
};
-typedef enum {
- OT_IDLE, /* Uninitialized or termination complete. */
- OT_SPAWNING, /* Past pthread_create but not in thread yet. */
- OT_RUNNING, /* Poller thread running normally. */
- OT_CALLBACK, /* Poller thread in the middle of a callback. */
- OT_PLEASE_DIE, /* Poller termination requested. */
-} ot_state_t;
-
typedef struct {
union {
struct list_head ioq;
@@ -208,11 +196,9 @@ typedef struct {
struct ioq *ioq_prev;
};
};
- pthread_mutex_t in_lock;
pthread_mutex_t out_lock;
pthread_mutex_t cond_lock;
pthread_cond_t cond;
- pthread_t thread;
int windowsize;
int keepalive;
int keepaliveidle;
@@ -220,12 +206,14 @@ typedef struct {
int keepalivecnt;
int timeout;
int log_ctr;
+ int shutdown_log_ctr;
/* ssl_error_required is used only during the SSL connection setup
* phase.
* It holds the error code returned by SSL_get_error() and is used to
* arm the epoll event set for the required event for the specific fd.
*/
int ssl_error_required;
+ int ssl_session_id;
GF_REF_DECL; /* refcount to keep track of socket_poller
threads */
@@ -240,14 +228,14 @@ typedef struct {
uint32_t backlog;
SSL_METHOD *ssl_meth;
SSL_CTX *ssl_ctx;
- int ssl_session_id;
BIO *ssl_sbio;
SSL *ssl_ssl;
char *ssl_own_cert;
char *ssl_private_key;
char *ssl_ca_list;
- int pipe[2];
+ char *crl_path;
struct gf_sock_incoming incoming;
+ mgmt_ssl_t srvr_ssl;
/* -1 = not connected. 0 = in progress. 1 = connected */
char connected;
/* 1 = connect failed for reasons other than EINPROGRESS/ENOENT
@@ -256,9 +244,7 @@ typedef struct {
char bio;
char connect_finish_log;
char submit_log;
- char lowlat;
char nodelay;
- mgmt_ssl_t srvr_ssl;
gf_boolean_t read_fail_log;
gf_boolean_t ssl_enabled; /* outbound I/O */
gf_boolean_t mgmt_ssl; /* outbound mgmt */
@@ -284,7 +270,7 @@ typedef struct {
* socket_event_handler() for
* newly accepted socket
*/
-
+ char _pad[4];
} socket_private_t;
#endif