Documentation tidy up

Add in codespell to pre-commit to help fix documentation errors.
This commit is contained in:
Jon Shallow authored and Jon Shallow committed 2026-08-08 12:05:03 +01:00
1 parent 1394e9833d
commit 98805f70a5
92 files changed
+218 -213

No files matched your search

+1 -1
View File
@@ -101,7 +101,7 @@ coap_binary_t *get_asn1_tag(coap_asn1_tag_t ltag, const uint8_t *ptr,
* @param data Pointer to ASN1 object containing EC Private Key
* @param size Length of ASN1 object
*
* @return The publick key (to be freed off by caller)
* @return The public key (to be freed off by caller)
* or @c NULL if not found
*/
coap_binary_t *get_asn1_spki(const uint8_t *data, size_t size);
+1 -1
View File
@@ -115,7 +115,7 @@ COAP_DEPRECATED void coap_async_set_app_data(coap_async_t *async, void *app_data
*
* @param async The async state object.
*
* @return The applicaton data pointer.
* @return The application data pointer.
*/
void *coap_async_get_app_data(const coap_async_t *async);
+2 -2
View File
@@ -40,7 +40,7 @@ struct coap_async_t {
coap_session_t *session; /**< transaction session */
coap_pdu_t *pdu; /**< copy of request pdu */
void *app_data; /**< User definable data pointer */
coap_app_data_free_callback_t app_cb; /**< callcack to call when async is
coap_app_data_free_callback_t app_cb; /**< callback to call when async is
being released (or NULL) */
};
@@ -70,7 +70,7 @@ coap_async_t *coap_register_async_lkd(coap_session_t *session,
/**
* Checks if there are any pending Async requests - if so, send them off.
* Otherewise return the time remaining for the next Async to be triggered
* Otherwise return the time remaining for the next Async to be triggered
* or 0 if nothing to do.
*
* @param context The current context.
+3 -3
View File
@@ -66,7 +66,7 @@ typedef struct {
#define COAP_BLOCK_SINGLE_BODY 0x02 /* Deliver the data as a single body */
#define COAP_BLOCK_TRY_Q_BLOCK 0x04 /* Try Q-Block method */
#define COAP_BLOCK_USE_M_Q_BLOCK 0x08 /* Use M bit when recovering Q-Block2 */
#define COAP_BLOCK_NO_PREEMPTIVE_RTAG 0x10 /* (cl) Don't use pre-emptive Request-Tags */
#define COAP_BLOCK_NO_PREEMPTIVE_RTAG 0x10 /* (cl) Don't use preemptive Request-Tags */
#define COAP_BLOCK_STLESS_FETCH 0x20 /* (cl) Assume server supports stateless FETCH */
#define COAP_BLOCK_STLESS_BLOCK2 0x40 /* (svr)Server is stateless for handling Block2 */
#define COAP_BLOCK_NOT_RANDOM_BLOCK1 0x80 /* (svr)Disable server handling random order
@@ -267,7 +267,7 @@ COAP_API coap_binary_t *coap_block_build_body(coap_binary_t *body_data, size_t l
* @param request The requesting pdu.
* @param response The response pdu.
* @param media_type The format of the data.
* @param maxage The maxmimum life of the data. If @c -1, then there
* @param maxage The maximum life of the data. If @c -1, then there
* is no maxage.
* @param length The total length of the data.
* @param data The entire data block to transmit.
@@ -444,7 +444,7 @@ COAP_API int coap_add_data_large_request_app(coap_session_t *session,
* @param response The response pdu.
* @param query The query taken from the (original) requesting pdu.
* @param media_type The content format of the data.
* @param maxage The maxmimum life of the data. If @c -1, then there
* @param maxage The maximum life of the data. If @c -1, then there
* is no maxage.
* @param etag ETag to use if not 0.
* @param length The total length of the data.
+4 -4
View File
@@ -32,7 +32,7 @@ extern "C" {
/*
* Use the top 20 bits of a 64 bit token for tracking current block in large transfer.
* However, if smaller tokens are required. this vould be set up to 48, leaving 16 bits
* However, if smaller tokens are required. this would be set up to 48, leaving 16 bits
* for unique tokens.
*/
#ifndef STATE_MAX_BLK_CNT_BITS
@@ -164,7 +164,7 @@ typedef struct coap_lg_xmit_data_t {
size_t length; /**< large data length */
coap_get_large_data_t get_func; /**< Where to get data id needed */
coap_release_large_data_t release_func; /**< large data de-alloc function */
void *app_ptr; /**< applicaton provided ptr for de-alloc function */
void *app_ptr; /**< application provided ptr for de-alloc function */
uint32_t ref; /**< Reference count */
} coap_lg_xmit_data_t;
@@ -174,7 +174,7 @@ typedef struct coap_lg_xmit_data_t {
struct coap_lg_xmit_t {
struct coap_lg_xmit_t *next;
uint8_t blk_size; /**< large block transmission size */
uint16_t option; /**< large block transmisson CoAP option */
uint16_t option; /**< large block transmission CoAP option */
int last_block; /**< last acknowledged block number Block1
last transmitted Q-Block2 */
coap_lg_xmit_data_t *data_info; /**< Pointer to large data information */
@@ -495,7 +495,7 @@ coap_lg_xmit_t *coap_find_lg_xmit_response(const coap_session_t *session,
* @param response The response pdu.
* @param query The query taken from the (original) requesting pdu.
* @param media_type The content format of the data.
* @param maxage The maxmimum life of the data. If @c -1, then there
* @param maxage The maximum life of the data. If @c -1, then there
* is no maxage.
* @param etag ETag to use if not 0.
* @param length The total length of the data.
+1 -1
View File
@@ -214,7 +214,7 @@ const coap_pdu_t *coap_cache_get_pdu(const coap_cache_entry_t *cache_entry);
* @deprecated Use coap_cache_set_app_data2() instead.
*
* @param cache_entry The CoAP cache entry.
* @param data The data pointer to store with wih the cache entry. Note that
* @param data The data pointer to store with with the cache entry. Note that
* this data must be valid during the lifetime of @p cache_entry.
* @param callback The callback to call to free off this data when the
* cache-entry is deleted, or @c NULL if not required.
+3 -3
View File
@@ -61,7 +61,7 @@ typedef struct coap_crypto_aes_ccm_t {
* The common structure that holds the Crypto information
*/
typedef struct coap_crypto_param_t {
cose_alg_t alg; /**< The COSE algorith to use */
cose_alg_t alg; /**< The COSE algorithm to use */
union {
coap_crypto_aes_ccm_t aes; /**< Used if AES type encryption */
coap_crypto_key_t key; /**< The key to use */
@@ -91,7 +91,7 @@ int coap_crypto_check_hkdf_alg(cose_hkdf_alg_t hkdf_alg);
/**
* Encrypt the provided plaintext data
*
* @param params The Encrypt/Decrypt/Hash paramaters.
* @param params The Encrypt/Decrypt/Hash parameters.
* @param data The data to encrypt.
* @param aad The additional AAD information.
* @param result Where to put the encrypted data.
@@ -109,7 +109,7 @@ int coap_crypto_aead_encrypt(const coap_crypto_param_t *params,
/**
* Decrypt the provided encrypted data into plaintext.
*
* @param params The Encrypt/Decrypt/Hash paramaters.
* @param params The Encrypt/Decrypt/Hash parameters.
* @param data The data to decrypt.
* @param aad The additional AAD information.
* @param result Where to put the decrypted data.
+2 -2
View File
@@ -64,7 +64,7 @@ typedef enum {
COAP_LOG_DEBUG, /* 7 */
COAP_LOG_OSCORE, /* 8 */
COAP_LOG_DTLS_BASE,
#define COAP_LOG_CIPHERS COAP_LOG_DTLS_BASE /* For backward compatability */
#define COAP_LOG_CIPHERS COAP_LOG_DTLS_BASE /* For backward compatibility */
} coap_log_t;
/*
@@ -135,7 +135,7 @@ coap_no_log(void) { }
#endif
/*
* These entries are left here for backward compatability in applications
* These entries are left here for backward compatibility in applications
* (which should really "#include <syslog.h>").
* and MUST NOT be used anywhere within the libcoap code.
*
+2 -2
View File
@@ -51,7 +51,7 @@ typedef struct coap_icmp_info_t {
* @param remote_addr Filled in after connection initiation with
* the remote address.
*
* @return @c 1 if succesful, @c 0 if failure of some sort.
* @return @c 1 if successful, @c 0 if failure of some sort.
*/
int coap_socket_connect_udp(coap_socket_t *sock,
const coap_address_t *local_if,
@@ -73,7 +73,7 @@ int coap_socket_connect_udp(coap_socket_t *sock,
* @param bound_addr Filled in with the address that the UDP layer.
* is listening on for new incoming UDP sessions.
*
* @return @c 1 if succesful, @c 0 if failure of some sort
* @return @c 1 if successful, @c 0 if failure of some sort
*/
int coap_socket_bind_udp(coap_socket_t *sock,
const coap_address_t *listen_addr,
+3 -3
View File
@@ -338,7 +338,7 @@ struct coap_dtls_pki_t {
uint8_t use_cid; /**< 1 if DTLS Connection ID is to be
* used (Client only, server always enabled)
* if supported */
uint8_t allow_sni_cn_mismatch:1; /**< 1 if SNI and returnd CN allowed to mismatch
uint8_t allow_sni_cn_mismatch:1; /**< 1 if SNI and returned CN allowed to mismatch
* (Client only). Not normally set */
uint8_t reserved[1]; /**< Reserved - must be set to 0 for
future compatibility */
@@ -427,7 +427,7 @@ typedef struct coap_dtls_cpsk_t {
future compatibility */
/* Size of 5 chosen to align to next
* parameter, so if newly defined option
* it can use one of the reserverd slot so
* it can use one of the reserved slot so
* no need to change
* COAP_DTLS_CPSK_SETUP_VERSION and just
* decrement the reserved[] count.
@@ -517,7 +517,7 @@ typedef struct coap_dtls_spsk_t {
future compatibility */
/* Size of 6 chosen to align to next
* parameter, so if newly defined option
* it can use one of the reserverd slot so
* it can use one of the reserved slot so
* no need to change
* COAP_DTLS_SPSK_SETUP_VERSION and just
* decrement the reserved[] count.
+1 -1
View File
@@ -275,7 +275,7 @@ int coap_dtls_receive(coap_session_t *coap_session,
#if COAP_SERVER_SUPPORT
/**
* Handling client HELLO messages from a new candiate peer.
* Handling client HELLO messages from a new candidate peer.
* Note that session->tls is empty.
*
* @param coap_session The CoAP session.
+1 -1
View File
@@ -37,7 +37,7 @@ typedef enum {
/*
* (D)TLS events for COAP_PROTO_DTLS and COAP_PROTO_TLS
*/
/** Triggerred when (D)TLS session closed */
/** Triggerrd when (D)TLS session closed */
COAP_EVENT_DTLS_CLOSED = 0x0000,
/** Triggered when (D)TLS session connected */
COAP_EVENT_DTLS_CONNECTED = 0x01DE,
+1 -1
View File
@@ -23,7 +23,7 @@ extern "C" {
#endif
/*
* Define the forward declations for the structures (even non-opaque)
* Define the forward declarations for the structures (even non-opaque)
* so that applications (using coap.h) as well as libcoap builds
* can reference them (and makes .h file dependencies a lot simpler).
*/
+1 -1
View File
@@ -27,7 +27,7 @@ typedef unsigned char coap_key_t[4];
/**
* Calculates a fast hash over the given string @p s of length @p len and stores
* the result into @p h. Depending on the exact implementation, this function
* cannot be used as one-way function to check message integrity or simlar.
* cannot be used as one-way function to check message integrity or similar.
*
* @param s The string used for hash calculation.
* @param len The length of @p s.
+1 -1
View File
@@ -61,7 +61,7 @@
#endif /* ! HAVE_INTTYPES_H */
/*
* To handle compilers / libraries that cannot handle %zu/%zd formats.
* Define these separately to whatver the complier / library can work with.
* Define these separately to whatver the compiler / library can work with.
*/
#ifndef PRIuS
#define PRIuS "zu"
+1 -1
View File
@@ -49,7 +49,7 @@ typedef enum {
*
* @return >=0 Number of bytes read.
* -1 Error error in errno).
* -2 Recieved ICMP unreachable.
* -2 Received ICMP unreachable.
*/
typedef ssize_t (*coap_layer_read_t)(coap_session_t *session,
uint8_t *data, size_t datalen);
+8 -8
View File
@@ -70,7 +70,7 @@ typedef coap_response_t (*coap_response_handler_t)(coap_session_t *session,
const coap_mid_t mid);
/**
* Negative Acknowedge handler that is used as callback in coap_context_t.
* Negative Acknowledge handler that is used as callback in coap_context_t.
*
* @param session CoAP session.
* @param sent The PDU that was transmitted.
@@ -537,7 +537,7 @@ void coap_context_set_max_handshake_sessions(coap_context_t *context,
*
* @param context The coap_context_t object.
*
* @return The maximim number of sessions in (D)TLS handshake value.
* @return The maximum number of sessions in (D)TLS handshake value.
*/
unsigned int coap_context_get_max_handshake_sessions(const coap_context_t *context);
@@ -570,7 +570,7 @@ COAP_API void coap_free_context(coap_context_t *context);
* context.
*
* @param context The CoAP context.
* @param data The data to store with wih the context. Note that this data
* @param data The data to store with with the context. Note that this data
* must be valid during the lifetime of @p context.
*/
COAP_DEPRECATED void coap_set_app_data(coap_context_t *context, void *data);
@@ -962,7 +962,7 @@ COAP_API int coap_io_pending(coap_context_t *context);
* arrays on output.
* @param now Current time.
*
* @return timeout Maxmimum number of milliseconds that can be used by a
* @return timeout Maximum number of milliseconds that can be used by a
* select() to wait for network events or 0 if wait should be
* forever.
*/
@@ -1003,7 +1003,7 @@ COAP_API void coap_io_do_io(coap_context_t *ctx, coap_tick_t now);
* @param ctx The CoAP context
* @param now Current time.
*
* @return timeout Maxmimum number of milliseconds that can be used by a
* @return timeout Maximum number of milliseconds that can be used by a
* epoll_wait() to wait for network events or 0 if wait should be
* forever.
*/
@@ -1111,10 +1111,10 @@ COAP_API coap_fd_t coap_socket_get_fd(coap_socket_t *socket);
*
* @param context The current CoAP context.
* @param read_fds Array to populate with file descriptors in the read pending state.
* @param have_read_fds Updated wth the number of fds found in read pending state.
* @param have_read_fds Updated with the number of fds found in read pending state.
* @param max_read_fds Maximum size of read_fds[] array.
* @param write_fds Array to populate with file descriptors in the write pending state.
* @param have_write_fds Updated wth the number of fds found in write pending state.
* @param have_write_fds Updated with the number of fds found in write pending state.
* @param max_write_fds Maximum size of write_fds[] array.
* @param rem_timeout_ms Remaining timeout time to next libcoap activity in milli-secs.
*
@@ -1234,7 +1234,7 @@ void coap_lwip_set_input_wait_handler(coap_context_t *context,
* arrays on output.
* @param now Current time.
*
* @return timeout Maxmimum number of milliseconds that can be used by a
* @return timeout Maximum number of milliseconds that can be used by a
* select() to wait for network events or 0 if wait should be
* forever.
*/
+8 -8
View File
@@ -70,7 +70,7 @@ struct coap_context_t {
/**
* list of asynchronous message ids */
coap_async_t *async_state;
int async_state_traversing; /**< If hte async state list is being ttaversed */
int async_state_traversing; /**< If hhe async state list is being traversed */
#endif /* COAP_ASYNC_SUPPORT */
/**
@@ -116,7 +116,7 @@ struct coap_context_t {
received */
#endif /* COAP_CLIENT_SUPPORT */
#if COAP_PROXY_SUPPORT
coap_proxy_response_handler_t proxy_response_cb; /**< Called when a reponse
coap_proxy_response_handler_t proxy_response_cb; /**< Called when a response
to proxy logic received */
#endif /* COAP_PROXY_SUPPORT */
coap_nack_handler_t nack_cb; /**< Called when a response issue has occurred */
@@ -171,7 +171,7 @@ struct coap_context_t {
sessions per endpoint. 0 means no
maximum. */
unsigned int max_handshake_sessions; /**< Maximum number of simultaneous
negotating sessions per endpoint. 0
negotiating sessions per endpoint. 0
means use default. */
unsigned int ping_timeout; /**< Minimum inactivity time before
sending a ping message. 0 means
@@ -232,7 +232,7 @@ struct coap_context_t {
uint8_t context_going_away; /**< Set if coap_free_context() has been called */
#endif /* COAP_SERVER_SUPPORT */
uint32_t block_mode; /**< Zero or more COAP_BLOCK_ or'd options */
coap_resource_dynamic_create_t dyn_create_handler; /**< Dynamc resource create handler */
coap_resource_dynamic_create_t dyn_create_handler; /**< Dynamic resource create handler */
uint32_t dynamic_cur; /**< Current number of dynamic resources */
uint32_t dynamic_max; /**< Max number of dynamic resources or 0 is unlimited */
uint32_t max_body_size; /**< Max supported body size or 0 is unlimited */
@@ -772,7 +772,7 @@ int coap_io_pending_lkd(coap_context_t *context);
* @param ctx The CoAP context
* @param now Current time.
*
* @return timeout Maxmimum number of milliseconds that can be used by a
* @return timeout Maximum number of milliseconds that can be used by a
* epoll_wait() to wait for network events or 0 if wait should be
* forever.
*/
@@ -807,7 +807,7 @@ unsigned int coap_io_prepare_epoll_lkd(coap_context_t *ctx, coap_tick_t now);
* arrays on output.
* @param now Current time.
*
* @return timeout Maxmimum number of milliseconds that can be used by a
* @return timeout Maximum number of milliseconds that can be used by a
* select() to wait for network events or 0 if wait should be
* forever.
*/
@@ -932,10 +932,10 @@ int coap_io_process_with_fds_lkd(coap_context_t *ctx, uint32_t timeout_ms,
*
* @param context The current CoAP context.
* @param read_fds Array to populate with file descriptors in the read pending state.
* @param have_read_fds Updated wth the number of fds found in read pending state.
* @param have_read_fds Updated with the number of fds found in read pending state.
* @param max_read_fds Maximum size of read_fds[] array.
* @param write_fds Array to populate with file descriptors in the write pending state.
* @param have_write_fds Updated wth the number of fds found in write pending state.
* @param have_write_fds Updated with the number of fds found in write pending state.
* @param max_write_fds Maximum size of write_fds[] array.
* @param rem_timeout_ms Remaining timeout time to next libcoap activity in milli-secs.
*
+4 -4
View File
@@ -132,7 +132,7 @@ typedef enum coap_sig_abort_opt_t {
COAP_SIG_OPT_BAD_CSM_OPTION = 2, /* ____E_U, uint, 0-2 B, none, RFC8323 */
} coap_sig_abort_opt_t;
/* Backward Application compatability */
/* Backward Application compatibility */
#define COAP_SIGNALING_OPTION_MAX_MESSAGE_SIZE COAP_SIG_OPT_MAX_MESSAGE_SIZE
#define COAP_SIGNALING_OPTION_BLOCK_WISE_TRANSFER COAP_SIG_OPT_BLOCK_WISE_TRANSFER
#define COAP_SIGNALING_OPTION_EXTENDED_TOKEN_LENGTH COAP_SIG_OPT_EXTENDED_TOKEN_LENGTH
@@ -303,7 +303,7 @@ typedef struct {
* option list must be performed before coap_option_iterator_init() is called.
*
* @param pdu The PDU the options of which should be walked through.
* @param oi An iterator object that will be initilized.
* @param oi An iterator object that will be initialized.
* @param filter An optional option number filter.
* With @p number != @c COAP_OPT_ALL, coap_option_next()
* will return only options matching this bitmask.
@@ -456,7 +456,7 @@ typedef struct coap_optlist_t {
*
* Note: Where possible, the option data needs to be stripped of leading zeros
* (big endian) to reduce the amount of data needed in the PDU, as well as in
* some cases the maximum data size of an opton can be exceeded if not stripped
* some cases the maximum data size of an option can be exceeded if not stripped
* and hence be illegal. This is done by using coap_encode_var_safe() or
* coap_encode_var_safe8().
*
@@ -477,7 +477,7 @@ coap_optlist_t *coap_new_optlist(coap_option_num_t number,
* @param pdu The pdu to add the options to from the chain list
* @param optlist_chain The chained list of optlist to add to the pdu
*
* @return @c 1 if succesful or @c 0 if failure;
* @return @c 1 if successful or @c 0 if failure;
*/
int coap_add_optlist_pdu(coap_pdu_t *pdu, coap_optlist_t **optlist_chain);
+1 -1
View File
@@ -407,7 +407,7 @@ int coap_add_token(coap_pdu_t *pdu,
*
* Note: Where possible, the option data needs to be stripped of leading zeros
* (big endian) to reduce the amount of data needed in the PDU, as well as in
* some cases the maximum data size of an opton can be exceeded if not stripped
* some cases the maximum data size of an option can be exceeded if not stripped
* and hence be illegal. This is done by using coap_encode_var_safe() or
* coap_encode_var_safe8().
*
+2 -2
View File
@@ -31,7 +31,7 @@ extern "C" {
/**
* coap_proxy_t Proxy definitions.
*
* 0x00000007 Old 4.3.5 mappings for backward compatability.
* 0x00000007 Old 4.3.5 mappings for backward compatibility.
* 0x00000038 New type mappings.
* 0xffffffc0 Bitwise optional actions.
*
@@ -238,7 +238,7 @@ COAP_API coap_session_t *coap_new_client_session_proxy(coap_context_t *context,
* respectively). type must contain at least COAP_PROXY_FWD_DYNAMIC, and @p server_list
* must be the same as used in coap_proxy_forward_request().
*
* @param session The CoAP upstream proxy session previosly set up (e.g. via call-home).
* @param session The CoAP upstream proxy session previously set up (e.g. via call-home).
* @param use_ip The IP address to match on incoming proxy requests. If NULL, then
* the IP address is determined from @p session.
* @param use_port The port number to match on incoming proxy requests. If 0, default
+3 -3
View File
@@ -150,7 +150,7 @@ int coap_proxy_forward_request_lkd(coap_session_t *session,
* @param received The received PDU.
* @param cache_key Updated with the cache key pointer provided to
* coap_proxy_forward_request_lkd(). The caller should
* delete this cach key (unless the client request set up an
* delete this cache key (unless the client request set up an
* Observe and there will be unsolicited responses).
*
* @return One of COAP_RESPONSE_FAIL or COAP_RESPONSE_OK.
@@ -196,7 +196,7 @@ coap_session_t *coap_new_client_session_proxy_lkd(coap_context_t *context,
* respectively). type must contain at least COAP_PROXY_FWD_DYNAMIC, and @p server_list
* must be the same as used in coap_proxy_forward_request().
*
* @param session The CoAP upstream proxy session previosly set up (e.g. via call-home).
* @param session The CoAP upstream proxy session previously set up (e.g. via call-home).
* @param use_ip The IP address to match on incoming proxy requests. If NULL, then
* the IP address is determined from @p session.
* @param use_port The port number to match on incoming proxy requests. If 0, default
@@ -212,7 +212,7 @@ coap_proxy_entry_t *coap_proxy_fwd_add_client_session_lkd(coap_session_t *sessio
coap_proxy_server_list_t *server_list);
/**
* coap_proxy_local_write() is used to send the PDU for a session created by
* coap_new_client_session_proxy() into the proxy logic for onward transmittion.
* coap_new_client_session_proxy() into the proxy logic for onward transmission.
*
* @param session The coap_new_client_session_proxy() generated session.
* @param pdu The PDU presented to libcoap by coap_send().
+2 -2
View File
@@ -28,7 +28,7 @@ extern "C" {
/**
* @ingroup application_api
* @defgroup coap_resource Resource Configuraton
* @defgroup coap_resource Resource Configuration
* API for setting up resources
* @{
*/
@@ -532,7 +532,7 @@ typedef uint32_t coap_print_status_t;
* with the Block2 option. @p offset is updated during
* output as it is consumed.
*
* @return If COAP_PRINT_STATUS_ERROR is set, an error occured. Otherwise,
* @return If COAP_PRINT_STATUS_ERROR is set, an error occurred. Otherwise,
* the lower 28 bits will indicate the number of characters that
* have actually been output into @p buffer. The flag
* COAP_PRINT_STATUS_TRUNC indicates that the output has been
+1 -1
View File
@@ -171,7 +171,7 @@ struct coap_session_t {
coap_fixed_point_t default_leisure; /**< Mcast leisure time
(default 5.0 secs) */
uint32_t probing_rate; /**< Max transfer wait when remote is not
respoding (default 1 byte/sec) */
responding (default 1 byte/sec) */
#if COAP_Q_BLOCK_SUPPORT
uint16_t max_payloads; /**< maximum Q-BlockX payloads before delay
(default 10) */
+1 -1
View File
@@ -62,7 +62,7 @@ extern "C" {
#endif
/*
* If you do not have the ISO standard stdint.h header file, then you
* must typdef the following:
* must typedef the following:
* name meaning
* uint32_t unsigned 32 bit integer
* uint8_t unsigned 8 bit integer (i.e., unsigned char)
+4 -4
View File
@@ -44,7 +44,7 @@ extern "C" {
* @param remote_addr Filled in after connection initiation with
* the remote address.
*
* @return @c 1 if succesful, @c 0 if failure of some sort.
* @return @c 1 if successful, @c 0 if failure of some sort.
*/
int coap_socket_connect_tcp1(coap_socket_t *sock,
const coap_address_t *local_if,
@@ -62,7 +62,7 @@ int coap_socket_connect_tcp1(coap_socket_t *sock,
* @param local_addr Filled in with the final local address.
* @param remote_addr Filled in with the final remote address.
*
* @return @c 1 if succesful, @c 0 if failure of some sort.
* @return @c 1 if successful, @c 0 if failure of some sort.
*/
int coap_socket_connect_tcp2(coap_socket_t *sock,
coap_address_t *local_addr,
@@ -78,7 +78,7 @@ int coap_socket_connect_tcp2(coap_socket_t *sock,
* @param bound_addr Filled in with the address that the TCP layer
* is listening on for new incoming TCP sessions.
*
* @return @c 1 if succesful, @c 0 if failure of some sort.
* @return @c 1 if successful, @c 0 if failure of some sort.
*/
int coap_socket_bind_tcp(coap_socket_t *sock,
const coap_address_t *listen_addr,
@@ -96,7 +96,7 @@ int coap_socket_bind_tcp(coap_socket_t *sock,
* @param remote_addr Filled in with the remote address.
* @param extra Available for use by any underlying network stack.
*
* @return @c 1 if succesful, @c 0 if failure of some sort.
* @return @c 1 if successful, @c 0 if failure of some sort.
*/
int coap_socket_accept_tcp(coap_socket_t *server,
coap_socket_t *new_client,
+2 -2
View File
@@ -182,7 +182,7 @@ typedef int (*coap_resource_deleted_t)(coap_context_t *context,
* @param observe_deleted Called when a observe subscription is de-registered.
* @param track_observe_value Called every @p save_freq so current observe
* value can be tracked.
* @param dyn_resource_added Called whan a dynamic resource is created from the
* @param dyn_resource_added Called when a dynamic resource is created from the
* 'unknown' resource for tracking.
* @param resource_deleted Called when a resource is removed.
* @param save_freq Frequency of change of observe value for calling
@@ -201,7 +201,7 @@ void coap_persist_track_funcs(coap_context_t *context,
/**
* Set up an active subscription for an observe that was previously active
* over a coap-server inadvertant restart.
* over a coap-server inadvertent restart.
*
* Only UDP sessions currently supported.
*
+1 -1
View File
@@ -214,7 +214,7 @@ void coap_persist_cleanup(coap_context_t *context);
/**
* Set up an active subscription for an observe that was previously active
* over a coap-server inadvertant restart.
* over a coap-server inadvertent restart.
*
* Only UDP sessions currently supported.
*
+8 -8
View File
@@ -69,7 +69,7 @@ extern "C" {
*
* Note:
* libcoap may call a handler, which may in turn call into libcoap, which may
* then call a handler. global_lock will remain locked thoughout this process
* then call a handler. global_lock will remain locked throughout this process
* by the same thread.
*
* Alternatively, coap_lock_callback_release() (or
@@ -131,7 +131,7 @@ typedef struct coap_lock_t {
void coap_lock_unlock_func(coap_lock_t *lock, const char *file, int line);
/**
* Lock the specfic lock.
* Lock the specific lock.
*
* If this is a nested lock (Public API - libcoap - app call-back - Public API),
* then increment the lock->in_callback.
@@ -190,7 +190,7 @@ int coap_lock_lock_func(coap_lock_t *lock, const char *file, int line);
* global_lock not locked if libcoap not started and @p failed is executed. @p failed must
* be code that skips doing the lock protected code.
*
* @param lock The specifc lock to lock.
* @param lock The specific lock to lock.
* @param failed Code to execute on lock failure.
*
*/
@@ -207,7 +207,7 @@ int coap_lock_lock_func(coap_lock_t *lock, const char *file, int line);
* Same thread locked context
* Not when called from app call-back
*
* @param lock The specifc lock to unlock.
* @param lock The specific lock to unlock.
*
*/
#define coap_lock_specific_unlock(lock) do { \
@@ -388,7 +388,7 @@ int coap_lock_lock_func(coap_lock_t *lock);
* global not locked if libcoap not started and @p failed is executed. @p failed must
* be code that skips doing the lock protected code.
*
* @param lock The specifc lock to lock.
* @param lock The specific lock to lock.
* @param failed Code to execute on lock failure
*
*/
@@ -416,7 +416,7 @@ int coap_lock_lock_func(coap_lock_t *lock);
* Same thread locked context.
* Not when called from app call-back.
*
* @param lock The specifc lock to unlock.
* @param lock The specific lock to unlock.
*
*/
#define coap_lock_specific_unlock(lock) do { \
@@ -595,7 +595,7 @@ typedef coap_mutex_t coap_lock_t;
* global_lock not locked if libcoap not started and @p failed is executed. @p failed must
* be code that skips doing the lock protected code.
*
* @param lock The specifc lock to lock.
* @param lock The specific lock to lock.
* @param failed Code to execute on lock failure.
*
*/
@@ -619,7 +619,7 @@ typedef coap_mutex_t coap_lock_t;
* Unlocked when
* Same thread locked context
*
* @param lock The specifc lock to unlock.
* @param lock The specific lock to unlock.
*/
#define coap_lock_specific_unlock(lock)
+1 -1
View File
@@ -383,7 +383,7 @@ coap_string_t *coap_get_uri_path(const coap_pdu_t *request);
/**
* Define a Path to use if an Uri-Path-Abbrev option fails and the client
* is to retry the request using Uri-Path instread of Uri-Path-Abbrev.
* is to retry the request using Uri-Path instead of Uri-Path-Abbrev.
*
* @param mapping A path mapping to value for Uri-Path-Abbrev table or NULL
if the previous mapping is to be cleared.
+1 -1
View File
@@ -76,7 +76,7 @@ void coap_replace_percents(coap_optlist_t *optlist);
const char *coap_map_abbrev_uri_path(coap_upa_chain_t *chain, uint32_t value);
/*
* See if the specifiec path with length is on the UPA chain.
* See if the specific path with length is on the UPA chain.
*
* @param chain The UPA chain to check against.
* @param path The URI path to match (without the leading /).
+1 -1
View File
@@ -33,7 +33,7 @@
/**
* @file oscore_context.h
* @brief An implementation of the Object Security for Constrained RESTful
* Enviornments (RFC 8613).
* Environments (RFC 8613).
*
* \author
* Martin Gunnarsson <martin.gunnarsson@ri.se>
+1 -1
View File
@@ -254,7 +254,7 @@ size_t cose_encrypt0_get_kid_context(cose_encrypt0_t *ptr,
void cose_encrypt0_set_kid_context(cose_encrypt0_t *ptr,
coap_bin_const_t *kid_context);
/* Returns 1 if successfull, 0 if key is of incorrect length. */
/* Returns 1 if successful, 0 if key is of incorrect length. */
int cose_encrypt0_set_key(cose_encrypt0_t *ptr, coap_bin_const_t *key);
void cose_encrypt0_set_nonce(cose_encrypt0_t *ptr, coap_bin_const_t *nonce);
+5 -5
View File
@@ -69,7 +69,7 @@ extern "C" {
/**
* Derive the hmac hash using HMAC-HASH() function.
*
* @param hmac_alg The HMAC algorith to use (e.g. sha256).
* @param hmac_alg The HMAC algorithm to use (e.g. sha256).
* @param key The key to use.
* @param data The data to hash.
* @param hmac The result of the hash.
@@ -85,7 +85,7 @@ int oscore_hmac_hash(cose_hmac_alg_t hmac_alg,
* Derive the pseudorandom key using HKDF-Extract() function.
* Uses HMAC-HASH() function.
*
* @param hkdf_alg The HKDF algorith to use (e.g. ed25519).
* @param hkdf_alg The HKDF algorithm to use (e.g. ed25519).
* @param salt The optional salt value to use.
* @param ikm The Input Keying material.
* @param hkdf_extract The output pseudorandom key
@@ -102,8 +102,8 @@ int oscore_hkdf_extract(cose_hkdf_alg_t hkdf_alg,
* Derive the key using HKDF-Expand() function.
* Uses HMAC-HASH() function.
*
* @param hkdf_alg The HKDF algorith to use (e.g. ed25519).
* @param prk Usually ouptut from HKDF-Extract().
* @param hkdf_alg The HKDF algorithm to use (e.g. ed25519).
* @param prk Usually output from HKDF-Extract().
* @param info Optional context / application specific information.
* @param info_len Length of info (can be 0).
* @param okm Output key material.
@@ -122,7 +122,7 @@ int oscore_hkdf_expand(cose_hkdf_alg_t hkdf_alg,
* Derive the key using HKDF() function.
* Invokes the HKDF-Extract() and HKDF-Expand() functions.
*
* @param hkdf_alg The HKDF algorith to use (e.g. ed25519).
* @param hkdf_alg The HKDF algorithm to use (e.g. ed25519).
* @param salt The optional salt value to use.
* @param ikm The Input Keying material.
* @param info Optional context / application specific information.