Helium
core.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 CORE_H
27 #define CORE_H
28 
29 #include <he.h>
30 
34 he_return_code_t he_internal_setup_stream_state(he_conn_t *conn, uint8_t *data, size_t length);
35 
47 #ifdef TEST
48 #include "fake_dispatch.h" // Never implemented, only used as a mock
49 #define HE_DISPATCH(func, ...) dispatch("" #func "", ##__VA_ARGS__);
50 #define HE_DISPATCH_CONN(func, conn) dispatch_conn("" #func "", conn);
51 #else
52 #define HE_DISPATCH(func, ...) func(__VA_ARGS__);
53 #define HE_DISPATCH_CONN(func, ...) func(__VA_ARGS__);
54 #endif // TEST
55 
56 #endif // CORE_H
enum he_return_code he_return_code_t
All possible return codes for helium.
he_return_code_t he_internal_setup_stream_state(he_conn_t *conn, uint8_t *data, size_t length)
Setup the pointers and counters for reading from a TCP stream.
Definition: core.c:22
Core internal header file for libhelium.
Definition: he.h:483