32 #define HE_WOLF_TIMEOUT_MULTIPLIER 100 33 #define HE_WOLF_RENEGOTIATION_TIMEOUT_MULTIPLIER 1000 275 void he_internal_disconnect_and_shutdown(
he_conn_t *conn);
402 void he_internal_generate_event(
he_conn_t *conn, he_conn_event_t event);
414 uint8_t minor_version);
416 size_t he_internal_calculate_data_packet_length(
he_conn_t *conn,
size_t length);
const char * he_conn_get_username(const he_conn_t *conn)
Get the username that Helium will authenticate with, previously set by he_conn_set_username.
Definition: conn.c:664
he_return_code_t he_conn_set_password(he_conn_t *conn, const char *password)
Sets the password Helium should use to authenticate with.
Definition: conn.c:672
enum he_return_code he_return_code_t
All possible return codes for helium.
bool he_conn_is_error_fatal(he_conn_t *conn, he_return_code_t error_msg)
Returns true if a given error (a return from libhelium where he_return_code_t != HE_SUCCESS) is obvio...
Definition: conn.c:34
he_return_code_t he_conn_nudge(he_conn_t *conn)
Nudges Helium.
Definition: conn.c:556
he_return_code_t he_conn_rotate_session_id(he_conn_t *conn, uint64_t *new_session_id)
Rotate the session ID for this connection.
Definition: conn.c:612
int he_conn_get_outside_mtu(he_conn_t *conn)
Get the MTU value for the outside transport mechanism. *.
Definition: conn.c:717
bool he_conn_supports_renegotiation(he_conn_t *conn)
Whether this particular connection supports renegoation.
Definition: conn.c:638
he_return_code_t he_internal_send_message(he_conn_t *conn, uint8_t *message, uint16_t length)
Sends a message over the secured tunnel.
Definition: conn.c:375
he_return_code_t he_conn_set_auth_buffer(he_conn_t *conn, uint8_t auth_type, uint8_t *buffer, uint16_t length)
Sets the opaque buffer Helium should use to authenticate with.
Definition: conn.c:681
void he_conn_destroy(he_conn_t *conn)
Releases all memory allocate by Helium for this connection.
Definition: conn.c:130
void he_internal_update_timeout(he_conn_t *conn)
Updates the timeout for a connectionand triggers the timeout callback if set.
Definition: conn.c:522
he_return_code_t he_conn_set_protocol_version(he_conn_t *conn, uint8_t major_version, uint8_t minor_version)
On the server, sets the major/minor version number for this connection.
Definition: conn.c:646
int he_conn_get_nudge_time(he_conn_t *conn)
Returns the number of miliseconds that host application should wait before nudging Helium...
Definition: conn.c:549
enum he_conn_state he_conn_state_t
Status codes for a Helium connection.
bool he_conn_is_password_set(const he_conn_t *conn)
Check if the password has been set.
Definition: conn.c:677
int he_conn_set_outside_mtu(he_conn_t *conn, int mtu)
Set the MTU for the outside transport mechanism. Usually this will be the MTU of the devices Internet...
Definition: conn.c:710
he_return_code_t he_conn_schedule_renegotiation(he_conn_t *conn)
Tell Helium to schedule a renegotiation.
Definition: conn.c:475
bool he_conn_is_auth_buffer_set(const he_conn_t *conn)
Check if the auth buffer has been set.
Definition: conn.c:706
he_return_code_t he_conn_is_valid_client(he_ssl_ctx_t *ssl_ctx, he_conn_t *conn)
Checks whether the client conn has the basic values to allow Helium to connect.
Definition: conn.c:78
int he_conn_set_username(he_conn_t *conn, const char *username)
Set the username to authenticate with.
Definition: conn.c:659
Core internal header file for libhelium.
uint64_t he_conn_get_session_id(he_conn_t *conn)
Returns the session ID for this connection.
Definition: conn.c:764
void * he_conn_get_context(he_conn_t *conn)
Retrieve the pointer to the user supplied context.
Definition: conn.c:760
bool he_conn_is_outside_mtu_set(he_conn_t *conn)
Check if the outside MTU has been set.
Definition: conn.c:721
he_return_code_t he_conn_disconnect(he_conn_t *conn)
Try to cleanly disconnect from the remote Helium instance (client or server).
Definition: conn.c:302
he_return_code_t he_conn_send_keepalive(he_conn_t *conn)
Tell Helium to send a keepalive message. This can be used to avoid NAT timing out.
Definition: conn.c:403
uint64_t he_conn_get_pending_session_id(he_conn_t *conn)
Returns the pending session ID for this connection, if there is one.
Definition: conn.c:768
he_return_code_t he_internal_generate_session_id(he_conn_t *conn, uint64_t *session_id_out)
Generate a random session ID.
Definition: conn.c:602
he_return_code_t he_conn_set_session_id(he_conn_t *conn, uint64_t session_id)
Sets the session ID for this connection.
Definition: conn.c:772
he_conn_state_t he_conn_get_state(he_conn_t *conn)
Returns the state that the conn is currently in.
Definition: conn.c:591
he_return_code_t he_conn_client_connect(he_conn_t *conn, he_ssl_ctx_t *ssl_ctx, he_plugin_chain_t *inside_plugins, he_plugin_chain_t *outside_plugins)
Tries to establish a connection with a Helium server.
Definition: conn.c:254
he_return_code_t he_conn_is_valid_server(he_ssl_ctx_t *ssl_ctx, he_conn_t *conn)
Checks whether the client conn has the basic values to allow Helium to connect.
Definition: conn.c:108
he_return_code_t he_conn_set_context(he_conn_t *conn, void *data)
Store a pointer in the context that will be made available in all Helium callbacks.
Definition: conn.c:754
bool he_conn_is_username_set(const he_conn_t *conn)
Check if the password has been set.
Definition: conn.c:668
he_return_code_t he_conn_server_connect(he_conn_t *conn, he_ssl_ctx_t *ssl_ctx, he_plugin_chain_t *inside_plugins, he_plugin_chain_t *outside_plugins)
Tries to establish a connection with a Helium client.
Definition: conn.c:272
he_conn_t * he_conn_create(void)
Creates a Helium connection struct.
Definition: conn.c:126