213 |
TIME_WAIT = 10 |
TIME_WAIT = 10 |
214 |
}; |
}; |
215 |
|
|
|
|
|
216 |
/* the TCP protocol control block */ |
/* the TCP protocol control block */ |
217 |
struct tcp_pcb { |
struct tcp_pcb { |
218 |
/* Common members of all PCB types */ |
/** common PCB members */ |
219 |
IP_PCB; |
IP_PCB; |
220 |
|
/** protocol specific PCB members */ |
221 |
/* Protocol specific PCB members */ |
struct tcp_pcb *next; /* for the linked list */ |
222 |
|
enum tcp_state state; /* TCP state */ |
|
struct tcp_pcb *next; /* for the linked list */ |
|
|
|
|
|
enum tcp_state state; /* TCP state */ |
|
|
|
|
223 |
u8_t prio; |
u8_t prio; |
224 |
void *callback_arg; |
void *callback_arg; |
225 |
|
|
235 |
#define TF_GOT_FIN (u8_t)0x20U /* Connection was closed by the remote end. */ |
#define TF_GOT_FIN (u8_t)0x20U /* Connection was closed by the remote end. */ |
236 |
#define TF_NODELAY (u8_t)0x40U /* Disable Nagle algorithm */ |
#define TF_NODELAY (u8_t)0x40U /* Disable Nagle algorithm */ |
237 |
|
|
238 |
/* receiver varables */ |
/* receiver variables */ |
239 |
u32_t rcv_nxt; /* next seqno expected */ |
u32_t rcv_nxt; /* next seqno expected */ |
240 |
u16_t rcv_wnd; /* receiver window */ |
u16_t rcv_wnd; /* receiver window */ |
241 |
|
|
248 |
|
|
249 |
u16_t mss; /* maximum segment size */ |
u16_t mss; /* maximum segment size */ |
250 |
|
|
251 |
/* RTT estimation variables. */ |
/* RTT (round trip time) estimation variables */ |
252 |
u32_t rttest; /* RTT estimate in 500ms ticks */ |
u32_t rttest; /* RTT estimate in 500ms ticks */ |
253 |
u32_t rtseq; /* sequence number being timed */ |
u32_t rtseq; /* sequence number being timed */ |
254 |
s16_t sa, sv; |
s16_t sa, sv; /* @todo document this */ |
255 |
|
|
256 |
u16_t rto; /* retransmission time-out */ |
u16_t rto; /* retransmission time-out */ |
257 |
u8_t nrtx; /* number of retransmissions */ |
u8_t nrtx; /* number of retransmissions */ |
387 |
(errf)((arg),(err)) |
(errf)((arg),(err)) |
388 |
#endif /* LWIP_EVENT_API */ |
#endif /* LWIP_EVENT_API */ |
389 |
|
|
390 |
/* This structure is used to repressent TCP segments when queued. */ |
/* This structure represents a TCP segment on the unsent and unacked queues */ |
391 |
struct tcp_seg { |
struct tcp_seg { |
392 |
struct tcp_seg *next; /* used when putting segements on a queue */ |
struct tcp_seg *next; /* used when putting segements on a queue */ |
393 |
struct pbuf *p; /* buffer containing data + TCP header */ |
struct pbuf *p; /* buffer containing data + TCP header */ |