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
tcpbase.h
00001 /** 00002 * @file 00003 * Base TCP API definitions shared by TCP and ALTCP\n 00004 * See also @ref tcp_raw 00005 */ 00006 00007 /* 00008 * Copyright (c) 2001-2004 Swedish Institute of Computer Science. 00009 * All rights reserved. 00010 * 00011 * Redistribution and use in source and binary forms, with or without modification, 00012 * are permitted provided that the following conditions are met: 00013 * 00014 * 1. Redistributions of source code must retain the above copyright notice, 00015 * this list of conditions and the following disclaimer. 00016 * 2. Redistributions in binary form must reproduce the above copyright notice, 00017 * this list of conditions and the following disclaimer in the documentation 00018 * and/or other materials provided with the distribution. 00019 * 3. The name of the author may not be used to endorse or promote products 00020 * derived from this software without specific prior written permission. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 00023 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00024 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 00025 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00026 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 00027 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00028 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00029 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 00030 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 00031 * OF SUCH DAMAGE. 00032 * 00033 * This file is part of the lwIP TCP/IP stack. 00034 * 00035 * Author: Adam Dunkels <adam@sics.se> 00036 * 00037 */ 00038 #ifndef LWIP_HDR_TCPBASE_H 00039 #define LWIP_HDR_TCPBASE_H 00040 00041 #include "lwip/opt.h" 00042 00043 #if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ 00044 00045 #ifdef __cplusplus 00046 extern "C" { 00047 #endif 00048 00049 00050 #if LWIP_WND_SCALE 00051 typedef u32_t tcpwnd_size_t; 00052 #else 00053 typedef u16_t tcpwnd_size_t; 00054 #endif 00055 00056 enum tcp_state { 00057 CLOSED = 0, 00058 LISTEN = 1, 00059 SYN_SENT = 2, 00060 SYN_RCVD = 3, 00061 ESTABLISHED = 4, 00062 FIN_WAIT_1 = 5, 00063 FIN_WAIT_2 = 6, 00064 CLOSE_WAIT = 7, 00065 CLOSING = 8, 00066 LAST_ACK = 9, 00067 TIME_WAIT = 10 00068 }; 00069 /* ATTENTION: this depends on state number ordering! */ 00070 #define TCP_STATE_IS_CLOSING(state) ((state) >= FIN_WAIT_1) 00071 00072 /* Flags for "apiflags" parameter in tcp_write */ 00073 #define TCP_WRITE_FLAG_COPY 0x01 00074 #define TCP_WRITE_FLAG_MORE 0x02 00075 00076 #define TCP_PRIO_MIN 1 00077 #define TCP_PRIO_NORMAL 64 00078 #define TCP_PRIO_MAX 127 00079 00080 const char* tcp_debug_state_str(enum tcp_state s); 00081 00082 #ifdef __cplusplus 00083 } 00084 #endif 00085 00086 #endif /* LWIP_TCP */ 00087 00088 #endif /* LWIP_HDR_TCPBASE_H */
Generated on Tue Jul 12 2022 13:54:55 by
