Need to support
"RFC7252: 5.8.3. PUT
If no resource exists, then the server MAY create a new resource with that
URI, resulting in a 2.01 (Created) Response Code."
Add in the function definition for the coap_add_resource_unknown().
Add in 'is_unknown' flag into coap_resource_t.
Make the resource uri_path be the hash lookup key, not the old hashed key, to
stop hash lookup clashes.
*API Change* Update coap_delete_resource() to not use the old hashed key.
Remove coap_get_resource_from_key() function and replace it with
coap_get_resource_from_uri_path().
Make the coap_resource_set_mode() more robust against bad parameters.
Remove #ifdef COAP_RESOURCES_NOHASH logic as no longer required
Needed to handle
"RFC7252: 5.8.3. PUT
If no resource exists, then the server MAY create a new resource with that
URI, resulting in a 2.01 (Created) Response Code."
Needed for support of PUT requests to an unknown resource.
Remove structure coap_mid_cache_t as it is not used and refers to the now
obsolete coap_key_t.
Include session as one of the parameters to coap_calc_timeout() as it is now
per session, which is renamed from calc_timeout() as it is now a public
function.
Support is required (RFC7252: 4.8.1. Changing the Parameters) to support
changing max_retransmit, ack_timeout and ack_random_factor values per
session instead of just using the default values.
Define struct coap_fixed_point_t to handle fixed point parameters
Added functions
coap_session_set_max_retransmit()
coap_session_set_ack_timeout()
coap_session_set_ack_random_factor()
coap_session_get_max_transmit()
coap_session_get_ack_timeout()
coap_session_get_ack_random_factor()
'cc Rate Control' moved from net.c into coap_session.h and updated to use
coap_fixed_point_t values where appropriate.
This bugfix allows clients to send datagrams to IP multicast groups.
After introducing the concept of client sessions, datagram sockets
have been connected to their remote peer in coap_socket_connect_udp().
As this operation fails for multicast addresses, sending to multicast
groups was not possible anymore.
coap_socket_connect_udp() now checks whether the given server address
is a multicast address. If this is the case, connect() is not called
and the flag COAP_SOCKET_MULTICAST is set in the coap_socket_t
structure while COAP_SOCKET_CONNECTED is cleared.
The flag COAP_SOCKET_CONNECTED is now set by coap_socket_connect_udp()
and coap_socket_connect_tcp1().
coap_read_session() now allows reading from sockets that have either
the flag COAP_SOCKET_CONNECTED or COAP_SOCKET_MULTICAST set.
Update functions appropriately.
Move coap_new_client_session_pki() back into coap_session.h (its correct place)
Add in enum coap_asn1_privatekey_type_t
If the application needs to see CoAP ping requests or CoAP TCP pong responses
then there needs to be a handler that can be set up that is called
appropriately.
A new function coap_get_tls_library_version() that returns a pointer to a
coap_tls_version_t structure that contains both the TLS library type libcoap
was compiled against as well as the current TLS library version.
The value of the observe option is kept for each resource rather than being global to the context.
The value of the observe option must wrap to be stay below 2^24.
The value of the observe option must be different from the initial value when a notification is sent.
Make coap_pdu-t independent of the header style.
Use C99 sized types when applicable.
Use transaction ids in host byte order in the library.
Make coap_pdu_t payload storage grow on demand.
Add parsing and encoding of PDUs with UDP or TCP style headers.
Adapt examples and unit tests to the new PDU format.
Remember the query string used during the observe request and pass it to the resource handler.
Support partial notification of observers based on the query string.
With gcc 7.2.0, new compiler warnings related to utlist.h and
uthash.h have occured. Several have been fixed by updating the
header files to the latest version from [1].
[1] https://github.com/troydhanson/uthash
The message id in the CoAP header is used for reliability when
transferring a CoAP PDU over a non-reliable transport protocol
such as UDP. For message de-duplication, it is useful to have
a monotonously increasing number space within a session. Therefore,
the context-global value has been moved to coap_session_t.
The function coap_new_message_id() now takes a coap_session_t
object as its argument.
Compact coap_address_t.
Use coap_queue_t for all queues.
OpenSSL warning for close alert should be info level.
Fix OpenSSL log level not working.
Use the application defined MTU in OpenSSL.
coap_log() optimization to avoid generating the log message text before testing the log level.
coap_can_exit() should check the new retransmit queues.
Fix retransmit time sometimes not correctly computed relative to sendqueue_basetime.
Add coap_write() API call for applications with their own main loop.