aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/dccp.h56
1 files changed, 39 insertions, 17 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h
index a0073268808f..8b3f9ad3cf04 100644
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -227,29 +227,51 @@ struct dccp_so_feat {
227#include <net/tcp_states.h> 227#include <net/tcp_states.h>
228 228
229enum dccp_state { 229enum dccp_state {
230 DCCP_OPEN = TCP_ESTABLISHED, 230 DCCP_OPEN = TCP_ESTABLISHED,
231 DCCP_REQUESTING = TCP_SYN_SENT, 231 DCCP_REQUESTING = TCP_SYN_SENT,
232 DCCP_LISTEN = TCP_LISTEN, 232 DCCP_LISTEN = TCP_LISTEN,
233 DCCP_RESPOND = TCP_SYN_RECV, 233 DCCP_RESPOND = TCP_SYN_RECV,
234 DCCP_CLOSING = TCP_CLOSING, 234 /*
235 DCCP_TIME_WAIT = TCP_TIME_WAIT, 235 * States involved in closing a DCCP connection:
236 DCCP_CLOSED = TCP_CLOSE, 236 * 1) ACTIVE_CLOSEREQ is entered by a server sending a CloseReq.
237 DCCP_PARTOPEN = TCP_MAX_STATES, 237 *
238 * 2) CLOSING can have three different meanings (RFC 4340, 8.3):
239 * a. Client has performed active-close, has sent a Close to the server
240 * from state OPEN or PARTOPEN, and is waiting for the final Reset
241 * (in this case, SOCK_DONE == 1).
242 * b. Client is asked to perform passive-close, by receiving a CloseReq
243 * in (PART)OPEN state. It sends a Close and waits for final Reset
244 * (in this case, SOCK_DONE == 0).
245 * c. Server performs an active-close as in (a), keeps TIMEWAIT state.
246 *
247 * 3) The following intermediate states are employed to give passively
248 * closing nodes a chance to process their unread data:
249 * - PASSIVE_CLOSE (from OPEN => CLOSED) and
250 * - PASSIVE_CLOSEREQ (from (PART)OPEN to CLOSING; case (b) above).
251 */
252 DCCP_ACTIVE_CLOSEREQ = TCP_FIN_WAIT1,
253 DCCP_PASSIVE_CLOSE = TCP_CLOSE_WAIT, /* any node receiving a Close */
254 DCCP_CLOSING = TCP_CLOSING,
255 DCCP_TIME_WAIT = TCP_TIME_WAIT,
256 DCCP_CLOSED = TCP_CLOSE,
257 DCCP_PARTOPEN = TCP_MAX_STATES,
258 DCCP_PASSIVE_CLOSEREQ, /* clients receiving CloseReq */
238 DCCP_MAX_STATES 259 DCCP_MAX_STATES
239}; 260};
240 261
241#define DCCP_STATE_MASK 0xf 262#define DCCP_STATE_MASK 0x1f
242#define DCCP_ACTION_FIN (1<<7) 263#define DCCP_ACTION_FIN (1<<7)
243 264
244enum { 265enum {
245 DCCPF_OPEN = TCPF_ESTABLISHED, 266 DCCPF_OPEN = TCPF_ESTABLISHED,
246 DCCPF_REQUESTING = TCPF_SYN_SENT, 267 DCCPF_REQUESTING = TCPF_SYN_SENT,
247 DCCPF_LISTEN = TCPF_LISTEN, 268 DCCPF_LISTEN = TCPF_LISTEN,
248 DCCPF_RESPOND = TCPF_SYN_RECV, 269 DCCPF_RESPOND = TCPF_SYN_RECV,
249 DCCPF_CLOSING = TCPF_CLOSING, 270 DCCPF_ACTIVE_CLOSEREQ = TCPF_FIN_WAIT1,
250 DCCPF_TIME_WAIT = TCPF_TIME_WAIT, 271 DCCPF_CLOSING = TCPF_CLOSING,
251 DCCPF_CLOSED = TCPF_CLOSE, 272 DCCPF_TIME_WAIT = TCPF_TIME_WAIT,
252 DCCPF_PARTOPEN = 1 << DCCP_PARTOPEN, 273 DCCPF_CLOSED = TCPF_CLOSE,
274 DCCPF_PARTOPEN = (1 << DCCP_PARTOPEN),
253}; 275};
254 276
255static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb) 277static inline struct dccp_hdr *dccp_hdr(const struct sk_buff *skb)