Rename struct str as struct coap_string_t and 'typedef coap_string_t str' for
backwards compatabilty with the intent of removing str at some point to
prevent potential name clashes when compiling application code.
Add in new coap_string_equal() function for consistent comparing of strings.
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
The library API lacks a way to store context for the handlers. A
LED-handler for example needs to now on which pin the specific LED
is connected in order to control it. Or a higher level API would like to save the
object pointer to the object responsible for the resource.
This change will introduce a void pointer for the user to save context.
He can then retrieve the context in the handler if needed.
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