sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
tcpbase.h
Go to the documentation of this file.
1
7
8/*
9 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without modification,
13 * are permitted provided that the following conditions are met:
14 *
15 * 1. Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 * 3. The name of the author may not be used to endorse or promote products
21 * derived from this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
24 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
26 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
27 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
28 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
31 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
32 * OF SUCH DAMAGE.
33 *
34 * This file is part of the lwIP TCP/IP stack.
35 *
36 * Author: Adam Dunkels <adam@sics.se>
37 *
38 */
39#ifndef LWIP_HDR_TCPBASE_H
40#define LWIP_HDR_TCPBASE_H
41
42#include "lwip/opt.h"
43
44#if LWIP_TCP /* don't build if not configured for use in lwipopts.h */
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50
51#if LWIP_WND_SCALE
52typedef u32_t tcpwnd_size_t;
53#else
54typedef u16_t tcpwnd_size_t;
55#endif
56
57enum tcp_state {
58 CLOSED = 0,
59 LISTEN = 1,
60 SYN_SENT = 2,
61 SYN_RCVD = 3,
62 ESTABLISHED = 4,
63 FIN_WAIT_1 = 5,
64 FIN_WAIT_2 = 6,
65 CLOSE_WAIT = 7,
66 CLOSING = 8,
67 LAST_ACK = 9,
68 TIME_WAIT = 10
69};
70/* ATTENTION: this depends on state number ordering! */
71#define TCP_STATE_IS_CLOSING(state) ((state) >= FIN_WAIT_1)
72
73/* Flags for "apiflags" parameter in tcp_write */
74#define TCP_WRITE_FLAG_COPY 0x01
75#define TCP_WRITE_FLAG_MORE 0x02
76
77#define TCP_PRIO_MIN 1
78#define TCP_PRIO_NORMAL 64
79#define TCP_PRIO_MAX 127
80
81const char* tcp_debug_state_str(enum tcp_state s);
82
83#ifdef __cplusplus
84}
85#endif
86
87#endif /* LWIP_TCP */
88
89#endif /* LWIP_HDR_TCPBASE_H */