[−][src]Crate libcoap_sys
Structs
UT_hash_bucket | |
UT_hash_handle | |
UT_hash_table | |
__BindgenBitfieldUnit | |
__IncompleteArrayField | |
__fsid_t | |
__locale_data | |
__locale_struct | |
__pthread_cond_s | |
__pthread_cond_s__bindgen_ty_1__bindgen_ty_1 | |
__pthread_cond_s__bindgen_ty_2__bindgen_ty_1 | |
__pthread_internal_list | |
__pthread_mutex_s | |
__pthread_rwlock_arch_t | |
__sigset_t | |
cmsghdr | |
coap_addr_tuple_t | |
coap_address_t | multi-purpose address abstraction |
coap_async_state_t | @defgroup coap_async Asynchronous Messaging @{ Structure for managing asynchronous state of CoAP resources. A coap_resource_t object holds a list of coap_async_state_t objects that can be used to generate a separate response in case a result of an operation cannot be delivered in time, or the resource has been explicitly subscribed to with the option @c observe. |
coap_attr_t | |
coap_binary_t | Coap binary data definition |
coap_block_t | Structure of Block options. |
coap_context_t | The CoAP stack's global state is stored in a coap_context_t object. |
coap_dtls_key_t | The structure that holds the PKI key information. |
coap_dtls_pki_t | The structure used for defining the PKI setup data to be used. |
coap_endpoint_t | |
coap_fixed_point_t | Abstraction of a fixed point number that can be used where necessary instead of a float. 1,000 fractional bits equals one integer |
coap_opt_iterator_t | Iterator to run through PDU options. This object must be initialized with coap_option_iterator_init(). Call coap_option_next() to walk through the list of options until coap_option_next() returns @c NULL. |
coap_option | @deprecated Use coap_optlist_t instead. |
coap_option_t | Representation of CoAP options. |
coap_optlist_t | Representation of chained list of CoAP options to install. |
coap_packet_t | |
coap_pdu_t | structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload marker (0xff), then the payload if stored inline. Memory layout is: <---header--->|<---token---><---options--->0xff<---payload---> header is addressed with a negative offset to token, its maximum size is max_hdr_size. options starts at token + token_length payload starts at data, its length is used_size - (data - token) |
coap_pki_key_asn1_t | The structure that holds the PKI ASN.1 (DER) definitions. |
coap_pki_key_pem_t | The structure that holds the PKI PEM definitions. |
coap_queue_t | Queue entry |
coap_resource_t | |
coap_session_t | |
coap_socket_t | |
coap_str_const_t | Coap string data definition with const data |
coap_string_t | Coap string data definition |
coap_subscription_t | |
coap_tls_version_t | The structure used for returning the underlying (D)TLS library information. |
coap_uri_t | Representation of parsed URI. Components may be filled from a string with coap_split_uri() and can be used as input for option-creation functions. |
div_t | |
drand48_data | |
epoll_event | |
fd_set | |
group_filter | |
group_req | |
group_source_req | |
in6_addr | |
in_addr | |
in_pktinfo | |
iovec | |
ip_mreq | |
ip_mreq_source | |
ip_mreqn | |
ip_msfilter | |
ip_opts | |
ipv6_mreq | |
itimerspec | |
itimerval | |
ldiv_t | |
linger | |
lldiv_t | |
max_align_t | |
msghdr | |
osockaddr | |
random_data | |
sigevent | |
sockaddr | |
sockaddr_in | |
sockaddr_in6 | |
sockaddr_storage | |
timespec | |
timeval | |
timezone | |
tm |
Constants
Statics
__daylight | |
__timezone | |
__tzname | |
daylight | |
in6addr_any | |
in6addr_loopback | |
timezone | |
tzname |
Functions
_Exit⚠ | |
__assert⚠ | |
__assert_fail⚠ | |
__assert_perror_fail⚠ | |
__cmsg_nxthdr⚠ | |
__ctype_get_mb_cur_max⚠ | |
__stpcpy⚠ | |
__stpncpy⚠ | |
__strtok_r⚠ | |
a64l⚠ | |
abort⚠ | |
abs⚠ | |
accept⚠ | |
adjtime⚠ | |
aligned_alloc⚠ | |
alloca⚠ | |
asctime⚠ | |
asctime_r⚠ | |
at_quick_exit⚠ | |
atexit⚠ | |
atof⚠ | |
atoi⚠ | |
atol⚠ | |
atoll⚠ | |
bcmp⚠ | |
bcopy⚠ | |
bind⚠ | |
bindresvport⚠ | |
bindresvport6⚠ | |
bsearch⚠ | |
bzero⚠ | |
calloc⚠ | |
clearenv⚠ | |
clock⚠ | |
clock_getcpuclockid⚠ | |
clock_getres⚠ | |
clock_gettime⚠ | |
clock_nanosleep⚠ | |
clock_settime⚠ | |
coap_add_attr⚠ | Registers a new attribute with the given @p resource. As the attribute's coap_str_const_ fields will point to @p name and @p value the caller must ensure that these pointers are valid during the attribute's lifetime. |
coap_add_block⚠ | Adds the @p block_num block of size 1 << (@p block_szx + 4) from source @p data to @p pdu. |
coap_add_data⚠ | Adds given data to the pdu that is passed as first parameter. Note that the PDU's data is destroyed by coap_add_option(). coap_add_data() must be called only once per PDU, otherwise the result is undefined. |
coap_add_data_after⚠ | Adds given data to the pdu that is passed as first parameter but does not copyt it. Note that the PDU's data is destroyed by coap_add_option(). coap_add_data() must be have been called once for this PDU, otherwise the result is undefined. The actual data must be copied at the returned location. |
coap_add_data_blocked_response⚠ | Adds the appropriate part of @p data to the @p response pdu. If blocks are required, then the appropriate block will be added to the PDU and sent. Adds a ETAG option that is the hash of the entire data if the data is to be split into blocks Used by a GET request handler. |
coap_add_observer⚠ | Adds the specified peer as observer for @p resource. The subscription is identified by the given @p token. This function returns the registered subscription information if the @p observer has been added, or @c NULL on error. |
coap_add_option⚠ | Adds option of given type to pdu that is passed as first parameter. coap_add_option() destroys the PDU's data, so coap_add_data() must be called after all options have been added. As coap_add_token() destroys the options following the token, the token must be added before coap_add_option() is called. This function returns the number of bytes written or @c 0 on error. |
coap_add_option_later⚠ | Adds option of given type to pdu that is passed as first parameter, but does not write a value. It works like coap_add_option with respect to calling sequence (i.e. after token and before data). This function returns a memory address to which the option data has to be written before the PDU can be sent, or @c NULL on error. |
coap_add_optlist_pdu⚠ | The current optlist of @p optlist_chain is first sorted (as per RFC7272 ordering requirements) and then added to the @p pdu. |
coap_add_resource⚠ | Registers the given @p resource for @p context. The resource must have been created by coap_resource_init() or coap_resource_unknown_init(), the storage allocated for the resource will be released by coap_delete_resource(). |
coap_add_token⚠ | Adds token of length @p len to @p pdu. Adding the token destroys any following contents of the pdu. Hence options and data must be added after coap_add_token() has been called. In @p pdu, length is set to @p len + @c 4, and max_delta is set to @c 0. This function returns @c 0 on error or a value greater than zero on success. |
coap_address_equals⚠ | Compares given address objects @p a and @p b. This function returns @c 1 if addresses are equal, @c 0 otherwise. The parameters @p a and @p b must not be @c NULL; |
coap_address_init⚠ | Resets the given coap_address_t object @p addr to its default values. In particular, the member size must be initialized to the available size for storing addresses. |
coap_adjust_basetime⚠ | Set sendqueue_basetime in the given context object @p ctx to @p now. This function returns the number of elements in the queue head that have timed out. |
coap_calc_timeout⚠ | Calculates the initial timeout based on the session CoAP transmission parameters 'ack_timeout', 'ack_random_factor', and COAP_TICKS_PER_SECOND. The calculation requires 'ack_timeout' and 'ack_random_factor' to be in Qx.FRAC_BITS fixed point notation, whereas the passed parameter @p r is interpreted as the fractional part of a Q0.MAX_BITS random value. |
coap_can_exit⚠ | Returns 1 if there are no messages to send or to dispatch in the context's queues. |
coap_cancel_all_messages⚠ | Cancels all outstanding messages for session @p session that have the specified token. |
coap_cancel_session_messages⚠ | Cancels all outstanding messages for session @p session. |
coap_check_notify⚠ | Checks for all known resources, if they are dirty and notifies subscribed observers. |
coap_check_option⚠ | Retrieves the first option of type @p type from @p pdu. @p oi must point to a coap_opt_iterator_t object that will be initialized by this function to filter only options with code @p type. This function returns the first option with this type, or @c NULL if not found. |
coap_cleanup⚠ | |
coap_clear_event_handler⚠ | Clears the event handler registered with @p context. |
coap_clock_init⚠ | Initializes the internal clock. |
coap_clone_uri⚠ | Clones the specified coap_uri_t object. Thie function allocates sufficient memory to hold the coap_uri_t structure and its contents. The object must be released with coap_free(). |
coap_context_get_coap_fd⚠ | Get the libcoap internal file descriptor for using in an application's select() or returned as an event in an application's epoll_wait() call. |
coap_context_set_keepalive⚠ | Set the context keepalive timer for sessions. A keepalive message will be sent after if a session has been inactive, i.e. no packet sent or received, for the given number of seconds. For unreliable protocols, a CoAP Empty message will be sent. If a CoAP RST is not received, the CoAP Empty messages will get resent based on the Confirmable retry parameters until there is a failure timeout, at which point the session will be considered as disconnected. For reliable protocols, a CoAP PING message will be sent. If a CoAP PONG has not been received before the next PING is due to be sent, the session will be considered as disconnected. |
coap_context_set_pki⚠ | Set the context's default PKI information for a server. |
coap_context_set_pki_root_cas⚠ | Set the context's default Root CA information for a client or server. |
coap_context_set_psk⚠ | Set the context's default PSK hint and/or key for a server. |
coap_debug_send_packet⚠ | Check to see whether a packet should be sent or not. |
coap_debug_set_packet_loss⚠ | Set the packet loss level for testing. This can be in one of two forms. |
coap_decode_var_bytes⚠ | Decodes multiple-length byte sequences. @p buf points to an input byte sequence of length @p length. Returns the up to 4 byte decoded value. |
coap_decode_var_bytes8⚠ | Decodes multiple-length byte sequences. @p buf points to an input byte sequence of length @p length. Returns the up to 8 byte decoded value. |
coap_delete_all⚠ | Removes all items from given @p queue and frees the allocated storage. |
coap_delete_all_resources⚠ | Deletes all resources from given @p context and frees their storage. |
coap_delete_attr⚠ | Deletes an attribute. Note: This is for internal use only, as it is not deleted from its chain. |
coap_delete_node⚠ | Destroys specified @p node. |
coap_delete_observer⚠ | Removes any subscription for @p observer from @p resource and releases the allocated storage. The result is @c 1 if an observation relationship with @p observer and @p token existed, @c 0 otherwise. |
coap_delete_observers⚠ | Removes any subscription for @p session and releases the allocated storage. |
coap_delete_optlist⚠ | Removes all entries from the @p optlist_chain, freeing off their memory usage. |
coap_delete_pdu⚠ | Dispose of an CoAP PDU and frees associated storage. Not that in general you should not call this function directly. When a PDU is sent with coap_send(), coap_delete_pdu() will be called automatically for you. |
coap_delete_resource⚠ | Deletes a resource identified by @p resource. The storage allocated for that resource is freed, and removed from the context. |
coap_delete_str_const⚠ | Deletes the given const string and releases any memory allocated. |
coap_delete_string⚠ | Deletes the given string and releases any memory allocated. |
coap_dispatch⚠ | Dispatches the PDUs from the receive queue in given context. |
coap_dtls_context_check_keys_enabled⚠ | Check whether one of the coap_dtls_context_set_{psk|pki}() functions have been called. |
coap_dtls_context_set_pki⚠ | Set the DTLS context's default server PKI information. This does the PKI specifics following coap_dtls_new_context(). If @p COAP_DTLS_ROLE_SERVER, then the information will get put into the TLS library's context (from which sessions are derived). If @p COAP_DTLS_ROLE_CLIENT, then the information will get put into the TLS library's session. |
coap_dtls_context_set_pki_root_cas⚠ | Set the dtls context's default Root CA information for a client or server. |
coap_dtls_context_set_psk⚠ | Set the DTLS context's default PSK information. This does the PSK specifics following coap_dtls_new_context(). If @p COAP_DTLS_ROLE_SERVER, then identity hint will also get set. If @p COAP_DTLS_ROLE_SERVER, then the information will get put into the TLS library's context (from which sessions are derived). If @p COAP_DTLS_ROLE_CLIENT, then the information will get put into the TLS library's session. |
coap_dtls_free_context⚠ | Releases the storage allocated for @p dtls_context. |
coap_dtls_free_session⚠ | Terminates the DTLS session (may send an ALERT if necessary) then frees the underlying TLS library object containing security parameters for the session. |
coap_dtls_get_context_timeout⚠ | Do all pending retransmits and get next timeout |
coap_dtls_get_log_level⚠ | @ingroup logging Get the current (D)TLS logging. |
coap_dtls_get_overhead⚠ | Get DTLS overhead over cleartext PDUs. |
coap_dtls_get_timeout⚠ | Get next timeout for this session. |
coap_dtls_handle_timeout⚠ | Handle a DTLS timeout expiration. |
coap_dtls_hello⚠ | Handling client HELLO messages from a new candiate peer. Note that session->tls is empty. |
coap_dtls_is_context_timeout⚠ | Check if timeout is handled per CoAP session or per CoAP context. |
coap_dtls_is_supported⚠ | Check whether DTLS is available. |
coap_dtls_new_client_session⚠ | Create a new client-side session. This should send a HELLO to the server. |
coap_dtls_new_context⚠ | Creates a new DTLS context for the given @p coap_context. This function returns a pointer to a new DTLS context object or @c NULL on error. |
coap_dtls_new_server_session⚠ | Create a new DTLS server-side session. Called after coap_dtls_hello() has returned @c 1, signalling that a validated HELLO was received from a client. This should send a HELLO to the server. |
coap_dtls_receive⚠ | Handling incoming data from a DTLS peer. |
coap_dtls_send⚠ | Send data to a DTLS peer. |
coap_dtls_session_update_mtu⚠ | Notify of a change in the CoAP session's MTU, for example after a PMTU update. |
coap_dtls_set_log_level⚠ | @ingroup logging Sets the (D)TLS logging level to the specified @p level. Note: coap_log_level() will influence output if at a specified level. |
coap_dtls_startup⚠ | Initialize the underlying (D)TLS Library layer. |
coap_encode_var_safe⚠ | Encodes multiple-length byte sequences. @p buf points to an output buffer of sufficient length to store the encoded bytes. @p value is the 4 byte value to encode. Returns the number of bytes used to encode @p value or 0 on error. |
coap_encode_var_safe8⚠ | Encodes multiple-length byte sequences. @p buf points to an output buffer of sufficient length to store the encoded bytes. @p value is the 8 byte value to encode. Returns the number of bytes used to encode @p value or 0 on error. |
coap_endpoint_get_session⚠ | Lookup the server session for the packet received on an endpoint, or create a new one. |
coap_endpoint_set_default_mtu⚠ | Set the endpoint's default MTU. This is the maximum message size that can be sent, excluding IP and UDP overhead. |
coap_endpoint_str⚠ | @ingroup logging Get endpoint description. |
coap_epoll_ctl_mod⚠ | |
coap_find_async⚠ | Retrieves the object identified by @p id from the list of asynchronous transactions that are registered with @p context. This function returns a pointer to that object or @c NULL if not found. |
coap_find_attr⚠ | Returns @p resource's coap_attr_t object with given @p name if found, @c NULL otherwise. |
coap_find_observer⚠ | Returns a subscription object for given @p peer. |
coap_find_transaction⚠ | Retrieves transaction from the queue. |
coap_fls⚠ | |
coap_flsll⚠ | |
coap_free_async⚠ | Releases the memory that was allocated by coap_async_state_init() for the object @p s. The registered application data will be released automatically if COAP_ASYNC_RELEASE_DATA is set. |
coap_free_context⚠ | CoAP stack context must be released with coap_free_context(). This function clears all entries from the receive queue and send queue and deletes the resources that have been registered with @p context, and frees the attached endpoints. |
coap_free_endpoint⚠ | |
coap_free_type⚠ | Releases the memory that was allocated by coap_malloc_type(). The type tag @p type must be the same that was used for allocating the object pointed to by @p . |
coap_get_app_data⚠ | Returns any application-specific data that has been stored with @p context using the function coap_set_app_data(). This function will return @c NULL if no data has been stored. |
coap_get_block⚠ | Initializes @p block from @p pdu. @p type must be either COAP_OPTION_BLOCK1 or COAP_OPTION_BLOCK2. When option @p type was found in @p pdu, @p block is initialized with values from this option and the function returns the value @c 1. Otherwise, @c 0 is returned. |
coap_get_data⚠ | Retrieves the length and data pointer of specified PDU. Returns 0 on error or 1 if *len and *data have correct values. Note that these values are destroyed with the pdu. |
coap_get_log_level⚠ | Get the current logging level. |
coap_get_query⚠ | Extract query string from request PDU according to escape rules in 6.5.8. @param request Request PDU. @return Reconstructed and escaped query string part. |
coap_get_resource_from_uri_path⚠ | Returns the resource identified by the unique string @p uri_path. If no resource was found, this function returns @c NULL. |
coap_get_tls_library_version⚠ | Determine the type and version of the underlying (D)TLS library. |
coap_get_uri_path⚠ | Extract uri_path string from request PDU @param request Request PDU. @return Reconstructed and escaped uri path string part. |
coap_handle_dgram⚠ | Parses and interprets a CoAP datagram with context @p ctx. This function returns @c 0 if the datagram was handled, or a value less than zero on error. |
coap_handle_event⚠ | Invokes the event handler of @p context for the given @p event and @p data. |
coap_handle_failed_notify⚠ | |
coap_insert_node⚠ | Adds @p node to given @p queue, ordered by variable t in @p node. |
coap_insert_optlist⚠ | Adds @p optlist to the given @p optlist_chain. The optlist_chain variable be set to NULL before the initial call to coap_insert_optlist(). The optlist_chain will need to be deleted using coap_delete_optlist() when no longer required. |
coap_io_do_events⚠ | Process all the epoll events |
coap_io_prepare_epoll⚠ | Any now timed out delayed packet is transmitted, along with any packets associated with requested observable response. |
coap_is_mcast⚠ | Checks if given address @p a denotes a multicast address. This function returns @c 1 if @p a is multicast, @c 0 otherwise. |
coap_join_mcast_group⚠ | Function interface for joining a multicast group for listening |
coap_log_impl⚠ | |
coap_make_str_const⚠ | Take the specified string and create a coap_str_const_t * |
coap_malloc_endpoint⚠ | |
coap_malloc_type⚠ | Allocates a chunk of @p size bytes and returns a pointer to the newly allocated memory. The @p type is used to select the appropriate storage container on constrained devices. The storage allocated by coap_malloc_type() must be released with coap_free_type(). |
coap_memory_init⚠ | Initializes libcoap's memory management. This function must be called once before coap_malloc() can be used on constrained devices. |
coap_mfree_endpoint⚠ | |
coap_network_read⚠ | Function interface for reading data. This function returns the number of bytes that have been read, or a value less than zero on error. In case of an error, @p *packet is set to NULL. |
coap_network_send⚠ | Function interface for data transmission. This function returns the number of bytes that have been transmitted, or a value less than zero on error. |
coap_new_client_session⚠ | Creates a new client session to the designated server. @param ctx The CoAP context. @param local_if Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected. @param server The server's address. If the port number is zero, the default port for the protocol will be used. @param proto Protocol. |
coap_new_client_session_pki⚠ | Creates a new client session to the designated server with PKI credentials @param ctx The CoAP context. @param local_if Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected. @param server The server's address. If the port number is zero, the default port for the protocol will be used. @param proto CoAP Protocol. @param setup_data PKI parameters. |
coap_new_client_session_psk⚠ | Creates a new client session to the designated server with PSK credentials @param ctx The CoAP context. @param local_if Address of local interface. It is recommended to use NULL to let the operating system choose a suitable local interface. If an address is specified, the port number should be zero, which means that a free port is automatically selected. @param server The server's address. If the port number is zero, the default port for the protocol will be used. @param proto Protocol. @param identity PSK client identity @param key PSK shared key @param key_len PSK shared key length |
coap_new_context⚠ | Creates a new coap_context_t object that will hold the CoAP stack status. |
coap_new_endpoint⚠ | Create a new endpoint for communicating with peers. |
coap_new_error_response⚠ | Creates a new ACK PDU with specified error @p code. The options specified by the filter expression @p opts will be copied from the original request contained in @p request. Unless @c SHORT_ERROR_RESPONSE was defined at build time, the textual reason phrase for @p code will be added as payload, with Content-Type @c 0. This function returns a pointer to the new response message, or @c NULL on error. The storage allocated for the new message must be relased with coap_free(). |
coap_new_node⚠ | Creates a new node suitable for adding to the CoAP sendqueue. |
coap_new_optlist⚠ | Create a new optlist entry. |
coap_new_pdu⚠ | Creates a new CoAP PDU. |
coap_new_server_session⚠ | Creates a new server session for the specified endpoint. @param ctx The CoAP context. @param ep An endpoint where an incoming connection request is pending. |
coap_new_str_const⚠ | Returns a new const string object with at least size+1 bytes storage allocated, and the provided data copied into the string object. The string must be released using coap_delete_str_const(). |
coap_new_string⚠ | Returns a new string object with at least size+1 bytes storage allocated. The string must be released using coap_delete_string(). |
coap_new_uri⚠ | Creates a new coap_uri_t object from the specified URI. Returns the new object or NULL on error. The memory allocated by the new coap_uri_t must be released using coap_free(). |
coap_opt_block_num⚠ | Returns the value of field @c num in the given block option @p block_opt. |
coap_opt_delta⚠ | Decodes the delta value of the next option. This function returns the number of bytes read or @c 0 on error. The caller of this function must ensure that it does not read over the boundaries of @p opt (e.g. by calling coap_opt_check_delta(). |
coap_opt_encode⚠ | Encodes option with given @p delta into @p opt. This function returns the number of bytes written to @p opt or @c 0 on error. This happens especially when @p opt does not provide sufficient space to store the option value, delta, and option jumps when required. |
coap_opt_encode_size⚠ | Compute storage bytes needed for an option with given @p delta and @p length |
coap_opt_length⚠ | Returns the length of the given option. @p opt must point to an option jump or the beginning of the option. This function returns @c 0 when @p opt is not an option or the actual length of @p opt (which can be @c 0 as well). |
coap_opt_parse⚠ | Parses the option pointed to by @p opt into @p result. This function returns the number of bytes that have been parsed, or @c 0 on error. An error is signaled when illegal delta or length values are encountered or when option parsing would result in reading past the option (i.e. beyond opt + length). |
coap_opt_setheader⚠ | Encodes the given delta and length values into @p opt. This function returns the number of bytes that were required to encode @p delta and @p length or @c 0 on error. Note that the result indicates by how many bytes @p opt must be advanced to encode the option value. |
coap_opt_size⚠ | Returns the size of the given option, taking into account a possible option jump. |
coap_opt_value⚠ | Returns a pointer to the value of the given option. @p opt must point to an option jump or the beginning of the option. This function returns @c NULL if @p opt is not a valid option. |
coap_option_check_critical⚠ | Verifies that @p pdu contains no unknown critical options. Options must be registered at @p ctx, using the function coap_register_option(). A basic set of options is registered automatically by coap_new_context(). This function returns @c 1 if @p pdu is ok, @c 0 otherwise. The given filter object @p unknown will be updated with the unknown options. As only @c COAP_MAX_OPT options can be signalled this way, remaining options must be examined manually. |
coap_option_filter_get⚠ | Checks if @p type is contained in @p filter. This function returns @c 1 if found, @c 0 if not, or @c -1 on error (i.e. when the given type does not fit in the filter). |
coap_option_filter_set⚠ | Sets the corresponding entry for @p type in @p filter. This function returns @c 1 if bit was set or @c 0 on error (i.e. when the given type does not fit in the filter). |
coap_option_filter_unset⚠ | Clears the corresponding entry for @p type in @p filter. This function returns @c 1 if bit was set or @c 0 on error (i.e. when the given type does not fit in the filter). |
coap_option_iterator_init⚠ | Initializes the given option iterator @p oi to point to the beginning of the @p pdu's option list. This function returns @p oi on success, @c NULL otherwise (i.e. when no options exist). Note that a length check on the option list must be performed before coap_option_iterator_init() is called. |
coap_option_next⚠ | Updates the iterator @p oi to point to the next option. This function returns a pointer to that option or @c NULL if no more options exist. The contents of @p oi will be updated. In particular, @c oi->n specifies the current option's ordinal number (counted from @c 1), @c oi->type is the option's type code, and @c oi->option points to the beginning of the current option itself. When advanced past the last option, @c oi->option will be @c NULL. |
coap_package_name⚠ | Get the library package name. |
coap_package_version⚠ | Get the library package version. |
coap_packet_get_memmapped⚠ | Given a packet, set msg and msg_len to an address and length of the packet's data in memory. |
coap_pdu_clear⚠ | Clears any contents from @p pdu and resets @c used_size, and @c data pointers. @c max_size is set to @p size, any other field is set to @c 0. Note that @p pdu must be a valid pointer to a coap_pdu_t object created e.g. by coap_pdu_init(). |
coap_pdu_encode_header⚠ | Compose the protocol specific header for the specified PDU. @param pdu A newly composed PDU. @param proto The target wire protocol. @return Number of header bytes prepended before pdu->token or 0 on error. |
coap_pdu_init⚠ | Creates a new CoAP PDU with at least enough storage space for the given @p size maximum message size. The function returns a pointer to the node coap_pdu_t object on success, or @c NULL on error. The storage allocated for the result must be released with coap_delete_pdu() if coap_send() is not called. |
coap_pdu_parse⚠ | Parses @p data into the CoAP PDU structure given in @p result. The target pdu must be large enough to This function returns @c 0 on error or a number greater than zero on success. |
coap_pdu_parse_header⚠ | Decode the protocol specific header for the specified PDU. @param pdu A newly received PDU. @param proto The target wire protocol. @return 1 for success or 0 on error. |
coap_pdu_parse_header_size⚠ | Interprets @p data to determine the number of bytes in the header. This function returns @c 0 on error or a number greater than zero on success. |
coap_pdu_parse_opt⚠ | Verify consistency in the given CoAP PDU structure and locate the data. This function returns @c 0 on error or a number greater than zero on success. This function only parses the token and options, up to the payload start marker. |
coap_pdu_parse_size⚠ | Parses @p data to extract the message size. @p length must be at least coap_pdu_parse_header_size(proto, data). This function returns @c 0 on error or a number greater than zero on success. |
coap_pdu_resize⚠ | Dynamically grows the size of @p pdu to @p new_size. The new size must not exceed the PDU's configure maximum size. On success, this function returns 1, otherwise 0. |
coap_peek_next⚠ | Returns the next pdu to send without removing from sendqeue. |
coap_pop_next⚠ | Returns the next pdu to send and removes it from the sendqeue. |
coap_print_addr⚠ | Print the address into the defined buffer. |
coap_print_link⚠ | Writes a description of this resource in link-format to given text buffer. @p len must be initialized to the maximum length of @p buf and will be set to the number of characters actually written if successful. This function returns @c 1 on success or @c 0 on error. |
coap_print_wellknown⚠ | @} |
coap_read⚠ | For applications with their own message loop, reads all data from the network. |
coap_register_async⚠ | Allocates a new coap_async_state_t object and fills its fields according to the given @p request. The @p flags are used to control generation of empty ACK responses to stop retransmissions and to release registered @p data when the resource is deleted by coap_free_async(). This function returns a pointer to the registered coap_async_t object or @c NULL on error. Note that this function will return @c NULL in case that an object with the same identifier is already registered. |
coap_register_event_handler⚠ | Registers the function @p hnd as callback for events from the given CoAP context @p context. Any event handler that has previously been registered with @p context will be overwritten by this operation. |
coap_register_handler⚠ | Registers the specified @p handler as message handler for the request type @p method |
coap_remove_async⚠ | Removes the state object identified by @p id from @p context. The removed object is returned in @p s, if found. Otherwise, @p s is undefined. This function returns @c 1 if the object was removed, @c 0 otherwise. Note that the storage allocated for the stored object is not released by this functions. You will have to call coap_free_async() to do so. |
coap_remove_from_queue⚠ | This function removes the element with given @p id from the list given list. If @p id was found, @p node is updated to point to the removed element. Note that the storage allocated by @p node is @b not released. The caller must do this manually using coap_delete_node(). This function returns @c 1 if the element with id @p id was found, @c 0 otherwise. For a return value of @c 0, the contents of @p node is undefined. |
coap_resource_init⚠ | Creates a new resource object and initializes the link field to the string @p uri_path. This function returns the new coap_resource_t object. |
coap_resource_notify_observers⚠ | Initiate the sending of an Observe packet for all observers of @p resource, optionally matching @p query if not NULL |
coap_resource_set_dirty⚠ | @deprecated use coap_resource_notify_observers() instead. |
coap_resource_unknown_init⚠ | Creates a new resource object for the unknown resource handler with support for PUT. |
coap_response_phrase⚠ | Returns a human-readable response phrase for the specified CoAP response @p code. This function returns @c NULL if not found. |
coap_retransmit⚠ | Handles retransmissions of confirmable messages |
coap_run_once⚠ | The main message processing loop. |
coap_send⚠ | Sends a CoAP message to given peer. The memory that is allocated by pdu will be released by coap_send(). The caller must not use the pdu after calling coap_send(). |
coap_send_ack⚠ | Sends an ACK message with code @c 0 for the specified @p request to @p dst. This function returns the corresponding transaction id if the message was sent or @c COAP_INVALID_TID on error. |
coap_send_error⚠ | Sends an error response with code @p code for request @p request to @p dst. @p opts will be passed to coap_new_error_response() to copy marked options from the request. This function returns the transaction id if the message was sent, or @c COAP_INVALID_TID otherwise. |
coap_send_message_type⚠ | Helper funktion to create and send a message with @p type (usually ACK or RST). This function returns @c COAP_INVALID_TID when the message was not sent, a valid transaction id otherwise. |
coap_session_connected⚠ | Notify session that it has just connected or reconnected. |
coap_session_delay_pdu⚠ | |
coap_session_disconnected⚠ | Notify session that it has failed. |
coap_session_free⚠ | |
coap_session_get_ack_random_factor⚠ | Get the CoAP ack randomize factor |
coap_session_get_ack_timeout⚠ | Get the CoAP initial ack response timeout before the next re-transmit |
coap_session_get_app_data⚠ | Returns any application-specific data that has been stored with @p session using the function coap_session_set_app_data(). This function will return @c NULL if no data has been stored. |
coap_session_get_by_peer⚠ | |
coap_session_get_max_transmit⚠ | Get the CoAP maximum retransmit before failure |
coap_session_max_pdu_size⚠ | Get maximum acceptable PDU size |
coap_session_mfree⚠ | |
coap_session_new_dtls_session⚠ | Create a new DTLS session for the @p session. Note: the @p session is released if no DTLS server session can be created. |
coap_session_reference⚠ | Increment reference counter on a session. |
coap_session_release⚠ | Decrement reference counter on a session. Note that the session may be deleted as a result and should not be used after this call. |
coap_session_send⚠ | Function interface for datagram data transmission. This function returns the number of bytes that have been transmitted, or a value less than zero on error. |
coap_session_send_csm⚠ | Notify session transport has just connected and CSM exchange can now start. |
coap_session_send_pdu⚠ | Send a pdu according to the session's protocol. This function returns the number of bytes that have been transmitted, or a value less than zero on error. |
coap_session_send_ping⚠ | Send a ping message for the session. @param session The CoAP session. |
coap_session_set_ack_random_factor⚠ | Set the CoAP ack randomize factor |
coap_session_set_ack_timeout⚠ | Set the CoAP initial ack response timeout before the next re-transmit |
coap_session_set_app_data⚠ | Stores @p data with the given session. This function overwrites any value that has previously been stored with @p session. |
coap_session_set_max_retransmit⚠ | Set the CoAP maximum retransmit count before failure |
coap_session_set_mtu⚠ | Set the session MTU. This is the maximum message size that can be sent, excluding IP and UDP overhead. |
coap_session_str⚠ | @ingroup logging Get session description. |
coap_session_write⚠ | Function interface for stream data transmission. This function returns the number of bytes that have been transmitted, or a value less than zero on error. The number of bytes written may be less than datalen because of congestion control. |
coap_set_app_data⚠ | Stores @p data with the given CoAP context. This function overwrites any value that has previously been stored with @p context. |
coap_set_event_handler⚠ | Registers the function @p hnd as callback for events from the given CoAP context @p context. Any event handler that has previously been registered with @p context will be overwritten by this operation. |
coap_set_log_handler⚠ | Add a custom log callback handler. |
coap_set_log_level⚠ | Sets the log level to the specified value. |
coap_set_show_pdu_output⚠ | Defines the output mode for the coap_show_pdu() function. |
coap_show_pdu⚠ | Display the contents of the specified @p pdu. Note: The output method of coap_show_pdu() is dependent on the setting of coap_set_show_pdu_output(). |
coap_show_tls_version⚠ | Display the current (D)TLS library linked with and built for version. |
coap_socket_accept_tcp⚠ | |
coap_socket_bind_tcp⚠ | |
coap_socket_bind_udp⚠ | |
coap_socket_close⚠ | |
coap_socket_connect_tcp1⚠ | |
coap_socket_connect_tcp2⚠ | |
coap_socket_connect_udp⚠ | |
coap_socket_read⚠ | |
coap_socket_send⚠ | |
coap_socket_strerror⚠ | |
coap_socket_write⚠ | |
coap_split_path⚠ | Splits the given URI path into segments. Each segment is preceded by an option pseudo-header with delta-value 0 and the actual length of the respective segment after percent-decoding. |
coap_split_query⚠ | Splits the given URI query into segments. Each segment is preceded by an option pseudo-header with delta-value 0 and the actual length of the respective query term. |
coap_split_uri⚠ | Parses a given string into URI components. The identified syntactic components are stored in the result parameter @p uri. Optional URI components that are not specified will be set to { 0, 0 }, except for the port which is set to @c COAP_DEFAULT_PORT. This function returns @p 0 if parsing succeeded, a value less than zero otherwise. |
coap_startup⚠ | |
coap_string_tls_version⚠ | Build a string containing the current (D)TLS library linked with and built for version. |
coap_ticks⚠ | Sets @p t to the internal time with COAP_TICKS_PER_SECOND resolution. |
coap_ticks_from_rt_us⚠ | Helper function that converts POSIX wallclock time in us to coap ticks. |
coap_ticks_to_rt⚠ | Helper function that converts coap ticks to wallclock time. On POSIX, this function returns the number of seconds since the epoch. On other systems, it may be the calculated number of seconds since last reboot or so. |
coap_ticks_to_rt_us⚠ | Helper function that converts coap ticks to POSIX wallclock time in us. |
coap_tls_free_session⚠ | Terminates the TLS session (may send an ALERT if necessary) then frees the underlying TLS library object containing security parameters for the session. |
coap_tls_is_supported⚠ | Check whether TLS is available. |
coap_tls_new_client_session⚠ | Create a new TLS client-side session. |
coap_tls_new_server_session⚠ | Create a TLS new server-side session. |
coap_tls_read⚠ | Read some data from a TLS peer. |
coap_tls_write⚠ | Send data to a TLS peer, with implicit flush. |
coap_touch_observer⚠ | Marks an observer as alive. |
coap_wait_ack⚠ | |
coap_wellknown_response⚠ | Creates a new response for given @p request with the contents of @c .well-known/core. The result is NULL on error or a newly allocated PDU that must be either sent with coap_sent() or released by coap_delete_pdu(). |
coap_write⚠ | For applications with their own message loop, send all pending retransmits and return the list of sockets with events to wait for and the next timeout The application should call coap_read, then coap_write again when any condition below is true: |
coap_write_block_opt⚠ | Writes a block option of type @p type to message @p pdu. If the requested block size is too large to fit in @p pdu, it is reduced accordingly. An exception is made for the final block when less space is required. The actual length of the resource is specified in @p data_length. |
connect⚠ | |
ctime⚠ | |
ctime_r⚠ | |
difftime⚠ | |
div⚠ | |
drand48⚠ | |
drand48_r⚠ | |
dysize⚠ | |
ecvt⚠ | |
ecvt_r⚠ | |
erand48⚠ | |
erand48_r⚠ | |
exit⚠ | |
explicit_bzero⚠ | |
fcvt⚠ | |
fcvt_r⚠ | |
ffs⚠ | |
ffsl⚠ | |
ffsll⚠ | |
free⚠ | |
futimes⚠ | |
gcvt⚠ | |
getenv⚠ | |
getitimer⚠ | |
getloadavg⚠ | |
getpeername⚠ | |
getsockname⚠ | |
getsockopt⚠ | |
getsubopt⚠ | |
gettimeofday⚠ | |
gmtime⚠ | |
gmtime_r⚠ | |
gnu_dev_major⚠ | |
gnu_dev_makedev⚠ | |
gnu_dev_minor⚠ | |
htonl⚠ | |
htons⚠ | |
index⚠ | |
initstate⚠ | |
initstate_r⚠ | |
isfdtype⚠ | |
jrand48⚠ | |
jrand48_r⚠ | |
l64a⚠ | |
labs⚠ | |
lcong48⚠ | |
lcong48_r⚠ | |
ldiv⚠ | |
listen⚠ | |
llabs⚠ | |
lldiv⚠ | |
localtime⚠ | |
localtime_r⚠ | |
lrand48⚠ | |
lrand48_r⚠ | |
lutimes⚠ | |
malloc⚠ | |
mblen⚠ | |
mbstowcs⚠ | |
mbtowc⚠ | |
memccpy⚠ | |
memchr⚠ | |
memcmp⚠ | |
memcpy⚠ | |
memmove⚠ | |
memset⚠ | |
mkdtemp⚠ | |
mkstemp⚠ | |
mkstemps⚠ | |
mktemp⚠ | |
mktime⚠ | |
mrand48⚠ | |
mrand48_r⚠ | |
nanosleep⚠ | |
nrand48⚠ | |
nrand48_r⚠ | |
ntohl⚠ | |
ntohs⚠ | |
on_exit⚠ | |
posix_memalign⚠ | |
pselect⚠ | |
putenv⚠ | |
qecvt⚠ | |
qecvt_r⚠ | |
qfcvt⚠ | |
qfcvt_r⚠ | |
qgcvt⚠ | |
qsort⚠ | |
quick_exit⚠ | |
rand⚠ | |
rand_r⚠ | |
random⚠ | |
random_r⚠ | |
realloc⚠ | |
realpath⚠ | |
recv⚠ | |
recvfrom⚠ | |
recvmsg⚠ | |
rindex⚠ | |
rpmatch⚠ | |
seed48⚠ | |
seed48_r⚠ | |
select⚠ | |
send⚠ | |
sendmsg⚠ | |
sendto⚠ | |
setenv⚠ | |
setitimer⚠ | |
setsockopt⚠ | |
setstate⚠ | |
setstate_r⚠ | |
settimeofday⚠ | |
shutdown⚠ | |
sockatmark⚠ | |
socket⚠ | |
socketpair⚠ | |
srand⚠ | |
srand48⚠ | |
srand48_r⚠ | |
srandom⚠ | |
srandom_r⚠ | |
stime⚠ | |
stpcpy⚠ | |
stpncpy⚠ | |
strcasecmp⚠ | |
strcasecmp_l⚠ | |
strcat⚠ | |
strchr⚠ | |
strcmp⚠ | |
strcoll⚠ | |
strcoll_l⚠ | |
strcpy⚠ | |
strcspn⚠ | |
strdup⚠ | |
strerror⚠ | |
strerror_l⚠ | |
strerror_r⚠ | |
strftime⚠ | |
strftime_l⚠ | |
strlen⚠ | |
strncasecmp⚠ | |
strncasecmp_l⚠ | |
strncat⚠ | |
strncmp⚠ | |
strncpy⚠ | |
strndup⚠ | |
strnlen⚠ | |
strpbrk⚠ | |
strrchr⚠ | |
strsep⚠ | |
strsignal⚠ | |
strspn⚠ | |
strstr⚠ | |
strtod⚠ | |
strtof⚠ | |
strtok⚠ | |
strtok_r⚠ | |
strtol⚠ | |
strtold⚠ | |
strtoll⚠ | |
strtoq⚠ | |
strtoul⚠ | |
strtoull⚠ | |
strtouq⚠ | |
strxfrm⚠ | |
strxfrm_l⚠ | |
system⚠ | |
time⚠ | |
timegm⚠ | |
timelocal⚠ | |
timer_create⚠ | |
timer_delete⚠ | |
timer_getoverrun⚠ | |
timer_gettime⚠ | |
timer_settime⚠ | |
timespec_get⚠ | |
tzset⚠ | |
unsetenv⚠ | |
utimes⚠ | |
valloc⚠ | |
wcstombs⚠ | |
wctomb⚠ |
Type Definitions
_Float32 | |
_Float32x | |
_Float64 | |
_Float64x | |
__blkcnt64_t | |
__blkcnt_t | |
__blksize_t | |
__caddr_t | |
__clock_t | |
__clockid_t | |
__compar_fn_t | |
__daddr_t | |
__dev_t | |
__fd_mask | |
__fsblkcnt64_t | |
__fsblkcnt_t | |
__fsfilcnt64_t | |
__fsfilcnt_t | |
__fsword_t | |
__gid_t | |
__id_t | |
__ino64_t | |
__ino_t | |
__int8_t | |
__int16_t | |
__int32_t | |
__int64_t | |
__intmax_t | |
__intptr_t | |
__itimer_which | |
__itimer_which_t | |
__key_t | |
__locale_t | |
__loff_t | |
__mode_t | |
__nlink_t | |
__off64_t | |
__off_t | |
__pid_t | |
__pthread_list_t | |
__quad_t | |
__rlim64_t | |
__rlim_t | |
__sig_atomic_t | |
__socket_type | |
__socklen_t | |
__ssize_t | |
__suseconds_t | |
__syscall_slong_t | |
__syscall_ulong_t | |
__time_t | |
__timer_t | |
__timezone_ptr_t | |
__u_char | |
__u_int | |
__u_long | |
__u_quad_t | |
__u_short | |
__uid_t | |
__uint8_t | |
__uint16_t | |
__uint32_t | |
__uint64_t | |
__uintmax_t | |
__useconds_t | |
_bindgen_ty_1 | |
_bindgen_ty_2 | |
_bindgen_ty_3 | |
_bindgen_ty_4 | |
_bindgen_ty_5 | |
_bindgen_ty_6 | |
blkcnt_t | |
blksize_t | |
caddr_t | |
clock_t | |
clockid_t | |
coap_asn1_privatekey_type_t | The enum used for determining the provided PKI ASN.1 (DER) Private Key formats. |
coap_dtls_cn_callback_t | CN Validation call-back that can be set up by coap_context_set_pki(). Invoked when libcoap has done the validation checks at the TLS level, but the application needs to check that the CN is allowed. CN is the SubjectAltName in the cert, if not present, then the leftmost Common Name (CN) component of the subject name. |
coap_dtls_role_t | |
coap_dtls_security_setup_t | Additional Security setup handler that can be set up by coap_context_set_pki(). Invoked when libcoap has done the validation checks at the TLS level, but the application needs to do some additional checks/changes/updates. |
coap_dtls_sni_callback_t | Server Name Indication (SNI) Validation call-back that can be set up by coap_context_set_pki(). Invoked if the SNI is not previously seen and prior to sending a certificate set back to the client so that the appropriate certificate set can be used based on the requesting SNI. |
coap_event_handler_t | Type for event handler functions that can be registered with a CoAP context using the unction coap_set_event_handler(). When called by the library, the first argument will be the coap_context_t object where the handler function has been registered. The second argument is the event type that may be complemented by event-specific data passed as the third argument. |
coap_event_t | Scalar type to represent different events, e.g. DTLS events or retransmission timeouts. |
coap_fd_t | |
coap_log_handler_t | Logging call-back handler definition. |
coap_log_t | Pre-defined log levels akin to what is used in \b syslog with LOG_CIPHERS added. |
coap_memory_tag_t | Type specifiers for coap_malloc_type(). Memory objects can be typed to facilitate arrays of type objects to be used instead of dynamic memory management on constrained devices. |
coap_method_handler_t | Definition of message handler function (@sa coap_resource_t). |
coap_nack_handler_t | Negative Acknowedge handler that is used as call-back in coap_context_t. |
coap_nack_reason_t | |
coap_opt_filter_t | Fixed-size vector we use for option filtering. It is large enough to hold COAP_OPT_FILTER_SHORT entries with an option number between 0 and 255, and COAP_OPT_FILTER_LONG entries with an option number between 256 and 65535. Its internal structure is |
coap_opt_t | Use byte-oriented access methods here because sliding a complex struct coap_opt_t over the data buffer may cause bus error on certain platforms. |
coap_ping_handler_t | Recieved Ping handler that is used as call-back in coap_context_t. |
coap_pki_key_t | The enum used for determining the PKI key formats. |
coap_pong_handler_t | Recieved Pong handler that is used as call-back in coap_context_t. |
coap_print_status_t | Status word to encode the result of conditional print or copy operations such as coap_print_link(). The lower 28 bits of coap_print_status_t are used to encode the number of characters that has actually been printed, bits 28 to 31 encode the status. When COAP_PRINT_STATUS_ERROR is set, an error occurred during output. In this case, the other bits are undefined. COAP_PRINT_STATUS_TRUNC indicates that the output is truncated, i.e. the printing would have exceeded the current buffer. |
coap_proto_t | |
coap_response_handler_t | Response handler that is used as call-back in coap_context_t. |
coap_session_state_t | |
coap_session_type_t | |
coap_socket_flags_t | |
coap_tick_diff_t | This data type is used to represent the difference between two clock_tick_t values. This data type must have the same size in memory as coap_tick_t to allow wrapping. |
coap_tick_t | This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution. |
coap_tid_t | coap_tid_t is used to store CoAP transaction id, i.e. a hash value built from the remote transport address and the message id of a CoAP PDU. Valid transaction ids are greater or equal zero. |
coap_time_t | CoAP time in seconds since epoch. |
coap_tls_library_t | |
coap_uri_scheme_t | The scheme specifiers. Secure schemes have an odd numeric value, others are even. |
daddr_t | |
dev_t | |
fd_mask | |
fsblkcnt_t | |
fsfilcnt_t | |
fsid_t | |
gid_t | |
id_t | |
idtype_t | |
in_addr_t | |
in_port_t | |
ino_t | |
int_fast8_t | |
int_fast16_t | |
int_fast32_t | |
int_fast64_t | |
int_least8_t | |
int_least16_t | |
int_least32_t | |
int_least64_t | |
intmax_t | |
key_t | |
locale_t | |
loff_t | |
mode_t | |
nlink_t | |
off_t | |
pid_t | |
pthread_key_t | |
pthread_once_t | |
pthread_spinlock_t | |
pthread_t | |
quad_t | |
register_t | |
sa_family_t | |
sigset_t | |
socklen_t | |
suseconds_t | |
time_t | |
timer_t | |
u_char | |
u_int | |
u_int8_t | |
u_int16_t | |
u_int32_t | |
u_int64_t | |
u_long | |
u_quad_t | |
u_short | |
uid_t | |
uint | |
uint_fast8_t | |
uint_fast16_t | |
uint_fast32_t | |
uint_fast64_t | |
uint_least8_t | |
uint_least16_t | |
uint_least32_t | |
uint_least64_t | |
uintmax_t | |
ulong | |
ushort | |
wchar_t |