dtls: replace var N and C with other names

Some other definitions for N and C are colliding with our N and C
variable when building under contiki on some platforms like the
wismote. Replace the variable name N with nonce and C with counter_tmp.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: call dtls_set_log_level() instead of set_log_level()

This function was renamed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
debug: add missing variable in contiki code and remove unused

This fixes a build error and a warning.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: do not include time.h, but use dtls_time.h

This fixes a build error in contiki with wismote target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: build dtls_time.c and peer.c when using contiki

These files where missing.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: remove old CONFIG parts

These were added again by a merge error.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: add static in front of inline

These functions where exported by multiple *.o files, because multiple
files used this header.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
debug: use session_t in declaration

This fixes a build problem with contiki.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: when removing the peers iterate over the list in the ctx

We can not access peer_storage because this is only available in peer.c
also we just want to remove the peers for this ctx and not others.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
aes: remove include for sys/param.h

This is not available on contiki for targets like wismote.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
dtls: move dtls_retransmit_process into dtls.c again

This process is not associated to a peer and only used in dtls.c move
it there. This fixes a build problem in contiki.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
crypto: use to not use ntohl()

Use dtls_uint32_to_int() instead of ntohl(), which is not available on
all targets in contiki.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>