The SSL lib used to implement DTLS is only used internally
by libcoap, so it is not necessary and sometimes harmful to
expose it via the pkg-config file. Only when doing static
linking is it necessary to link the SSL lib, this is done
via the "Libs.private: pkg-config directive.
When building outside the source tree compilation fails on
examples, because the libcoap headers expect to be all in the
same directory but coap.h is generated under the build
directory, so it is necessary to add an extra include path
for it.
Also, build directories should always appear before source
directories in the include path, so that any leftover
generated files in the source tree are ignored.
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.
The signature of several dummy functions that are defined to make
compilers happy that complain on empty modules was not standards
compliant. To avoid related compiler warnings, the formal argument
list of this function now is explicitly declared as void.
The environment variable TLS now controls the DTLS-specific configuration
options. The following values are defined:
no turn off DTLS support
openssl use OpenSSL library
gnutls use GnuTLS library
tinydtls use tinydtls library
Any other value will be mapped to gnutls which is the default.
Commit 5b1a8f67 added two macros LL_SEARCH_PAIR and LL_SEARCH_PAIR2
to utlist.h which is maintained at [1]. To simplify updates of this
file, the macros have been moved into async.c as this is the only
place where they are used. To avoid confusion with linked list macros
from utlist.h, the prefix "LL_" has been removed from the custom
macros.
[1] https://github.com/troydhanson/uthash
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.
In the main of examples/coap-server.c wait_ms was set to
COAP_RESOURCE_CHECK_TIME * 1000, then coap_run_once() was invoked
with parameter timeout_ms as COAP_RESOURCE_CHECK_TIME * wait_ms,
i.e., squaring the resource check time.
This bug has been fixed by removing COAP_RESOURCE_CHECK_TIME from
the call to coap_run_once().
Signed-off-by: Olaf Bergmann <bergmann@tzi.org>
ctags is being used to create the symbol maps for dynamic library
generation. Exported symbols from other platforms such as LWIP
must be excluded from these maps to avoid linker errors for undefined
symbols.
This modification adds the LWIP-specific function coap_socket_send_pdu()
to the exclusion list.
coap-client now prints PDUs that are sent and received in log level
INFO so that these are output with '-v6' or higher. These messages
are now visible without turning on the full debug.
print_content_format() converts numeric Content-Format specifiers
to readable media type names. This change adds the new content
formats from RFC 8152 to this list.
coap_async_state_t now contains a reference to the session that is
associated with the respective async state. As the response must
be sent over this session, the local_if parameter of check_async()
is not used anymore and can be removed.
coap_send() now takes ownership of the coap_pdu_t object passed
as second argument. Therefore, it is no longer necessary to release
the PDU structure in case of an error.
Zero-length strings passed to -u are valid user names for DTLS.
The function cmdline_read_user() therefore returns 0 when the
argument passed with option '-u' is an empty string.
The new option '--with-tinydtls' allows selecting tinydtls as
DTLS implementation. This option must be combined with '--disable-shared'
as tinydtls supports only static linkage. Unlike GnuTLS and OpenSSL,
tinydtls is not enabled automatically during configuration.
Sendqueue nodes and send operations now require a session object.
This modification calls coap_new_client_session() on a global
coap_context_t object to create a fake session on the loopback
interface.
Adjusting version numbers in various places for dot and doxygen is
tedious and error prune. So set up the required versions right before
the code block for those checks.