Helium
wolf.h
Go to the documentation of this file.
1 /* *
2  * Lightway Core
3  * Copyright (C) 2021 Express VPN International Ltd.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
26 #ifndef WOLF_H
27 #define WOLF_H
28 
29 #ifndef WOLFSSL_USER_SETTINGS
30 #include <wolfssl/options.h>
31 #endif
32 #include <wolfssl/wolfcrypt/settings.h>
33 #include <wolfssl/ssl.h>
34 #include "conn_internal.h"
35 
55 int he_wolf_dtls_read(WOLFSSL *ssl, char *buf, int sz, void *ctx);
56 
74 int he_wolf_dtls_write(WOLFSSL *ssl, char *buf, int sz, void *ctx);
75 
84 
103 int he_wolf_tls_read(WOLFSSL *ssl, char *buf, int sz, void *ctx);
104 
105 // Todo document this
106 int he_wolf_tls_write(WOLFSSL *ssl, char *buf, int sz, void *ctx);
107 
108 typedef struct he_internal_write_buf_ {
109  uint8_t buf[HE_MAX_WIRE_MTU];
111 
112 int he_wolf_dtls_write_internal(WOLFSSL *ssl, char *buf, int sz, void *ctx, he_internal_write_buf_t *write_buffer);
113 int he_wolf_tls_write_internal(WOLFSSL *ssl, char *buf, int sz, void *ctx, he_internal_write_buf_t *write_buffer);
114 
115 #endif // WOLF_H
conn_internal.h
Internal functions for managing the connection.
he_wolf_dtls_read
int he_wolf_dtls_read(WOLFSSL *ssl, char *buf, int sz, void *ctx)
Callback function to handle WolfSSL read requests.
Definition: wolf.c:26
he_wolf_dtls_write
int he_wolf_dtls_write(WOLFSSL *ssl, char *buf, int sz, void *ctx)
Callback function to handle WolfSSL write requests.
Definition: wolf.c:106
he_wire_hdr
The wire header format It is strongly discouraged to interact with this header structure,...
Definition: he.h:564
he_wolf_tls_read
int he_wolf_tls_read(WOLFSSL *ssl, char *buf, int sz, void *ctx)
Callback function to handle TLS WolfSSL read requests.
Definition: wolf.c:182
he_internal_write_packet_header
int he_internal_write_packet_header(he_conn_t *conn, he_wire_hdr_t *hdr)
Write the packet header into the header buffer.
Definition: wolf.c:74
he_internal_write_buf_
Definition: wolf.h:108
he_conn
Definition: he_internal.h:170
HE_MAX_WIRE_MTU
#define HE_MAX_WIRE_MTU
Default MTU sizes.
Definition: he.h:41