[riot-notifications] [RIOT-OS/RIOT] [WIP] Improving TinyDTLS package and dtls-echo example (#7615)

Tobias Heider notifications at github.com
Wed Sep 20 15:04:41 CEST 2017


@rfuentess I'm on your side with the macro functions for dynamic allocations. As far as I can see the allocations we are talking about are the `hmac_context_storage`, `peer_storage`, `handshake_storage`, `security_storage` and `netq_storage`. In other words: every place Contiki uses [memb](http://contiki.sourceforge.net/docs/2.6/a01684.html) functions, which do exactly what you propose.

For the upstream repository I guess the least complex solution would be to provide one or more platform.h files containing not only constants but also platform specific function definitions, similar to micro-ecc's [platform-specific.inc](https://github.com/kmackay/micro-ecc/blob/master/platform-specific.inc), as our function signatures will not differ from contiki or *nix. However, I guess it all just depends how the tinyDTLS maintainers want to solve this.

About the PR itself: which gcc version have you been testing with? I'm getting a lot of implicit fallthrough warnings (which are enabled by default in GCC 7) building tinydtls:
```
/examples/dtls-echo/bin/pkg/native/tinydtls/uthash.h:449:21: error: this statement may fall through [-Werror=implicit-fallthrough=]
      case 3:  _hj_i += ( (unsigned)_hj_key[2] << 16 );                           \
               ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
I propose adding a `-Wno-implicit-fallthrough` to the CFLAGS or, which would be even better, fixing it upstream using [fallthrough comments](https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/).
While testing on native the dtls-echo server was working well, the client had to be restarted to get a second reply, but i've not yet looked into this further.

-- 
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/7615#issuecomment-330844825
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170920/8bca4c9d/attachment.html>


More information about the notifications mailing list