Files
tinydtls/dtls_prng.c
Jon Shallow cd02cad6c3 LwIP: Support LwIP builds when NO_SYS = 1
Follow the model of how things are done for Contiki.

Set up a new WITH_LWIP_NO_SOCKET (which happens with NO_SYS = 1)
and use this when setting up addresses.

Add in platform specific for dtls_prng_lwip.c and lwip_platform.h

Update dtls_time.[ch] to handle LWIP version of time.

Code works for NO_SYS = 1 or NO_SYS = 0.

Signed-off-by: Jon Shallow <supjps-libcoap@jpshallow.com>
2022-10-21 16:30:16 +02:00

46 lines
1.4 KiB
C

/*******************************************************************************
*
* Copyright (c) 2011-2019 Olaf Bergmann (TZI) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v. 1.0 which accompanies this distribution.
*
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Olaf Bergmann - initial API and implementation
* Hauke Mehrtens - memory optimization, ECC integration
* Jon Shallow - platform dependent prng support
*
*******************************************************************************/
#include "tinydtls.h"
#if defined (WITH_CONTIKI)
#include "platform-specific/dtls_prng_contiki.c"
#elif defined (ESPIDF_VERSION)
#include "platform-specific/dtls_prng_espidf.c"
#elif defined (RIOT_VERSION)
#include "platform-specific/dtls_prng_riot.c"
#elif defined (WITH_ZEPHYR)
#include "platform-specific/dtls_prng_zephyr.c"
#elif defined (IS_WINDOWS)
#include "platform-specific/dtls_prng_win.c"
#elif defined (WITH_LWIP)
#include "platform-specific/dtls_prng_lwip.c"
#elif defined (WITH_POSIX)
#include "platform-specific/dtls_prng_posix.c"
#else
#error platform specific prng not defined
#endif