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

Core internal header file for libhelium. More...

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

Go to the source code of this file.

Data Structures

struct  he_client
 Data structure to hold all the state needed as a Helium client. More...
 
struct  he_packet_buffer
 
struct  he_version_info
 
struct  he_ssl_ctx
 
struct  he_conn
 
struct  he_plugin_chain
 
struct  he_network_config_ipv4
 
struct  he_wire_hdr
 The wire header format It is strongly discouraged to interact with this header structure, however, it is provided for specific use cases (such as a server rejecting a session, where by definition we don't have a connection object). More...
 
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_buf
 
struct  he_msg_config_ipv4
 
struct  he_msg_data
 
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_MAX_WIRE_MTU   1500
 
#define HE_MAX_MTU   1350
 
#define HE_MAX_MTU_STR   "1350"
 
#define HE_WIRE_MINIMUM_PROTOCOL_MAJOR_VERSION   1
 
#define HE_WIRE_MINIMUM_PROTOCOL_MINOR_VERSION   0
 
#define HE_WIRE_MAXIMUM_PROTOCOL_MAJOR_VERSION   1
 
#define HE_WIRE_MAXIMUM_PROTOCOL_MINOR_VERSION   1
 
#define HE_CONFIG_TEXT_FIELD_LENGTH   50
 Helpful deprecation macro. More...
 
#define HE_MAX_IPV4_STRING_LENGTH   24
 Maximum size of an IPV4 String.
 
#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_UDP_HEADER_SIZE)
 

Typedefs

typedef enum he_return_code he_return_code_t
 All possible return codes for helium.
 
typedef enum he_conn_state he_conn_state_t
 Status codes for a Helium connection.
 
typedef enum he_conn_event he_conn_event_t
 
typedef enum he_padding_type he_padding_type_t
 Helium supports numerous padding levels, from none to full. This enum defines which options can be chosen.
 
typedef enum he_connection_type he_connection_type_t
 Helium can operate in datagram or stream modes. This enum defines these two modes.
 
typedef struct he_ssl_ctx he_ssl_ctx_t
 
typedef struct he_conn he_conn_t
 
typedef struct he_plugin_chain he_plugin_chain_t
 
typedef struct he_network_config_ipv4 he_network_config_ipv4_t
 
typedef struct he_client he_client_t
 Data structure to hold all the state needed as a Helium client.
 
typedef void *(* he_malloc_t) (size_t size)
 
typedef void *(* he_calloc_t) (size_t nmemb, size_t size)
 
typedef void *(* he_realloc_t) (void *ptr, size_t size)
 
typedef void(* he_free_t) (void *ptr)
 
typedef he_return_code_t(* he_state_change_cb_t) (he_conn_t *conn, he_conn_state_t new_state, void *context)
 The prototype for the state callback function. More...
 
typedef he_return_code_t(* he_inside_write_cb_t) (he_conn_t *conn, uint8_t *packet, size_t length, void *context)
 The prototype for the inside write callback function. More...
 
typedef he_return_code_t(* he_outside_write_cb_t) (he_conn_t *conn, uint8_t *packet, size_t length, void *context)
 The prototype for the outside write callback function. More...
 
typedef he_return_code_t(* he_network_config_ipv4_cb_t) (he_conn_t *conn, he_network_config_ipv4_t *config, void *context)
 The prototype for the network config callback function. More...
 
typedef he_return_code_t(* he_event_cb_t) (he_conn_t *conn, he_conn_event_t event, void *context)
 The prototype for the event callback function. More...
 
typedef he_return_code_t(* he_nudge_time_cb_t) (he_conn_t *conn, int timeout, void *context)
 The prototype for the nudge time callback function. More...
 
typedef bool(* he_auth_cb_t) (he_conn_t *conn, char const *username, char const *password, void *context)
 The prototype for the authentication callback. More...
 
typedef bool(* he_auth_buf_cb_t) (he_conn_t *conn, uint8_t auth_type, uint8_t *buffer, uint16_t length, void *context)
 The prototype for the authentication buffer callback. More...
 
typedef he_return_code_t(* he_populate_network_config_ipv4_cb_t) (he_conn_t *conn, he_network_config_ipv4_t *config, void *context)
 The prototype for the population of the network config. More...
 
typedef struct he_packet_buffer he_packet_buffer_t
 
typedef struct he_version_info he_version_info_t
 
typedef enum msg_ids msg_ids_t
 
typedef enum he_auth_type he_auth_type_t
 
typedef struct he_wire_hdr he_wire_hdr_t
 The wire header format It is strongly discouraged to interact with this header structure, however, it is provided for specific use cases (such as a server rejecting a session, where by definition we don't have a connection object).
 
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_buf he_msg_auth_buf_t
 
typedef struct he_msg_config_ipv4 he_msg_config_ipv4_t
 
typedef struct he_msg_data he_msg_data_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  he_return_code {
  HE_SUCCESS = 0, HE_ERR_STRING_TOO_LONG = -1, HE_ERR_EMPTY_STRING = -2, HE_ERR_INVALID_CONN_STATE = -3,
  HE_ERR_NULL_POINTER = -4, HE_ERR_EMPTY_PACKET = -5, HE_ERR_PACKET_TOO_SMALL = -6, HE_ERR_ZERO_SIZE = -7,
  HE_ERR_NEGATIVE_NUMBER = -8, HE_ERR_INIT_FAILED = -9, HE_ERR_NO_MEMORY = -10, HE_ERR_NOT_HE_PACKET = -11,
  HE_ERR_SSL_BAD_FILETYPE = -12, HE_ERR_SSL_BAD_FILE = -13, HE_ERR_SSL_OUT_OF_MEMORY = -14, HE_ERR_SSL_ASN_INPUT = -15,
  HE_ERR_SSL_BUFFER = -16, HE_ERR_SSL_CERT = -17, HE_ERR_SSL_ERROR = -18, HE_ERR_CONF_USERNAME_NOT_SET = -19,
  HE_ERR_CONF_PASSWORD_NOT_SET = -20, HE_ERR_CONF_CA_NOT_SET = -21, HE_ERR_CONF_MTU_NOT_SET = -22, HE_WANT_READ = -23,
  HE_WANT_WRITE = -24, HE_ERR_CONF_OUTSIDE_WRITE_CB_NOT_SET = -25, HE_ERR_CONNECT_FAILED = -26, HE_CONNECTION_TIMED_OUT = -27,
  HE_ERR_NOT_CONNECTED = -28, HE_ERR_UNSUPPORTED_PACKET_TYPE = -29, HE_ERR_CONNECTION_WAS_CLOSED = -30, HE_ERR_BAD_PACKET = -31,
  HE_ERR_CALLBACK_FAILED = -32, HE_ERR_FAILED = -33, HE_ERR_SERVER_DN_MISMATCH = -34, HE_ERR_CANNOT_VERIFY_SERVER_CERT = -35,
  HE_ERR_NEVER_CONNECTED = -36, HE_ERR_INVALID_MTU_SIZE = -37, HE_ERR_CLEANUP_FAILED = -38, HE_ERR_REJECTED_SESSION = -39,
  HE_ERR_ACCESS_DENIED = -40, HE_ERR_PACKET_TOO_LARGE = -41, HE_ERR_INACTIVITY_TIMEOUT = -42, HE_ERR_POINTER_WOULD_OVERFLOW = -43,
  HE_ERR_INVALID_CONNECTION_TYPE = -46, HE_ERR_RNG_FAILURE = -47, HE_ERR_CONF_AUTH_CB_NOT_SET = -48, HE_ERR_PLUGIN_DROP = -49,
  HE_ERR_UNKNOWN_SESSION = -50, HE_ERR_SSL_ERROR_NONFATAL = -51, HE_ERR_INCORRECT_PROTOCOL_VERSION = -52, HE_ERR_CONF_CONFLICTING_AUTH_METHODS = -53,
  HE_ERR_ACCESS_DENIED_NO_AUTH_BUF_HANDLER = -54, HE_ERR_ACCESS_DENIED_NO_AUTH_USERPASS_HANDLER = -55
}
 All possible return codes for helium. More...
 
enum  he_conn_state {
  HE_STATE_NONE = 0, HE_STATE_DISCONNECTED = 1, HE_STATE_CONNECTING = 2, HE_STATE_DISCONNECTING = 4,
  HE_STATE_AUTHENTICATING = 5, HE_STATE_LINK_UP = 6, HE_STATE_ONLINE = 7, HE_STATE_CONFIGURING = 8
}
 Status codes for a Helium connection. More...
 
enum  he_conn_event {
  HE_EVENT_FIRST_MESSAGE_RECEIVED = 1, HE_EVENT_PONG = 2, HE_EVENT_REJECTED_FRAGMENTED_PACKETS_SENT_BY_HOST = 3, HE_EVENT_SECURE_RENEGOTIATION_STARTED = 4,
  HE_EVENT_SECURE_RENEGOTIATION_COMPLETED = 5, HE_EVENT_PENDING_SESSION_ACKNOWLEDGED = 6
}
 
enum  he_padding_type { HE_PADDING_NONE = 0, HE_PADDING_FULL = 1, HE_PADDING_450 = 2 }
 Helium supports numerous padding levels, from none to full. This enum defines which options can be chosen. More...
 
enum  he_connection_type { HE_CONNECTION_TYPE_DATAGRAM = 0, HE_CONNECTION_TYPE_STREAM = 1 }
 Helium can operate in datagram or stream modes. This enum defines these two modes. More...
 
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
}
 
enum  he_auth_type { HE_AUTH_TYPE_USERPASS = 1 }
 

Detailed Description

Core internal header file for libhelium.

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.

Parts of this file are included in the public header, but other parts are considered "internal" implementation details.

Macro Definition Documentation

#define HE_CONFIG_TEXT_FIELD_LENGTH   50

Helpful deprecation macro.

Begin Public SectionMaximum size of a text based config option.

#define HE_MAX_WIRE_MTU   1500

Set sizes

#define HE_WIRE_MINIMUM_PROTOCOL_MAJOR_VERSION   1

Set Maximum and Minimum Minor Versions

#define HE_WOLF_MAX_HEADER_SIZE   37

End Public Section

Typedef Documentation

typedef bool(* he_auth_buf_cb_t) (he_conn_t *conn, uint8_t auth_type, uint8_t *buffer, uint16_t length, void *context)

The prototype for the authentication buffer callback.

Parameters
connA pointer to the connection that triggered this callback
auth_typethe authentication type
bufferAn opaque buffer object
lengthThe length of the buffer parameter
contextA pointer to the user defined context
See also
he_conn_set_context Sets the value of the context pointer

The host is expected to interpret this buffer and return whether it considers this connection authenticated.

typedef bool(* he_auth_cb_t) (he_conn_t *conn, char const *username, char const *password, void *context)

The prototype for the authentication callback.

Parameters
connA pointer to the connection that triggered this callback
usernameA pointer to the username
passwordA pointer to the password
contextA pointer to the user defined context
See also
he_conn_set_context Sets the value of the context pointer

The host is expected to return whether this username and password is valid for the connection. Note that username and password are not guaranteed to be null terminated, but will be less than or equal in length to HE_CONFIG_TEXT_FIELD_LENGTH

typedef he_return_code_t(* he_event_cb_t) (he_conn_t *conn, he_conn_event_t event, void *context)

The prototype for the event callback function.

Parameters
connA pointer to the connection that triggered this callback
eventThe event to trigger
contextA pointer to the user defined context

Whenever Helium generates an event, this function will be called.

typedef he_return_code_t(* he_inside_write_cb_t) (he_conn_t *conn, uint8_t *packet, size_t length, void *context)

The prototype for the inside write callback function.

Parameters
connA pointer to the connection that triggered this callback
packetA pointer to the packet data
lengthThe length of the entire packet in bytes
contextA pointer to the user defined context
See also
he_conn_set_context Sets the value of the context pointer

Whenever Helium needs to do an inside write this function will be called. On Linux this would usually be writing decrypted packets to a tun device.

typedef struct he_msg_hdr he_msg_hdr_t

End Public Section

typedef he_return_code_t(* he_network_config_ipv4_cb_t) (he_conn_t *conn, he_network_config_ipv4_t *config, void *context)

The prototype for the network config callback function.

Parameters
connA pointer to the connection that triggered this callback
configThe network config data such as local IP, peer IP, DNS IP and MTU
contextA pointer to the user defined context
See also
he_conn_set_context Sets the value of the context pointer

When network configuration data is sent to Helium from the server, this callback will be triggered to allow to host application to configure its network accordingly.

Begin Public Section

typedef he_return_code_t(* he_nudge_time_cb_t) (he_conn_t *conn, int timeout, void *context)

The prototype for the nudge time callback function.

Parameters
connA pointer to the connection that triggered this callback
timeoutThe number of milliseconds to wait before nudging Helium
contextA pointer to the user defined context
See also
he_conn_set_context Sets the value of the context pointer
he_conn_get_nudge_time

Helium uses D/TLS which needs to be able to resend certain messages if they are not received in time. As Helium does not have its own threads or timers, it is up to the host application to tell Helium when a certain amount of time has passed. Because D/TLS implements exponential back off, the amount of waiting time can change after every read.

To avoid the host application having to remember to ask Helium after every read with he_conn_get_nudge_time(), the host application can register this callback instead.

Note
Any pending timers should be reset with the value provided in the callback and there should only ever be one timer per connection context. Whilst excessive nudging won't cause Helium to misbehave, it will create unnecessary load.
typedef he_return_code_t(* he_outside_write_cb_t) (he_conn_t *conn, uint8_t *packet, size_t length, void *context)

The prototype for the outside write callback function.

Parameters
connA pointer to the connection that triggered this callback
packetA pointer to the packet data
lengthThe length of the entire packet in bytes
contextA pointer to the user defined context
See also
he_conn_set_context Sets the value of the context pointer

Whenever Helium needs to do an outside write this function will be called. On Linux this would usually be writing to a UDP socket to send encrypted data over the Internet.

End Public Section

typedef he_return_code_t(* he_populate_network_config_ipv4_cb_t) (he_conn_t *conn, he_network_config_ipv4_t *config, void *context)

The prototype for the population of the network config.

Parameters
connA pointer to the connection that triggered this callback
[out]configA valid pointer to a network_config_ipv4_t, to be populated by the host
contextA pointer to the user defined context
See also
he_conn_set_context Sets the value of the context pointer

The host is expected to populate the provided he_network_config_ipv4_t* object with the correct values so that the client can successfully connect.

typedef he_return_code_t(* he_state_change_cb_t) (he_conn_t *conn, he_conn_state_t new_state, void *context)

The prototype for the state callback function.

Parameters
connA pointer to the connection that triggered this callback
new_stateThe state that the context has just entered
contextA pointer to the user defined context
See also
he_conn_set_context Sets the value of the context pointer

Whenever Helium changes state, this function will be called.

Enumeration Type Documentation

Enumerator
HE_EVENT_FIRST_MESSAGE_RECEIVED 

First packet / message was passed to Helium (i.e. a server response)

HE_EVENT_PONG 

Server replied to a PING request (NAT Keepalive)

HE_EVENT_REJECTED_FRAGMENTED_PACKETS_SENT_BY_HOST 

Connection tried to send fragmented packets which were rejected as they are not supported by Helium

HE_EVENT_SECURE_RENEGOTIATION_STARTED 

Helium has started a secure renegotiation.

HE_EVENT_SECURE_RENEGOTIATION_COMPLETED 

Helium has completed secure renegotiation.

HE_EVENT_PENDING_SESSION_ACKNOWLEDGED 

Pending Session Acknowledged.

Status codes for a Helium connection.

Enumerator
HE_STATE_NONE 

Connection has yet to be initialised.

HE_STATE_DISCONNECTED 

Connection is in a disconnected state. Any resources used for the connection have been released.

HE_STATE_CONNECTING 

Connection is currently trying to establish a D/TLS session with the server.

HE_STATE_DISCONNECTING 

Connection is currently trying to cleanly disconnect from the server.

HE_STATE_AUTHENTICATING 

Connection has established a D/TLS session and is attempting to authenticate.

HE_STATE_LINK_UP 

TLS link is up.

HE_STATE_ONLINE 

Everything is done - we're online.

HE_STATE_CONFIGURING 

Configuring - config has been received and config callback will soon be made.

Helium can operate in datagram or stream modes. This enum defines these two modes.

Enumerator
HE_CONNECTION_TYPE_DATAGRAM 

Datagram mode (i.e. UDP)

HE_CONNECTION_TYPE_STREAM 

Stream mode (i.e. TCP)

Helium supports numerous padding levels, from none to full. This enum defines which options can be chosen.

Enumerator
HE_PADDING_NONE 

Tell Helium not to pad packets at all.

HE_PADDING_FULL 

Tell Helium to fully pad packets to the MTU, like IPSEC.

HE_PADDING_450 

Tell Helium to round packets to the nearest 450 bytes.

All possible return codes for helium.

Enumerator
HE_SUCCESS 

If the function call completed successfully, this will be returned.

HE_ERR_STRING_TOO_LONG 

This will be returned if a string parameter is too long to be stored.

HE_ERR_EMPTY_STRING 

This will be returned if trying to set a configuration parameter to an empty string.

HE_ERR_INVALID_CONN_STATE 

This will be returned if a function was called against a connection context that isn't in a good state.

For example this could happened when calling he_conn_connect_client() on an already connected context.

HE_ERR_NULL_POINTER 

A null pointer was passed as an argument.

HE_ERR_EMPTY_PACKET 

An empty packet was passed to the function. Either a NULL pointer or a length of zero.

HE_ERR_PACKET_TOO_SMALL 

The packet passed to the function is too small to be valid.

HE_ERR_ZERO_SIZE 

The length parameter was set to zero.

HE_ERR_NEGATIVE_NUMBER 

A negative value was given but only an unsigned value is acceptable.

HE_ERR_INIT_FAILED 

Initialisation failed - this is usually an issue with the SSL layer.

HE_ERR_NO_MEMORY 

Could not allocate memory.

HE_ERR_NOT_HE_PACKET 

Packet provided does not have a Helium header.

HE_ERR_SSL_BAD_FILETYPE 

The SSL certificate is not in PEM format.

HE_ERR_SSL_BAD_FILE 

The SSL certificate is corrupt or missing.

HE_ERR_SSL_OUT_OF_MEMORY 

The SSL layer was not able to allocate more memory.

HE_ERR_SSL_ASN_INPUT 

The SSL certificate is not in the correct format.

HE_ERR_SSL_BUFFER 

The SSL layer ran out of buffers.

HE_ERR_SSL_CERT 

Generic issue with the SSL certificate - the SSL layer did not provide further information.

HE_ERR_SSL_ERROR 

Generic issue with the SSL layer.

HE_ERR_CONF_USERNAME_NOT_SET 

Username not set in config.

HE_ERR_CONF_PASSWORD_NOT_SET 

Password not set in config.

HE_ERR_CONF_CA_NOT_SET 

CA not set in config.

HE_ERR_CONF_MTU_NOT_SET 

MTU not set in config.

HE_WANT_READ 

Helium needs to read more data before it can continue.

HE_WANT_WRITE 

Helium needs to write more data before it can continue.

HE_ERR_CONF_OUTSIDE_WRITE_CB_NOT_SET 

Outside write callback not set in config.

HE_ERR_CONNECT_FAILED 

General connection failed error.

HE_CONNECTION_TIMED_OUT 

The SSL Connection has failed due to timeout.

HE_ERR_NOT_CONNECTED 

Helium is not connected.

HE_ERR_UNSUPPORTED_PACKET_TYPE 

Helium only supports IPv4 and IPv6.

HE_ERR_CONNECTION_WAS_CLOSED 

The connection was closed.

HE_ERR_BAD_PACKET 

The packet was invalid (wrong length, bad type etc)

HE_ERR_CALLBACK_FAILED 

Callback failed.

HE_ERR_FAILED 

Generic issue.

HE_ERR_SERVER_DN_MISMATCH 

Domain Name mismatch - supplied DN didn't match server certificate.

HE_ERR_CANNOT_VERIFY_SERVER_CERT 

Unable to verify the server certificate. Usually bad CA chain but could be caused by other weird issues

HE_ERR_NEVER_CONNECTED 

Attempted to call disconnect before connect. If this error is received, the state can be safely destroyed

HE_ERR_INVALID_MTU_SIZE 

MTU size was invalid.

HE_ERR_CLEANUP_FAILED 

Failed to clean up global state.

HE_ERR_REJECTED_SESSION 

The server rejected or couldn't find our session.

HE_ERR_ACCESS_DENIED 

The server rejected the login.

HE_ERR_PACKET_TOO_LARGE 

Packet provided was too large.

HE_ERR_INACTIVITY_TIMEOUT 

Disconnect due to inactivity timeout.

HE_ERR_POINTER_WOULD_OVERFLOW 

Pointer would overflow.

HE_ERR_INVALID_CONNECTION_TYPE 

Connection type argument is not defined in he_connection_type_t.

HE_ERR_RNG_FAILURE 

RNG Failure.

HE_ERR_CONF_AUTH_CB_NOT_SET 

Auth callback not set on a server.

HE_ERR_PLUGIN_DROP 

A plugin requested that we drop the packet without further processing.

HE_ERR_UNKNOWN_SESSION 

Inconsistent session received on server side.

HE_ERR_SSL_ERROR_NONFATAL 

An SSL error occurred on a D/TLS packet but it does not need to terminate the connection.

HE_ERR_INCORRECT_PROTOCOL_VERSION 

Protocol version for connection changed after creation.

HE_ERR_CONF_CONFLICTING_AUTH_METHODS 

Client has both username/password set AND authentication buffer set.

HE_ERR_ACCESS_DENIED_NO_AUTH_BUF_HANDLER 

Server has received an auth_buf message but does not have a handler configured.

HE_ERR_ACCESS_DENIED_NO_AUTH_USERPASS_HANDLER 

Server has received an auth_userpass message but does not have a handler configured.

enum msg_ids
Enumerator
HE_MSGID_NOOP 

NOOP - nothing to do.

HE_MSGID_PING 

Ping reqest.

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.