Helium
utils.h
Go to the documentation of this file.
1 /* *
2  * Lightway Core
3  * Copyright (C) 2022 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 UTILS_H
27 #define UTILS_H
28 
29 #include "he.h"
30 
36 
42 
47 const char *he_client_event_name(he_conn_event_t ev);
48 
54 
58 const char *he_pmtud_state_name(he_pmtud_state_t state);
59 
69 char *he_safe_strncpy(char *dst, const char *src, size_t dst_size);
70 
71 #endif // UTILS_H
he_pmtud_state_t
enum he_pmtud_state he_pmtud_state_t
Lightway Path MTU Discovery states.
he_connection_protocol_name
const char * he_connection_protocol_name(he_connection_protocol_t protocol)
Definition: utils.c:100
he_conn_state_t
enum he_conn_state he_conn_state_t
Status codes for a Helium connection.
he_return_code_t
enum he_return_code he_return_code_t
All possible return codes for helium.
he_client_event_name
const char * he_client_event_name(he_conn_event_t ev)
Definition: utils.c:88
he_pmtud_state_name
const char * he_pmtud_state_name(he_pmtud_state_t state)
Definition: utils.c:110
he_safe_strncpy
char * he_safe_strncpy(char *dst, const char *src, size_t dst_size)
Safe version of strncpy strncpy has a pitfall that dst will not be null terminated if there is no nul...
Definition: utils.c:123
he.h
Core public header file for libhelium.
he_return_code_name
const char * he_return_code_name(he_return_code_t rc)
Definition: utils.c:8
he_connection_protocol_t
enum he_connection_protocol he_connection_protocol_t
Lightway can use different underlying protocols. This enum defines those protocols.
he_client_state_name
const char * he_client_state_name(he_conn_state_t st)
Definition: utils.c:74