28 #include "messaging/coap/oscore_constants.h"
72 #define SERIAL_NUM_SIZE (12)
104 uint8_t kid[OSCORE_CTXID_LEN];
106 uint8_t kid_ctx[OSCORE_IDCTX_LEN];
110 #define oc_make_ipv4_endpoint(__name__, __flags__, __port__, ...) \
111 oc_endpoint_t __name__ = { .flags = __flags__, \
112 .addr.ipv4 = { .port = __port__, \
113 .address = { __VA_ARGS__ } } }
114 #define oc_make_ipv6_endpoint(__name__, __flags__, __port__, ...) \
115 oc_endpoint_t __name__ = { .flags = __flags__, \
117 .group_address = 0, \
118 .addr.ipv6 = { .port = __port__, \
119 .address = { __VA_ARGS__ } } }
144 char *oscore_str_id);
#define SERIAL_NUM_SIZE
binary: 6 bytes: in hex: 12 bytes
struct oc_endpoint_t oc_endpoint_t
the endpoint information
void oc_endpoint_set_auth_at_index(oc_endpoint_t *endpoint, int32_t index)
set auth at index for the endpoint, e.g.
int oc_endpoint_compare(const oc_endpoint_t *ep1, const oc_endpoint_t *ep2)
compare endpoint
int oc_endpoint_set_oscore_id(oc_endpoint_t *endpoint, char *oscore_id, int oscore_id_len)
set the OSCORE identifier (SID)
void oc_endpoint_list_copy(oc_endpoint_t **dst, oc_endpoint_t *src)
copy list of endpoint
int oc_endpoint_string_parse_path(oc_string_t *endpoint_str, oc_string_t *path)
parse endpoint
void oc_endpoint_print(oc_endpoint_t *ep)
print the (first) endpoint to std out
int oc_string_to_endpoint(oc_string_t *endpoint_str, oc_endpoint_t *endpoint, oc_string_t *uri)
string to endpoint
oc_endpoint_t * oc_new_endpoint(void)
create new endpoint
int oc_endpoint_set_oscore_id_from_str(oc_endpoint_t *endpoint, char *oscore_str_id)
set the OSCORE identifier (SID)
transport_flags
transport flags (bit map) these flags are used to determine what to do on communication level
@ DISCOVERY
used for discovery
@ SECURED
secure communication
@ MULTICAST
multicast enabled
@ OSCORE_DECRYPTED
OSCORE decrypted message.
@ OSCORE_ENCRYPTED
OSCORE encrypted message.
@ OSCORE
OSCORE communication.
void oc_endpoint_copy(oc_endpoint_t *dst, oc_endpoint_t *src)
copy endpoint
int oc_endpoint_compare_address(const oc_endpoint_t *ep1, const oc_endpoint_t *ep2)
compare address of the endpoint
int oc_ipv6_endpoint_is_link_local(oc_endpoint_t *endpoint)
is endpoint (ipv6) link local
int oc_endpoint_to_string(oc_endpoint_t *endpoint, oc_string_t *endpoint_str)
convert the endpoint to a human readable string (e.g.
void oc_free_endpoint(oc_endpoint_t *endpoint)
free endpoint
void oc_endpoint_set_local_address(oc_endpoint_t *ep, int interface_index)
set interface index on the endpoint
uuid implementationGenerate and work with UUIDs as specified in RFC 4122.
char oscore_id[SERIAL_NUM_SIZE+1]
OSCORE context (binary), e.g.
uint8_t request_piv[OSCORE_PIV_LEN]
OSCORE partial iv.
int32_t auth_at_index
auth at index +1 [1-max_indexes], 0 == error.
enum transport_flags flags
the transport flags
size_t device
device index
struct oc_endpoint_t * next
pointer to the next structure
uint8_t request_piv_len
OSCORE partial iv length.
int interface_index
interface index
uint32_t group_address
group address, being used to find back the OSCORE credential to be used for encryption for s-mode mes...
uint8_t scope
scope of the address (multicast)