KNX IoT
KNX IoT Point API stack implementation
|
end point implementation, e.g. More...
Go to the source code of this file.
Data Structures | |
struct | oc_endpoint_t |
the endpoint information More... | |
struct | oc_ipv4_addr_t |
ipv4 data structure More... | |
struct | oc_ipv6_addr_t |
ipv6 data structure More... | |
Macros | |
#define | oc_make_ipv4_endpoint(__name__, __flags__, __port__, ...) |
#define | oc_make_ipv6_endpoint(__name__, __flags__, __port__, ...) |
#define | SERIAL_NUM_SIZE (12) |
binary: 6 bytes: in hex: 12 bytes More... | |
Typedefs | |
typedef struct oc_endpoint_t | oc_endpoint_t |
the endpoint information More... | |
Enumerations | |
enum | transport_flags { DISCOVERY = 1 << 0 , SECURED = 1 << 1 , IPV4 = 1 << 2 , IPV6 = 1 << 3 , TCP = 1 << 4 , OSCORE = 1 << 5 , MULTICAST = 1 << 6 , ACCEPTED = 1 << 7 , OSCORE_DECRYPTED = 1 << 8 , OSCORE_ENCRYPTED = 1 << 9 } |
transport flags (bit map) these flags are used to determine what to do on communication level More... | |
Functions | |
int | oc_endpoint_compare (const oc_endpoint_t *ep1, const oc_endpoint_t *ep2) |
compare endpoint More... | |
int | oc_endpoint_compare_address (const oc_endpoint_t *ep1, const oc_endpoint_t *ep2) |
compare address of the endpoint More... | |
void | oc_endpoint_copy (oc_endpoint_t *dst, oc_endpoint_t *src) |
copy endpoint More... | |
void | oc_endpoint_list_copy (oc_endpoint_t **dst, oc_endpoint_t *src) |
copy list of endpoint More... | |
void | oc_endpoint_print (oc_endpoint_t *ep) |
print the (first) endpoint to std out More... | |
void | oc_endpoint_set_auth_at_index (oc_endpoint_t *endpoint, int32_t index) |
set auth at index for the endpoint, e.g. More... | |
void | oc_endpoint_set_local_address (oc_endpoint_t *ep, int interface_index) |
set interface index on the endpoint More... | |
int | oc_endpoint_set_oscore_id (oc_endpoint_t *endpoint, char *oscore_id, int oscore_id_len) |
set the OSCORE identifier (SID) More... | |
int | oc_endpoint_set_oscore_id_from_str (oc_endpoint_t *endpoint, char *oscore_str_id) |
set the OSCORE identifier (SID) More... | |
int | oc_endpoint_string_parse_path (oc_string_t *endpoint_str, oc_string_t *path) |
parse endpoint More... | |
int | oc_endpoint_to_string (oc_endpoint_t *endpoint, oc_string_t *endpoint_str) |
convert the endpoint to a human readable string (e.g. More... | |
void | oc_free_endpoint (oc_endpoint_t *endpoint) |
free endpoint More... | |
int | oc_ipv6_endpoint_is_link_local (oc_endpoint_t *endpoint) |
is endpoint (ipv6) link local More... | |
oc_endpoint_t * | oc_new_endpoint (void) |
create new endpoint More... | |
int | oc_string_to_endpoint (oc_string_t *endpoint_str, oc_endpoint_t *endpoint, oc_string_t *uri) |
string to endpoint More... | |
end point implementation, e.g.
IP(v6) addressing for sending & receiving data
Definition in file oc_endpoint.h.
#define oc_make_ipv4_endpoint | ( | __name__, | |
__flags__, | |||
__port__, | |||
... | |||
) |
Definition at line 110 of file oc_endpoint.h.
#define oc_make_ipv6_endpoint | ( | __name__, | |
__flags__, | |||
__port__, | |||
... | |||
) |
Definition at line 114 of file oc_endpoint.h.
#define SERIAL_NUM_SIZE (12) |
binary: 6 bytes: in hex: 12 bytes
Definition at line 72 of file oc_endpoint.h.
typedef struct oc_endpoint_t oc_endpoint_t |
the endpoint information
enum transport_flags |
transport flags (bit map) these flags are used to determine what to do on communication level
Definition at line 59 of file oc_endpoint.h.
int oc_endpoint_compare | ( | const oc_endpoint_t * | ep1, |
const oc_endpoint_t * | ep2 | ||
) |
compare endpoint
ep1 | endpoint 1 to compare |
ep2 | endpoint 2 to compare |
int oc_endpoint_compare_address | ( | const oc_endpoint_t * | ep1, |
const oc_endpoint_t * | ep2 | ||
) |
compare address of the endpoint
ep1 | endpoint 1 to compare |
ep2 | endpoint 2 to compare |
void oc_endpoint_copy | ( | oc_endpoint_t * | dst, |
oc_endpoint_t * | src | ||
) |
copy endpoint
dst | the destination endpoint |
src | the source endpoint |
void oc_endpoint_list_copy | ( | oc_endpoint_t ** | dst, |
oc_endpoint_t * | src | ||
) |
copy list of endpoint
dst | the destination list of endpoints |
src | the source list of endpoints |
void oc_endpoint_print | ( | oc_endpoint_t * | ep | ) |
print the (first) endpoint to std out
ep |
void oc_endpoint_set_auth_at_index | ( | oc_endpoint_t * | endpoint, |
int32_t | index | ||
) |
set auth at index for the endpoint, e.g.
the used security context
endpoint | the end point |
index | the auth at index |
void oc_endpoint_set_local_address | ( | oc_endpoint_t * | ep, |
int | interface_index | ||
) |
set interface index on the endpoint
ep | the endpoint |
interface_index | the interface index |
int oc_endpoint_set_oscore_id | ( | oc_endpoint_t * | endpoint, |
char * | oscore_id, | ||
int | oscore_id_len | ||
) |
set the OSCORE identifier (SID)
endpoint | the end point |
oscore_id | the OSCORE id (SID) to use for encryption/decryption |
oscore_id_len | the length of the oscore_id |
int oc_endpoint_set_oscore_id_from_str | ( | oc_endpoint_t * | endpoint, |
char * | oscore_str_id | ||
) |
set the OSCORE identifier (SID)
endpoint | the end point |
oscore_str_id | the OSCORE id (as string in hex) to use for encryption/decryption |
int oc_endpoint_string_parse_path | ( | oc_string_t * | endpoint_str, |
oc_string_t * | path | ||
) |
parse endpoint
endpoint_str | |
path |
int oc_endpoint_to_string | ( | oc_endpoint_t * | endpoint, |
oc_string_t * | endpoint_str | ||
) |
convert the endpoint to a human readable string (e.g.
"coaps://[fe::22]:/")
endpoint | the endpoint |
endpoint_str | endpoint as human readable string |
void oc_free_endpoint | ( | oc_endpoint_t * | endpoint | ) |
free endpoint
endpoint | the endpoint to be freed |
int oc_ipv6_endpoint_is_link_local | ( | oc_endpoint_t * | endpoint | ) |
is endpoint (ipv6) link local
endpoint | the endpoint to check |
oc_endpoint_t* oc_new_endpoint | ( | void | ) |
create new endpoint
int oc_string_to_endpoint | ( | oc_string_t * | endpoint_str, |
oc_endpoint_t * | endpoint, | ||
oc_string_t * | uri | ||
) |
string to endpoint
endpoint_str | the endpoint as string (e.g. "coaps://[fe::22]:/blah") |
endpoint | the address part of the string |
uri | the uri part of the endpoint |