[riot-notifications] [RIOT-OS/RIOT] sys: new sock submodule for DTLS (#11909)

Martine Lenders notifications at github.com
Fri Jul 26 08:53:46 CEST 2019


miri64 commented on this pull request.



> + *
+ * @author      Aiman Ismail <muhammadaimanbin.ismail at haw-hamburg.de>
+ */
+
+#include <stdio.h>
+
+#include "net/sock/udp.h"
+#include "net/sock/dtls.h"
+#include "net/ipv6/addr.h"
+#include "net/credman.h"
+
+#include "client_keys.h"
+
+/* TinyDTLS WARNING check */
+#ifdef WITH_RIOT_SOCKETS
+#error TinyDTLS is set to use sockets but the app is configured for socks.

Please explain?

> + *
+ * @param[in] sock      DTLS sock to listen to
+ */
+void sock_dtls_init_server(sock_dtls_t *sock);
+
+/**
+ * @brief Establish DTLS session to a server. Execute the handshake step in
+ *        DTLS.
+ *
+ * @param[in]  sock     DLTS sock to use
+ * @param[in]  ep       Endpoint to establish session with
+ * @param[out] remote   The established session, cannot be NULL
+ *
+ * @return  0 on success
+ * @return  value < 0 on other errors
+ * @return  -EADDRNOTAVAIL, if sock_udp_ep_t::local of @p sock->udp_sock is not

`sock_udp_ep_t` does not have a member `local`

> + * @param[in] sock      DTLS sock to use.
+ * @param[out] remote   Remote DTLS session of the received data.
+ *                      Cannot be NULL.
+ * @param[out] data     Buffer where the data should be stored.
+ * @param[in] maxlen    Maximum memory available at @p data.
+ * @param[in] timeout   Timeout for receive in microseconds.
+ *                      If 0 and no data is available, the function returns
+ *                      immediately.
+ *                      May be SOCK_NO_TIMEOUT to wait until data
+ *                      is available.
+ *
+ * @note Function may block if data not available and @p timeout != 0
+ *
+ * @return The number of bytes received on success
+ * @return value < 0 on error
+ * @return  -EADDRNOTAVAIL, if sock_udp_ep_t::local of @p sock->udp_sock is not

Dito

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11909#pullrequestreview-267016330
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190725/c97b0610/attachment.htm>


More information about the notifications mailing list