53 |
initialize TCP. */ |
initialize TCP. */ |
54 |
void tcp_tmr (void); /* Must be called every |
void tcp_tmr (void); /* Must be called every |
55 |
TCP_TMR_INTERVAL |
TCP_TMR_INTERVAL |
56 |
ms. (Typically 100 ms). */ |
ms. (Typically 250 ms). */ |
57 |
/* Application program's interface: */ |
/* Application program's interface: */ |
58 |
struct tcp_pcb * tcp_new (void); |
struct tcp_pcb * tcp_new (void); |
59 |
struct tcp_pcb * tcp_alloc (u8_t prio); |
struct tcp_pcb * tcp_alloc (u8_t prio); |
115 |
#define TCP_SEQ_GT(a,b) ((s32_t)((a)-(b)) > 0) |
#define TCP_SEQ_GT(a,b) ((s32_t)((a)-(b)) > 0) |
116 |
#define TCP_SEQ_GEQ(a,b) ((s32_t)((a)-(b)) >= 0) |
#define TCP_SEQ_GEQ(a,b) ((s32_t)((a)-(b)) >= 0) |
117 |
|
|
118 |
#define TCP_FIN 0x01 |
#define TCP_FIN 0x01U |
119 |
#define TCP_SYN 0x02 |
#define TCP_SYN 0x02U |
120 |
#define TCP_RST 0x04 |
#define TCP_RST 0x04U |
121 |
#define TCP_PSH 0x08 |
#define TCP_PSH 0x08U |
122 |
#define TCP_ACK 0x10 |
#define TCP_ACK 0x10U |
123 |
#define TCP_URG 0x20 |
#define TCP_URG 0x20U |
124 |
|
|
125 |
#define TCP_FLAGS 0x3f |
#define TCP_FLAGS 0x3fU |
126 |
|
|
127 |
/* Length of the TCP header, excluding options. */ |
/* Length of the TCP header, excluding options. */ |
128 |
#define TCP_HLEN 20 |
#define TCP_HLEN 20 |
129 |
|
|
130 |
#ifndef TCP_TMR_INTERVAL |
#ifndef TCP_TMR_INTERVAL |
131 |
#define TCP_TMR_INTERVAL 100 /* The TCP timer interval in |
#define TCP_TMR_INTERVAL 250 /* The TCP timer interval in |
132 |
milliseconds. */ |
milliseconds. */ |
133 |
#endif /* TCP_TMR_INTERVAL */ |
#endif /* TCP_TMR_INTERVAL */ |
134 |
|
|
135 |
#ifndef TCP_FAST_INTERVAL |
#ifndef TCP_FAST_INTERVAL |
136 |
#define TCP_FAST_INTERVAL 200 /* the fine grained timeout in |
#define TCP_FAST_INTERVAL TCP_TMR_INTERVAL /* the fine grained timeout in |
137 |
milliseconds */ |
milliseconds */ |
138 |
#endif /* TCP_FAST_INTERVAL */ |
#endif /* TCP_FAST_INTERVAL */ |
139 |
|
|
140 |
#ifndef TCP_SLOW_INTERVAL |
#ifndef TCP_SLOW_INTERVAL |
141 |
#define TCP_SLOW_INTERVAL 500 /* the coarse grained timeout in |
#define TCP_SLOW_INTERVAL (2*TCP_TMR_INTERVAL) /* the coarse grained timeout in |
142 |
milliseconds */ |
milliseconds */ |
143 |
#endif /* TCP_SLOW_INTERVAL */ |
#endif /* TCP_SLOW_INTERVAL */ |
144 |
|
|