Helium
Data Structures | Macros | Typedefs | Enumerations
he_internal.h File Reference

Core internal header file for libhelium. More...

#include "he.h"
#include <stdbool.h>
#include <stdint.h>
#include "he_plugin.h"
#include "pmtud.h"
#include <wolfssl/options.h>
#include <wolfssl/ssl.h>
#include <wolfssl/wolfcrypt/settings.h>
#include <wolfssl/wolfcrypt/random.h>
Include dependency graph for he_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  he_packet_buffer
 
struct  he_version_info
 
struct  he_ssl_ctx
 
struct  he_internal_pmtud_
 
struct  he_conn
 
struct  he_plugin_chain
 
struct  he_msg_hdr
 
struct  he_msg_ping
 
struct  he_msg_pong
 
struct  he_msg_auth_hdr
 
struct  he_msg_auth
 
struct  he_msg_auth_token
 
struct  he_msg_auth_buf
 
struct  he_msg_server_config
 
struct  he_msg_config_ipv4
 
struct  he_msg_data
 
struct  he_msg_data_frag
 
struct  he_deprecated_msg_13
 
struct  he_msg_auth_response
 
struct  he_msg_session_request
 
struct  he_msg_session_response
 
struct  he_msg_goodbye
 
struct  he_msg_extension
 

Macros

#define HE_ATOMIC
 
#define HE_FRAG_MF_MASK   0x2000
 
#define HE_FRAG_OFF_MASK   0x1FFF
 
#define HE_FRAG_TTL   64
 
#define HE_AUTH_STATUS_SUCCESS   0
 
#define HE_AUTH_STATUS_FAILURE   1
 
#define HE_EXT_TYPE_REQUEST   1
 
#define HE_EXT_TYPE_RESPONSE   2
 
#define HE_EXT_ID_BLOCK_DNS_OVER_TLS   1
 
#define HE_EXT_PAYLOAD_TYPE_MSGPACK   1
 
#define HE_EXT_PAYLOAD_TYPE_BINARY   2
 
#define HE_EXT_PAYLOAD_TYPE_INT16   3
 
#define HE_WOLF_MAX_HEADER_SIZE   37
 
#define HE_IPV4_HEADER_SIZE   20
 
#define HE_TCP_HEADER_SIZE   20
 
#define HE_UDP_HEADER_SIZE   8
 
#define HE_HEADER_SAFE_GAP   28
 
#define HE_MSS_OVERHEAD   (HE_IPV4_HEADER_SIZE + HE_TCP_HEADER_SIZE)
 

Typedefs

typedef struct he_packet_buffer he_packet_buffer_t
 
typedef struct he_version_info he_version_info_t
 
typedef struct he_internal_pmtud_ he_internal_pmtud_t
 
typedef struct he_fragment_table he_fragment_table_t
 
typedef enum msg_ids msg_ids_t
 
typedef struct he_msg_hdr he_msg_hdr_t
 
typedef struct he_msg_ping he_msg_ping_t
 
typedef struct he_msg_pong he_msg_pong_t
 
typedef struct he_msg_auth_hdr he_msg_auth_hdr_t
 
typedef struct he_msg_auth he_msg_auth_t
 
typedef struct he_msg_auth_token he_msg_auth_token_t
 
typedef struct he_msg_auth_buf he_msg_auth_buf_t
 
typedef struct he_msg_server_config he_msg_server_config_t
 
typedef struct he_msg_config_ipv4 he_msg_config_ipv4_t
 
typedef struct he_msg_data he_msg_data_t
 
typedef struct he_msg_data_frag he_msg_data_frag_t
 
typedef struct he_deprecated_msg_13 he_deprecated_msg_13_t
 
typedef struct he_msg_auth_response he_msg_auth_response_t
 
typedef struct he_msg_session_request he_msg_session_request_t
 
typedef struct he_msg_session_response he_msg_session_response_t
 
typedef struct he_msg_goodbye he_msg_goodbye_t
 
typedef struct he_msg_extension he_msg_extension_t
 

Enumerations

enum  msg_ids {
  HE_MSGID_NOOP = 1, HE_MSGID_PING = 2, HE_MSGID_PONG = 3, HE_MSGID_AUTH = 4,
  HE_MSGID_DATA = 5, HE_MSGID_CONFIG_IPV4 = 6, HE_MSGID_AUTH_RESPONSE = 7, HE_MSGID_AUTH_RESPONSE_WITH_CONFIG = 8,
  HE_MSGID_EXTENSION = 9, HE_MSGID_SESSION_REQUEST = 10, HE_MSGID_SESSION_RESPONSE = 11, HE_MSGID_GOODBYE = 12,
  HE_MSGID_DEPRECATED_13 = 13, HE_MSGID_SERVER_CONFIG = 14, HE_MSGID_DATA_WITH_FRAG = 15
}
 

Detailed Description

Core internal header file for libhelium.

Lightway Core Copyright (C) 2021 Express VPN International Ltd.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

This file includes common type definitions and useful constants for ensuring consistency across the code files for libhelium. It should be included by every header file.

Enumeration Type Documentation

◆ msg_ids

enum msg_ids
Enumerator
HE_MSGID_NOOP 

NOOP - nothing to do.

HE_MSGID_PING 

Ping request.

HE_MSGID_PONG 

Pong - response to a Ping request.

HE_MSGID_AUTH 

Authentication Request (only server should see this)

HE_MSGID_DATA 

Data packet - contains data to be sent to the tun device.

HE_MSGID_CONFIG_IPV4 

Config.

HE_MSGID_AUTH_RESPONSE 

Auth response.

HE_MSGID_AUTH_RESPONSE_WITH_CONFIG 

Auth response with config (fast login)

HE_MSGID_EXTENSION 

Helium Extension message.

HE_MSGID_SESSION_REQUEST 

Session Request.

HE_MSGID_SESSION_RESPONSE 

Session Response.

HE_MSGID_GOODBYE 

Tell the other side that we're closing down.

HE_MSGID_DEPRECATED_13 

Deprecated message - same as Data packet with an unused int flag.

HE_MSGID_SERVER_CONFIG 

Server configuration data pushed to the client by the server.

HE_MSGID_DATA_WITH_FRAG 

Fragmented Data Packet.