/*************************************************************************** * Copyright (c) 2024 Microsoft Corporation * Copyright (c) 2025-present Eclipse ThreadX Contributors * * This program and the accompanying materials are made available under the * terms of the MIT License which is available at * https://opensource.org/licenses/MIT. * * SPDX-License-Identifier: MIT **************************************************************************/ /**************************************************************************/ /**************************************************************************/ /** */ /** NetX Secure Component */ /** */ /** Datagram Transport Layer Security (DTLS) */ /** */ /**************************************************************************/ /**************************************************************************/ #define NX_SECURE_SOURCE_CODE #include "nx_secure_dtls.h" /**************************************************************************/ /* */ /* FUNCTION RELEASE */ /* */ /* _nxe_secure_dtls_server_start PORTABLE C */ /* 6.4.3 */ /* AUTHOR */ /* */ /* Timothy Stapko, Microsoft Corporation */ /* */ /* DESCRIPTION */ /* */ /* This function checks for errors when starting a DTLS server. */ /* */ /* INPUT */ /* */ /* server_ptr DTLS server control block */ /* */ /* OUTPUT */ /* */ /* status Completion status */ /* */ /* CALLS */ /* */ /* _nx_secure_dtls_server_start Actual function call */ /* */ /* CALLED BY */ /* */ /* Application Code */ /* */ /**************************************************************************/ UINT _nxe_secure_dtls_server_start(NX_SECURE_DTLS_SERVER *server_ptr) { #ifdef NX_SECURE_ENABLE_DTLS UINT status; /* Check pointer */ if(server_ptr == NX_NULL) { return(NX_PTR_ERROR); } /* Bind the UDP socket to the assigned port. */ status = _nx_secure_dtls_server_start(server_ptr); return(status); #else NX_PARAMETER_NOT_USED(server_ptr); return(NX_NOT_SUPPORTED); #endif /* NX_SECURE_ENABLE_DTLS */ }