diff options
Diffstat (limited to 'include/linux/dccp.h')
| -rw-r--r-- | include/linux/dccp.h | 51 |
1 files changed, 4 insertions, 47 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index 61734e27abb7..7434a8353e23 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
| @@ -355,46 +355,6 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb) | |||
| 355 | return __dccp_hdr_len(dccp_hdr(skb)); | 355 | return __dccp_hdr_len(dccp_hdr(skb)); |
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | |||
| 359 | /* initial values for each feature */ | ||
| 360 | #define DCCPF_INITIAL_SEQUENCE_WINDOW 100 | ||
| 361 | #define DCCPF_INITIAL_ACK_RATIO 2 | ||
| 362 | #define DCCPF_INITIAL_CCID DCCPC_CCID2 | ||
| 363 | /* FIXME: for now we're default to 1 but it should really be 0 */ | ||
| 364 | #define DCCPF_INITIAL_SEND_NDP_COUNT 1 | ||
| 365 | |||
| 366 | /** | ||
| 367 | * struct dccp_minisock - Minimal DCCP connection representation | ||
| 368 | * | ||
| 369 | * Will be used to pass the state from dccp_request_sock to dccp_sock. | ||
| 370 | * | ||
| 371 | * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2) | ||
| 372 | * @dccpms_pending - List of features being negotiated | ||
| 373 | * @dccpms_conf - | ||
| 374 | */ | ||
| 375 | struct dccp_minisock { | ||
| 376 | __u64 dccpms_sequence_window; | ||
| 377 | struct list_head dccpms_pending; | ||
| 378 | struct list_head dccpms_conf; | ||
| 379 | }; | ||
| 380 | |||
| 381 | struct dccp_opt_conf { | ||
| 382 | __u8 *dccpoc_val; | ||
| 383 | __u8 dccpoc_len; | ||
| 384 | }; | ||
| 385 | |||
| 386 | struct dccp_opt_pend { | ||
| 387 | struct list_head dccpop_node; | ||
| 388 | __u8 dccpop_type; | ||
| 389 | __u8 dccpop_feat; | ||
| 390 | __u8 *dccpop_val; | ||
| 391 | __u8 dccpop_len; | ||
| 392 | int dccpop_conf; | ||
| 393 | struct dccp_opt_conf *dccpop_sc; | ||
| 394 | }; | ||
| 395 | |||
| 396 | extern void dccp_minisock_init(struct dccp_minisock *dmsk); | ||
| 397 | |||
| 398 | /** | 358 | /** |
| 399 | * struct dccp_request_sock - represent DCCP-specific connection request | 359 | * struct dccp_request_sock - represent DCCP-specific connection request |
| 400 | * @dreq_inet_rsk: structure inherited from | 360 | * @dreq_inet_rsk: structure inherited from |
| @@ -483,13 +443,14 @@ struct dccp_ackvec; | |||
| 483 | * @dccps_timestamp_time - time of receiving latest @dccps_timestamp_echo | 443 | * @dccps_timestamp_time - time of receiving latest @dccps_timestamp_echo |
| 484 | * @dccps_l_ack_ratio - feature-local Ack Ratio | 444 | * @dccps_l_ack_ratio - feature-local Ack Ratio |
| 485 | * @dccps_r_ack_ratio - feature-remote Ack Ratio | 445 | * @dccps_r_ack_ratio - feature-remote Ack Ratio |
| 446 | * @dccps_l_seq_win - local Sequence Window (influences ack number validity) | ||
| 447 | * @dccps_r_seq_win - remote Sequence Window (influences seq number validity) | ||
| 486 | * @dccps_pcslen - sender partial checksum coverage (via sockopt) | 448 | * @dccps_pcslen - sender partial checksum coverage (via sockopt) |
| 487 | * @dccps_pcrlen - receiver partial checksum coverage (via sockopt) | 449 | * @dccps_pcrlen - receiver partial checksum coverage (via sockopt) |
| 488 | * @dccps_send_ndp_count - local Send NDP Count feature (7.7.2) | 450 | * @dccps_send_ndp_count - local Send NDP Count feature (7.7.2) |
| 489 | * @dccps_ndp_count - number of Non Data Packets since last data packet | 451 | * @dccps_ndp_count - number of Non Data Packets since last data packet |
| 490 | * @dccps_mss_cache - current value of MSS (path MTU minus header sizes) | 452 | * @dccps_mss_cache - current value of MSS (path MTU minus header sizes) |
| 491 | * @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4) | 453 | * @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4) |
| 492 | * @dccps_minisock - associated minisock (accessed via dccp_msk) | ||
| 493 | * @dccps_featneg - tracks feature-negotiation state (mostly during handshake) | 454 | * @dccps_featneg - tracks feature-negotiation state (mostly during handshake) |
| 494 | * @dccps_hc_rx_ackvec - rx half connection ack vector | 455 | * @dccps_hc_rx_ackvec - rx half connection ack vector |
| 495 | * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) | 456 | * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection) |
| @@ -523,12 +484,13 @@ struct dccp_sock { | |||
| 523 | __u32 dccps_timestamp_time; | 484 | __u32 dccps_timestamp_time; |
| 524 | __u16 dccps_l_ack_ratio; | 485 | __u16 dccps_l_ack_ratio; |
| 525 | __u16 dccps_r_ack_ratio; | 486 | __u16 dccps_r_ack_ratio; |
| 487 | __u64 dccps_l_seq_win:48; | ||
| 488 | __u64 dccps_r_seq_win:48; | ||
| 526 | __u8 dccps_pcslen:4; | 489 | __u8 dccps_pcslen:4; |
| 527 | __u8 dccps_pcrlen:4; | 490 | __u8 dccps_pcrlen:4; |
| 528 | __u8 dccps_send_ndp_count:1; | 491 | __u8 dccps_send_ndp_count:1; |
| 529 | __u64 dccps_ndp_count:48; | 492 | __u64 dccps_ndp_count:48; |
| 530 | unsigned long dccps_rate_last; | 493 | unsigned long dccps_rate_last; |
| 531 | struct dccp_minisock dccps_minisock; | ||
| 532 | struct list_head dccps_featneg; | 494 | struct list_head dccps_featneg; |
| 533 | struct dccp_ackvec *dccps_hc_rx_ackvec; | 495 | struct dccp_ackvec *dccps_hc_rx_ackvec; |
| 534 | struct ccid *dccps_hc_rx_ccid; | 496 | struct ccid *dccps_hc_rx_ccid; |
| @@ -546,11 +508,6 @@ static inline struct dccp_sock *dccp_sk(const struct sock *sk) | |||
| 546 | return (struct dccp_sock *)sk; | 508 | return (struct dccp_sock *)sk; |
| 547 | } | 509 | } |
| 548 | 510 | ||
| 549 | static inline struct dccp_minisock *dccp_msk(const struct sock *sk) | ||
| 550 | { | ||
| 551 | return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock; | ||
| 552 | } | ||
| 553 | |||
| 554 | static inline const char *dccp_role(const struct sock *sk) | 511 | static inline const char *dccp_role(const struct sock *sk) |
| 555 | { | 512 | { |
| 556 | switch (dccp_sk(sk)->dccps_role) { | 513 | switch (dccp_sk(sk)->dccps_role) { |
