string.h is required for memcmp() that is used in session.c and
dtls_debug.c. Therefore, the header file needs to be included
only in these two files.
Change-Id: I11db1c37a7cc13d8fa2826f6d3e38d3765f4a4ec
Follow the model of how things are done for Contiki.
Set up a new WITH_LWIP_NO_SOCKET (which happens with NO_SYS = 1)
and use this when setting up addresses.
Add in platform specific for dtls_prng_lwip.c and lwip_platform.h
Update dtls_time.[ch] to handle LWIP version of time.
Code works for NO_SYS = 1 or NO_SYS = 0.
Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
Using tinydtls on RIOT OS is not limited to GNRC as network stack.
It is also working with e.g. lwIP, see: https://github.com/RIOT-OS/RIOT/pull/17552
Therefore the name WITH_RIOT_GNRC is misleading.
Commit ef90034 has introduced a few special-purpose utility
functions that do not work well on non-POSIX platforms. Therefore,
most of them are not built when compiling for Contiki or RIOT.
This change also excludes dtls_session_addr() as it uses POSIX
sockets.
Change-Id: I8a3c1890ea3ed286020d93a4b6e2ab5f68f70a8d
Change ifindex of struct session_t to int to support kernel environments
where ifindex can be over 255.
Change-Id: I03e42a237533424515f58fc30f9ac50282c11712
Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
Signed-off-by: Olaf Bergmann <bergmann@tzi.org>
These functions were mostly added to make it easier to provide a ruby
FFI for tinydtls. This is also the reason why `dtls_session_addr`
dynamically allocates memory for a `struct sockaddr` instead of
receiving a pointer to a memory location for a `struct sockaddr` as an
argument.
Change-Id: I91c3ee0ab03f5e8ed50e8e309c08b2436536496a
Signed-off-by: Sören Tempel <tempel@uni-bremen.de>
Signed-off-by: Olaf Bergmann <bergmann@tzi.org>