Browse code

tls: typedef'ed several structs, enums and unions

Daniel-Constantin Mierla authored on 20/10/2020 10:40:06
Showing 1 changed files
... ...
@@ -34,25 +34,25 @@
34 34
 #include "tls_domain.h"
35 35
 #include "tls_ct_wrq.h"
36 36
 
37
-enum tls_conn_states {
37
+typedef enum tls_conn_states {
38 38
 						S_TLS_NONE = 0,
39 39
 						S_TLS_ACCEPTING,
40 40
 						S_TLS_CONNECTING,
41 41
 						S_TLS_ESTABLISHED
42
-					};
42
+					} tls_conn_states_t;
43 43
 
44
-struct tls_rd_buf {
44
+typedef struct tls_rd_buf {
45 45
 	unsigned int pos; /* current position */
46 46
 	unsigned int size; /* total size (buf) */
47 47
 	unsigned char buf[1];
48
-};
48
+} tls_rd_buf_t;
49 49
 
50 50
 /* tls conn flags */
51 51
 #define F_TLS_CON_WR_WANTS_RD    1 /* write wants read */
52 52
 #define F_TLS_CON_HANDSHAKED     2 /* connection is handshaked */
53 53
 #define F_TLS_CON_RENEGOTIATION  4 /* renegotiation by clinet */
54 54
 
55
-struct tls_extra_data {
55
+typedef struct tls_extra_data {
56 56
 	tls_domains_cfg_t* cfg; /* Configuration used for this connection */
57 57
 	SSL* ssl;               /* SSL context used for the connection */
58 58
 	BIO* rwbio;             /* bio used for read/write
... ...
@@ -62,7 +62,7 @@ struct tls_extra_data {
62 62
 	struct tls_rd_buf* enc_rd_buf;
63 63
 	unsigned int flags;
64 64
 	enum  tls_conn_states state;
65
-};
65
+} tls_extra_data_t;
66 66
 
67 67
 
68 68
 /* return true if write wants read */