|
Helium
|
Utility functions for ease of use. More...
#include "he.h"
Go to the source code of this file.
Functions | |
| const char * | he_return_code_name (he_return_code_t rc) |
| const char * | he_client_state_name (he_conn_state_t st) |
| const char * | he_client_event_name (he_conn_event_t ev) |
| const char * | he_connection_protocol_name (he_connection_protocol_t protocol) |
| const char * | he_pmtud_state_name (he_pmtud_state_t state) |
| 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 null byte in the first dst_size bytes of the array pointed to by src This function is a wrapper over strncpy which adds null byte as the last byte. More... | |
Utility functions for ease of use.
| const char* he_client_event_name | ( | he_conn_event_t | ev | ) |
Returns stringified version of an he_conn_event_t.
ev or "HE_EVENT_UNKNOWN". | const char* he_client_state_name | ( | he_conn_state_t | st | ) |
Returns stringified version of an he_conn_state_t.
st or "HE_STATE_UNKNOWN". | const char* he_connection_protocol_name | ( | he_connection_protocol_t | protocol | ) |
Returns stringified version of an he_connection_protocol_t.
protocol or "HE_CONNECTION_PROTOCOL_UNKNOWN". | const char* he_pmtud_state_name | ( | he_pmtud_state_t | state | ) |
Returns stringified version of an he_pmtud_state_t.
| const char* he_return_code_name | ( | he_return_code_t | rc | ) |
Returns stringified version of an he_return_code_t.
rc or "HE_ERR_UNKNOWN". | 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 null byte in the first dst_size bytes of the array pointed to by src This function is a wrapper over strncpy which adds null byte as the last byte.
| dst | Pointer to the destination char array |
| src | Pointer to the source char array |
| dst_size | size of the destination char array |
1.8.17