In order to add stats from other files, the ssl_stats_module need to be
visible from other files.
This moves the ssl_counters definition in ssl_sock-t.h and removes the
static of ssl_stats_module.
extern struct pool_head *ssl_sock_client_sni_pool;
+struct ssl_counters {
+ long long sess;
+ long long reused_sess;
+ long long failed_handshake;
+};
+
#endif /* USE_OPENSSL */
#endif /* _HAPROXY_SSL_SOCK_T_H */
extern struct pool_head *pool_head_ssl_keylog;
extern struct pool_head *pool_head_ssl_keylog_str;
extern struct list openssl_providers;
+extern struct stats_module ssl_stats_module;
int ssl_sock_prep_ctx_and_inst(struct bind_conf *bind_conf, struct ssl_bind_conf *ssl_conf,
SSL_CTX *ctx, struct ckch_inst *ckch_inst, char **err);
.desc = "Total number of failed handshake" },
};
-static struct ssl_counters {
- long long sess;
- long long reused_sess;
- long long failed_handshake;
-} ssl_counters;
+static struct ssl_counters ssl_counters;
static int ssl_fill_stats(void *data, struct field *stats, unsigned int *selected_field)
{
return 1;
}
-static struct stats_module ssl_stats_module = {
+struct stats_module ssl_stats_module = {
.name = "ssl",
.fill_stats = ssl_fill_stats,
.stats = ssl_stats,