[riot-notifications] [RIOT-OS/RIOT] Pr/dtls/get event session (#15755)

János Brodbeck notifications at github.com
Tue Jan 12 19:41:43 CET 2021



### Contribution description
This PR adds a new function to sock async: `sock_dtls_get_event_session()` to retrieve the session object within a DTLS event. Currently it is not possible to get this session for every event type (e.g. SOCK_ASYNC_CONN_FIN, SOCK_ASYNC_CONN_RDY). It should work for every possible event type. The issue was described in #15517. 

I didn't get it to work properly with just a pointer in the socket structure, since the session needed to be stored somewhere and storing it was not possible within the `_event()` function of tinydtls. So I placed it right away in the socket. 
 
Not sure whether I placed the new function correctly. 

### Testing procedure
* Flash and run on one device (e.g. native)
* Execute dtlsc {ip} {some data}
### Issues/PRs references
Fixes  #15517

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/15755

-- Commit Summary --

  * sock/async: introduce function to retrieve session of current DTLS event
  * pkg/tinydtls: implement sock_dtls_get_event_session
  * sock/async: fix typo in doc of sock_dtls_set_cb

-- File Changes --

    M pkg/tinydtls/contrib/sock_dtls.c (10)
    M pkg/tinydtls/include/sock_dtls_types.h (15)
    M sys/include/net/sock/async.h (15)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/15755.patch
https://github.com/RIOT-OS/RIOT/pull/15755.diff

-- 
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/15755
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210112/d6b97274/attachment-0001.htm>


More information about the notifications mailing list