This way we're sure not to reuse them by accident.
#include <types/stream_interface.h>
-extern struct xprt_ops raw_sock;
-
#endif /* _PROTO_RAW_SOCK_H */
/*
#include <types/proxy.h>
#include <types/stream_interface.h>
-extern struct xprt_ops ssl_sock;
extern int sslconns;
extern int totalsslconns;
static inline
int ssl_sock_is_ssl(struct connection *conn)
{
- if (!conn || conn->xprt != &ssl_sock || !conn->xprt_ctx)
+ if (!conn || conn->xprt != xprt_get(XPRT_SSL) || !conn->xprt_ctx)
return 0;
else
return 1;
/* transport-layer operations for RAW sockets */
-struct xprt_ops raw_sock = {
+static struct xprt_ops raw_sock = {
.snd_buf = raw_sock_from_buf,
.rcv_buf = raw_sock_to_buf,
#if defined(CONFIG_HAP_LINUX_SPLICE)
int sslconns = 0;
int totalsslconns = 0;
+static struct xprt_ops ssl_sock;
#if (defined SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB && TLS_TICKETS_NO > 0)
struct list tlskeys_reference = LIST_HEAD_INIT(tlskeys_reference);
}};
/* transport-layer operations for SSL sockets */
-struct xprt_ops ssl_sock = {
+static struct xprt_ops ssl_sock = {
.snd_buf = ssl_sock_from_buf,
.rcv_buf = ssl_sock_to_buf,
.rcv_pipe = NULL,