Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
altcp_tls_mbedtls_mem.h
00001 /** 00002 * @file 00003 * Application layered TCP/TLS connection API (to be used from TCPIP thread) 00004 * 00005 * This file contains memory management function prototypes for a TLS layer using mbedTLS. 00006 * 00007 * Memory management contains: 00008 * - allocating/freeing altcp_mbedtls_state_t 00009 * - allocating/freeing memory used in the mbedTLS library 00010 */ 00011 00012 /* 00013 * Copyright (c) 2017 Simon Goldschmidt 00014 * All rights reserved. 00015 * 00016 * Redistribution and use in source and binary forms, with or without modification, 00017 * are permitted provided that the following conditions are met: 00018 * 00019 * 1. Redistributions of source code must retain the above copyright notice, 00020 * this list of conditions and the following disclaimer. 00021 * 2. Redistributions in binary form must reproduce the above copyright notice, 00022 * this list of conditions and the following disclaimer in the documentation 00023 * and/or other materials provided with the distribution. 00024 * 3. The name of the author may not be used to endorse or promote products 00025 * derived from this software without specific prior written permission. 00026 * 00027 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 00028 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00029 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00030 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00031 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00032 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00033 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00034 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00035 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 00036 * OF SUCH DAMAGE. 00037 * 00038 * This file is part of the lwIP TCP/IP stack. 00039 * 00040 * Author: Simon Goldschmidt <goldsimon@gmx.de> 00041 * 00042 */ 00043 #ifndef LWIP_HDR_ALTCP_MBEDTLS_MEM_H 00044 #define LWIP_HDR_ALTCP_MBEDTLS_MEM_H 00045 00046 #include "lwip/opt.h" 00047 00048 #if LWIP_ALTCP /* don't build if not configured for use in lwipopts.h */ 00049 00050 #include "lwip/apps/altcp_tls_mbedtls_opts.h" 00051 00052 #if LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS 00053 00054 #include "altcp_tls_mbedtls_structs.h" 00055 00056 #ifdef __cplusplus 00057 extern "C" { 00058 #endif 00059 00060 void altcp_mbedtls_mem_init(void); 00061 altcp_mbedtls_state_t *altcp_mbedtls_alloc(void *conf); 00062 void altcp_mbedtls_free(void *conf, altcp_mbedtls_state_t *state); 00063 void *altcp_mbedtls_alloc_config(size_t size); 00064 void altcp_mbedtls_free_config(void *item); 00065 00066 #ifdef __cplusplus 00067 } 00068 #endif 00069 00070 #endif /* LWIP_ALTCP_TLS && LWIP_ALTCP_TLS_MBEDTLS */ 00071 #endif /* LWIP_ALTCP */ 00072 #endif /* LWIP_HDR_ALTCP_MBEDTLS_MEM_H */
Generated on Tue Jul 12 2022 13:54:01 by
