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_tcp.h
00001 /** 00002 * @file 00003 * Application layered TCP connection API (to be used from TCPIP thread)\n 00004 * This interface mimics the tcp callback API to the application while preventing 00005 * direct linking (much like virtual functions). 00006 * This way, an application can make use of other application layer protocols 00007 * on top of TCP without knowing the details (e.g. TLS, proxy connection). 00008 * 00009 * This file contains the base implementation calling into tcp. 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_TCP_H 00044 #define LWIP_HDR_ALTCP_TCP_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/altcp.h" 00051 00052 #ifdef __cplusplus 00053 extern "C" { 00054 #endif 00055 00056 struct altcp_pcb *altcp_tcp_new_ip_type(u8_t ip_type); 00057 00058 #define altcp_tcp_new() altcp_tcp_new_ip_type(IPADDR_TYPE_V4) 00059 #define altcp_tcp_new_ip6() altcp_tcp_new_ip_type(IPADDR_TYPE_V6) 00060 00061 struct altcp_pcb *altcp_tcp_alloc(void *arg, u8_t ip_type); 00062 00063 struct tcp_pcb; 00064 struct altcp_pcb *altcp_tcp_wrap(struct tcp_pcb *tpcb); 00065 00066 #ifdef __cplusplus 00067 } 00068 #endif 00069 00070 #endif /* LWIP_ALTCP */ 00071 00072 #endif /* LWIP_HDR_ALTCP_TCP_H */
Generated on Tue Jul 12 2022 13:54:01 by
1.7.2