-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtinydls_inter.c
More file actions
34 lines (26 loc) · 1.03 KB
/
tinydls_inter.c
File metadata and controls
34 lines (26 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
* TinyDTLS Secure Multicast Intermediate Node
* Forwards DTLS-encrypted packets and handshake messages
*/
#include "contiki.h"
#include "contiki-net.h"
#include "net/ipv6/multicast/uip-mcast6.h"
#include <stdio.h>
#define DEBUG DEBUG_PRINT
#include "net/ipv6/uip-debug.h"
#if !NETSTACK_CONF_WITH_IPV6 || !UIP_CONF_ROUTER || !UIP_IPV6_MULTICAST || !UIP_CONF_IPV6_RPL
#error "This example can not work with the current contiki configuration"
#endif
PROCESS(mcast_intermediate_process, "TinyDTLS Secure Intermediate");
AUTOSTART_PROCESSES(&mcast_intermediate_process);
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(mcast_intermediate_process, ev, data)
{
PROCESS_BEGIN();
PRINTF("=== TinyDTLS Secure Multicast Intermediate ===\n");
PRINTF("Mode: Transparent forwarding\n");
PRINTF("Multicast Engine: '%s'\n", UIP_MCAST6.name);
PRINTF("Forwarding DTLS handshake and encrypted data\n");
PROCESS_END();
}
/*---------------------------------------------------------------------------*/