libcoap 4.3.3
OSCORE CBOR Support

Internal API for interfacing with OSCORE CBOR. More...

+ Collaboration diagram for OSCORE CBOR Support:

Macros

#define CBOR_UNSIGNED_INTEGER   0
 
#define CBOR_NEGATIVE_INTEGER   1
 
#define CBOR_BYTE_STRING   2
 
#define CBOR_TEXT_STRING   3
 
#define CBOR_ARRAY   4
 
#define CBOR_MAP   5
 
#define CBOR_TAG   6
 
#define CBOR_SIMPLE_VALUE   7
 
#define CBOR_FLOATING_POINT   7
 
#define CBOR_FALSE   20
 
#define CBOR_TRUE   21
 
#define CBOR_NULL   22
 

Functions

size_t oscore_cbor_put_nil (uint8_t **buffer, size_t *buf_size)
 
size_t oscore_cbor_put_true (uint8_t **buffer, size_t *buf_size)
 
size_t oscore_cbor_put_false (uint8_t **buffer, size_t *buf_size)
 
size_t oscore_cbor_put_text (uint8_t **buffer, size_t *buf_size, const char *text, size_t text_len)
 
size_t oscore_cbor_put_array (uint8_t **buffer, size_t *buf_size, size_t elements)
 
size_t oscore_cbor_put_bytes (uint8_t **buffer, size_t *buf_size, const uint8_t *bytes, size_t bytes_len)
 
size_t oscore_cbor_put_map (uint8_t **buffer, size_t *buf_size, size_t elements)
 
size_t oscore_cbor_put_number (uint8_t **buffer, size_t *buf_size, int64_t value)
 
size_t oscore_cbor_put_simple_value (uint8_t **buffer, size_t *buf_size, uint8_t value)
 
size_t oscore_cbor_put_unsigned (uint8_t **buffer, size_t *buf_size, uint64_t value)
 
size_t oscore_cbor_put_tag (uint8_t **buffer, size_t *buf_size, uint64_t value)
 
size_t oscore_cbor_put_negative (uint8_t **buffer, size_t *buf_size, int64_t value)
 
uint8_t oscore_cbor_get_next_element (const uint8_t **buffer, size_t *buf_size)
 
size_t oscore_cbor_get_element_size (const uint8_t **buffer, size_t *buf_size)
 
uint8_t oscore_cbor_elem_contained (const uint8_t *data, size_t *buf_size, uint8_t *end)
 
uint8_t oscore_cbor_get_number (const uint8_t **data, size_t *buf_size, int64_t *value)
 
uint8_t oscore_cbor_get_simple_value (const uint8_t **data, size_t *buf_size, uint8_t *value)
 
int64_t oscore_cbor_get_negative_integer (const uint8_t **buffer, size_t *buf_size)
 
uint64_t oscore_cbor_get_unsigned_integer (const uint8_t **buffer, size_t *buf_size)
 
void oscore_cbor_get_string (const uint8_t **buffer, size_t *buf_size, char *str, size_t size)
 
void oscore_cbor_get_array (const uint8_t **buffer, size_t *buf_size, uint8_t *arr, size_t size)
 
uint8_t oscore_cbor_get_string_array (const uint8_t **data, size_t *buf_size, uint8_t **result, size_t *len)
 
uint8_t oscore_cbor_strip_value (const uint8_t **data, size_t *buf_size, uint8_t **result, size_t *len)
 

Detailed Description

Internal API for interfacing with OSCORE CBOR.

Macro Definition Documentation

◆ CBOR_ARRAY

#define CBOR_ARRAY   4

Definition at line 64 of file oscore_cbor.h.

◆ CBOR_BYTE_STRING

#define CBOR_BYTE_STRING   2

Definition at line 62 of file oscore_cbor.h.

◆ CBOR_FALSE

#define CBOR_FALSE   20

Definition at line 70 of file oscore_cbor.h.

◆ CBOR_FLOATING_POINT

#define CBOR_FLOATING_POINT   7

Definition at line 68 of file oscore_cbor.h.

◆ CBOR_MAP

#define CBOR_MAP   5

Definition at line 65 of file oscore_cbor.h.

◆ CBOR_NEGATIVE_INTEGER

#define CBOR_NEGATIVE_INTEGER   1

Definition at line 61 of file oscore_cbor.h.

◆ CBOR_NULL

#define CBOR_NULL   22

Definition at line 72 of file oscore_cbor.h.

◆ CBOR_SIMPLE_VALUE

#define CBOR_SIMPLE_VALUE   7

Definition at line 67 of file oscore_cbor.h.

◆ CBOR_TAG

#define CBOR_TAG   6

Definition at line 66 of file oscore_cbor.h.

◆ CBOR_TEXT_STRING

#define CBOR_TEXT_STRING   3

Definition at line 63 of file oscore_cbor.h.

◆ CBOR_TRUE

#define CBOR_TRUE   21

Definition at line 71 of file oscore_cbor.h.

◆ CBOR_UNSIGNED_INTEGER

#define CBOR_UNSIGNED_INTEGER   0

Definition at line 60 of file oscore_cbor.h.

Function Documentation

◆ oscore_cbor_elem_contained()

uint8_t oscore_cbor_elem_contained ( const uint8_t *  data,
size_t *  buf_size,
uint8_t *  end 
)

Definition at line 260 of file oscore_cbor.c.

+ Here is the call graph for this function:

◆ oscore_cbor_get_array()

void oscore_cbor_get_array ( const uint8_t **  buffer,
size_t *  buf_size,
uint8_t *  arr,
size_t  size 
)

Definition at line 324 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_get_element_size()

size_t oscore_cbor_get_element_size ( const uint8_t **  buffer,
size_t *  buf_size 
)

Definition at line 240 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_get_negative_integer()

int64_t oscore_cbor_get_negative_integer ( const uint8_t **  buffer,
size_t *  buf_size 
)

Definition at line 271 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_get_next_element()

uint8_t oscore_cbor_get_next_element ( const uint8_t **  buffer,
size_t *  buf_size 
)

Definition at line 227 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_get_number()

uint8_t oscore_cbor_get_number ( const uint8_t **  data,
size_t *  buf_size,
int64_t *  value 
)

Definition at line 287 of file oscore_cbor.c.

+ Here is the call graph for this function:

◆ oscore_cbor_get_simple_value()

uint8_t oscore_cbor_get_simple_value ( const uint8_t **  data,
size_t *  buf_size,
uint8_t *  value 
)

Definition at line 306 of file oscore_cbor.c.

+ Here is the call graph for this function:

◆ oscore_cbor_get_string()

void oscore_cbor_get_string ( const uint8_t **  buffer,
size_t *  buf_size,
char *  str,
size_t  size 
)

Definition at line 316 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_get_string_array()

uint8_t oscore_cbor_get_string_array ( const uint8_t **  data,
size_t *  buf_size,
uint8_t **  result,
size_t *  len 
)

Definition at line 335 of file oscore_cbor.c.

+ Here is the call graph for this function:

◆ oscore_cbor_get_unsigned_integer()

uint64_t oscore_cbor_get_unsigned_integer ( const uint8_t **  buffer,
size_t *  buf_size 
)

Definition at line 276 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_put_array()

size_t oscore_cbor_put_array ( uint8_t **  buffer,
size_t *  buf_size,
size_t  elements 
)

Definition at line 92 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_put_bytes()

size_t oscore_cbor_put_bytes ( uint8_t **  buffer,
size_t *  buf_size,
const uint8_t *  bytes,
size_t  bytes_len 
)

Definition at line 100 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_put_false()

size_t oscore_cbor_put_false ( uint8_t **  buffer,
size_t *  buf_size 
)

Definition at line 71 of file oscore_cbor.c.

+ Here is the call graph for this function:

◆ oscore_cbor_put_map()

size_t oscore_cbor_put_map ( uint8_t **  buffer,
size_t *  buf_size,
size_t  elements 
)

Definition at line 115 of file oscore_cbor.c.

+ Here is the call graph for this function:

◆ oscore_cbor_put_negative()

size_t oscore_cbor_put_negative ( uint8_t **  buffer,
size_t *  buf_size,
int64_t  value 
)

Definition at line 149 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_put_nil()

size_t oscore_cbor_put_nil ( uint8_t **  buffer,
size_t *  buf_size 
)

Definition at line 59 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_put_number()

size_t oscore_cbor_put_number ( uint8_t **  buffer,
size_t *  buf_size,
int64_t  value 
)

Definition at line 123 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_put_simple_value()

size_t oscore_cbor_put_simple_value ( uint8_t **  buffer,
size_t *  buf_size,
uint8_t  value 
)

Definition at line 131 of file oscore_cbor.c.

+ Here is the call graph for this function:

◆ oscore_cbor_put_tag()

size_t oscore_cbor_put_tag ( uint8_t **  buffer,
size_t *  buf_size,
uint64_t  value 
)

Definition at line 141 of file oscore_cbor.c.

+ Here is the call graph for this function:

◆ oscore_cbor_put_text()

size_t oscore_cbor_put_text ( uint8_t **  buffer,
size_t *  buf_size,
const char *  text,
size_t  text_len 
)

Definition at line 77 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_put_true()

size_t oscore_cbor_put_true ( uint8_t **  buffer,
size_t *  buf_size 
)

Definition at line 65 of file oscore_cbor.c.

+ Here is the call graph for this function:

◆ oscore_cbor_put_unsigned()

size_t oscore_cbor_put_unsigned ( uint8_t **  buffer,
size_t *  buf_size,
uint64_t  value 
)

Definition at line 168 of file oscore_cbor.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ oscore_cbor_strip_value()

uint8_t oscore_cbor_strip_value ( const uint8_t **  data,
size_t *  buf_size,
uint8_t **  result,
size_t *  len 
)

Definition at line 421 of file oscore_cbor.c.

+ Here is the call graph for this function: