Commit Graph

15 Commits

Author SHA1 Message Date
Olaf Bergmann
0538a50a0d session.h: Move inclusion of string.h into .c files
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
2023-07-12 12:39:29 +02:00
Jon Shallow
cd02cad6c3 LwIP: Support LwIP builds when NO_SYS = 1
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>
2022-10-21 16:30:16 +02:00
Jan Romann
9320251212 Add Windows support 2022-09-27 14:31:54 +02:00
Jon Shallow
e4aa73eed8 session.h: Support compiling for LwIP
Required for libcoap LwIP builds that need encryption.

Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
2022-07-23 06:50:20 +02:00
Achim Kraus
16d3764191 Support zephyr.
Add initial support for zephyr.
Mutex is currently not supported, nor used.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
2022-07-08 14:51:05 +02:00
Hendrik van Essen
abb7ba3140 session: Add support for IPv4 on RIOT OS 2022-06-24 21:31:38 +02:00
obgm
25467388e8 Merge pull request #127 from leandrolanzieri/pr/fix_riot_session
session.h: Modify session_t for RIOT
2022-05-23 13:12:58 +02:00
Leandro Lanzieri
a45122b771 session.h: add documentation to contiki definition
Signed-off-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2022-03-29 11:09:12 +02:00
Leandro Lanzieri
e6499f4a24 session.h: Modify session_t for RIOT
Now the addr member of session_t includes both the IPv6 address and the
port.

Signed-off-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2022-03-29 11:08:52 +02:00
HendrikVE
cd81dac809 session: Rename condition WITH_RIOT_GNRC to WITH_RIOT_SOCK
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.
2022-03-26 14:24:13 +01:00
Olaf Bergmann
dcac93f1b3 session.[hc]: Bugfix for platforms Contiki and RIOT
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
2019-03-27 09:55:56 +01:00
Jon Shallow
32e9ed2dac session.h: Support ifindex greater than 255
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>
2019-03-21 14:24:31 +01:00
Sören Tempel
ef90034f32 session: add utility function for interacting with the session_t object
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>
2018-07-18 14:23:29 +02:00
Raul Fuentes
f42c60fbb1 session.[ch]: Support for RIOT OS
Change-Id: I4c1ad3469b1228ce50957445e56eda718a253712
Signed-off-by: Raul Fuentes <ra.fuentes.sam@gmail.com>
2018-02-16 10:27:27 +01:00
Olaf Bergmann
e1388b3980 New initial commit 2016-02-02 18:39:21 +01:00