IDF master b86fe0c66c

This commit is contained in:
me-no-dev
2021-10-13 18:21:12 +00:00
parent 2fb2ef54ce
commit 34c81be93b
538 changed files with 17119 additions and 4346 deletions

View File

@ -191,6 +191,9 @@ int coap_handle_response_get_block(coap_context_t *context,
void coap_block_delete_lg_xmit(coap_session_t *session,
coap_lg_xmit_t *lg_xmit);
coap_tick_t coap_block_check_lg_xmit_timeouts(coap_session_t *session,
coap_tick_t now);
/**
* The function that does all the work for the coap_add_data_large*()
* functions.

View File

@ -27,6 +27,12 @@ typedef struct coap_dtls_pki_t coap_dtls_pki_t;
#ifndef COAP_DTLS_HINT_LENGTH
#define COAP_DTLS_HINT_LENGTH 128
#endif
#ifndef COAP_DTLS_MAX_PSK_IDENTITY
#define COAP_DTLS_MAX_PSK_IDENTITY 64
#endif
#ifndef COAP_DTLS_MAX_PSK
#define COAP_DTLS_MAX_PSK 64
#endif
typedef enum coap_dtls_role_t {
COAP_DTLS_ROLE_CLIENT, /**< Internal function invoked for client */

View File

@ -24,34 +24,34 @@
* Scalar type to represent different events, e.g. DTLS events or
* retransmission timeouts.
*/
typedef unsigned int coap_event_t;
typedef enum coap_event_t {
/**
* (D)TLS events for COAP_PROTO_DTLS and COAP_PROTO_TLS
*/
#define COAP_EVENT_DTLS_CLOSED 0x0000
#define COAP_EVENT_DTLS_CONNECTED 0x01DE
#define COAP_EVENT_DTLS_RENEGOTIATE 0x01DF
#define COAP_EVENT_DTLS_ERROR 0x0200
COAP_EVENT_DTLS_CLOSED = 0x0000,
COAP_EVENT_DTLS_CONNECTED = 0x01DE,
COAP_EVENT_DTLS_RENEGOTIATE = 0x01DF,
COAP_EVENT_DTLS_ERROR = 0x0200,
/**
* TCP events for COAP_PROTO_TCP and COAP_PROTO_TLS
*/
#define COAP_EVENT_TCP_CONNECTED 0x1001
#define COAP_EVENT_TCP_CLOSED 0x1002
#define COAP_EVENT_TCP_FAILED 0x1003
COAP_EVENT_TCP_CONNECTED = 0x1001,
COAP_EVENT_TCP_CLOSED = 0x1002,
COAP_EVENT_TCP_FAILED = 0x1003,
/**
* CSM exchange events for reliable protocols only
*/
#define COAP_EVENT_SESSION_CONNECTED 0x2001
#define COAP_EVENT_SESSION_CLOSED 0x2002
#define COAP_EVENT_SESSION_FAILED 0x2003
COAP_EVENT_SESSION_CONNECTED = 0x2001,
COAP_EVENT_SESSION_CLOSED = 0x2002,
COAP_EVENT_SESSION_FAILED = 0x2003,
/**
* BLOCK2 receive errors
* (Q-)BLOCK receive errors
*/
#define COAP_EVENT_PARTIAL_BLOCK 0x3001
COAP_EVENT_PARTIAL_BLOCK = 0x3001
} coap_event_t;
/**
* Type for event handler functions that can be registered with a CoAP

View File

@ -88,7 +88,11 @@ COAP_STATIC_INLINE uint64_t coap_ticks_to_rt_us(coap_tick_t t) {
#elif defined(RIOT_VERSION)
#include <xtimer.h>
#ifdef XTIMER_HZ
#define COAP_TICKS_PER_SECOND (XTIMER_HZ)
#else /* XTIMER_HZ */
#define COAP_TICKS_PER_SECOND (XTIMER_HZ_BASE)
#endif /* XTIMER_HZ */
typedef uint64_t coap_tick_t;
typedef int64_t coap_tick_diff_t;

View File

@ -15,6 +15,7 @@
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
#include <sys/select.h>
#include <sys/time.h>
#endif
#include <time.h>

View File

@ -299,7 +299,6 @@ typedef enum coap_pdu_code_t {
COAP_REQUEST_CODE_PATCH = COAP_REQUEST_PATCH,
COAP_REQUEST_CODE_IPATCH = COAP_REQUEST_IPATCH,
COAP_RESPONSE_CODE_OK = COAP_RESPONSE_CODE(200),
COAP_RESPONSE_CODE_CREATED = COAP_RESPONSE_CODE(201),
COAP_RESPONSE_CODE_DELETED = COAP_RESPONSE_CODE(202),
COAP_RESPONSE_CODE_VALID = COAP_RESPONSE_CODE(203),

View File

@ -83,7 +83,8 @@ typedef void (*coap_method_handler_t)
* variable of coap_str_const_t has to point to constant text, or point to data
* within the allocated coap_str_const_t parameter.
*
* @param uri_path The string URI path of the new resource.
* @param uri_path The string URI path of the new resource. The leading '/' is
* not normally required - e.g. just "full/path/for/resource".
* @param flags Flags for memory management (in particular release of
* memory). Possible values:@n
*