Prevent multiple coap_new_client_session*() calls that are connecting to
the same server/port being bound to the same local ip/port.
Update logging for session creation / removal to easily differentiate between
sessions that have the same 4-tuple.
Document that coap_new_endpoint() is not required in client based code.
If coap-client '-p port' but not '-a addr' is provided, fix code so that
the port is bound to.
Only remove outstanding CON requests with token matches if there is an
ACK response.
Update the logging to differentiate between the 6 occurrences where the mid
is removed.
Make coap_add_option() invalid after calling a coap_add_data*() function.
Add in internal support for adding options to PDUs that contain data with
a replacement coap_add_option_internal() function. Call this new function
in the appropriate places in the libcoap src.
Add coap_log warnings when the application tries to build a PDU in the wrong
order and then return failure.
Update documentation re-inforcing the PDU building order.
If the server recieving a Proxy request determines that it is the final
endpoint of the request, the resource that the request was sent to
was wrong. The update to coap_get_uri_path() fixes this issue.
There is now also parameter support for the proxy definition for the
coap-server where any defined host is treated as being the final endpoint
is in:
coap-server -P ,
This allows any actual server to be the final endpoint of any proxy request
without have to define all the names or IP addresses that the coap-server is
known by. Note that if there is nothing following the , (comma), anything
before the , (comma) will never be used.
Documentation updated.
Document return value can be 0 for both being valid and returning on error.
Same is true for coap_encode_var_safe().
[Error should assert() by default]
Add new function coap_package_build() which returns "git describe --tags"
if available at library build time, else standard package version.
The value of "git describe --tags" is created at run time and passed in as
a compiler -D definition.
Update copyright end dates for updated files.
Aids tracking issues with the libcoap block handling logic to easily
differentiate when libcoap sends a response and when app handler is called
to send a response.
The interface description of coap_send_internal says that COAP_INVALID_MID
is returned in the case of errors. Presently, it, however, returns
"(coap_mid_t)bytes_written" in a special case. Accidentally,
bytes_written == -1 == COAP_INVALID_MID in this specific case, which is why
no problems occur in practice due to this. As a cosmetic fix, this commit
changes the return value to COAP_INVALID_MID.
Do not make it a hard error if mbedtls library exists, but the mbedtls
development environment is missing.
Just remove mbedtls support if this is the case.
Handle "separate" response types correctly.
Make proxy based traffic handling mode COAP_BLOCK_SINGLE_BODY to remove
complexities.
Rename proxy_message_handler() to proxy_response_handler() as it is a
response handler.
Build a dummy 'received' PDU for use with coap_add_data_large_response() in
proxy_response_handler() to be consistant across all uses of
coap_add_data_large_response().
Add appropriate resource_flags (so that NON can be used in observe) for
resources "async" and "example_data".
Include actual session address in the hash, not first 8 bytes of session.
Include actual option number in the hash, not the delta which may vary
if there are different non-cachable option across the payloads of a body.
Simplify token handling by having a state token for Block1 requests where the
top 16 bits are an incrementing request counter and the bottom 48 bits are the
base token.
Re-order struct coap_lg_crcv_t to reduce data space usage.
Track request method for Block2 requests.
Make coap_add_data_large_internal() a static function.
Make sure that lg_srcv is freed off when all PUT/POST data is in to
prevent next PUT/POST to same resource not getting correctly updated.
Add in additional handler coap_register_request_handler() in addition to
coap_register_handler() but now only refer to and use
coap_register_request_handler() to aid readability.
The new function coap_session_get_psk_identity() returns the given
session's psk_identity as provided during the handhake (for CoAP server)
or a session setup (for CoAP client).