1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-19 03:23:49 +01:00
2025-07-09 15:51:49 +02:00

52 lines
1.1 KiB
C

/*
* SPDX-FileCopyrightText: 2015 Freie Universität Berlin
* SPDX-FileCopyrightText: 2018 Inria
* SPDX-License-Identifier: LGPL-2.1-only
*/
/**
* @ingroup examples
* @{
*
* @file
* @brief Example application for TinyDTLS
*
* @author Raul Fuentes <>
*
* @}
*/
#include <stdio.h>
#include "shell.h"
#include "msg.h"
#include "dtls.h"
/* TinyDTLS WARNING check */
#ifdef WITH_RIOT_SOCKETS
#error TinyDTLS is set to use sockets but the app is configured for socks.
#endif
#define MAIN_QUEUE_SIZE (8)
static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];
int main(void)
{
/* we need a message queue for the thread running the shell in order to
* receive potentially fast incoming networking packets */
msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE);
puts("RIOT (Tiny)DTLS testing implementation");
/* TinyDTLS settings (Universal and called only one time by reboot) */
dtls_init();
/* start shell */
puts("All up, running the shell now");
char line_buf[SHELL_DEFAULT_BUFSIZE];
shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE);
/* should be never reached */
return 0;
}