diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-03-21 01:50:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:50:58 -0500 |
commit | a4bf3902427a128455b8de299ff0918072b2e974 (patch) | |
tree | 5269cd4d84702a0a728b390e08242be01252d20d /include/linux/dccp.h | |
parent | e6f507196c2b50243beb09b1bfa4639f999d4d1e (diff) |
[DCCP] minisock: Rename struct dccp_options to struct dccp_minisock
This will later be included in struct dccp_request_sock so that we can
have per connection feature negotiation state while in the 3way
handshake, when we clone the DCCP_ROLE_LISTEN socket (in
dccp_create_openreq_child) we'll just copy this state from
dreq_minisock to dccps_minisock.
Also the feature negotiation and option parsing code will mostly touch
dccps_minisock, which will simplify some stuff.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dccp.h')
-rw-r--r-- | include/linux/dccp.h | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/include/linux/dccp.h b/include/linux/dccp.h index e35f680f909b..676333b9fad0 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h | |||
@@ -328,21 +328,24 @@ static inline unsigned int dccp_hdr_len(const struct sk_buff *skb) | |||
328 | #define DCCP_NDP_LIMIT 0xFFFFFF | 328 | #define DCCP_NDP_LIMIT 0xFFFFFF |
329 | 329 | ||
330 | /** | 330 | /** |
331 | * struct dccp_options - option values for a DCCP connection | 331 | * struct dccp_minisock - Minimal DCCP connection representation |
332 | * @dccpo_sequence_window - Sequence Window Feature (section 7.5.2) | 332 | * |
333 | * @dccpo_ccid - Congestion Control Id (CCID) (section 10) | 333 | * Will be used to pass the state from dccp_request_sock to dccp_sock. |
334 | * @dccpo_send_ack_vector - Send Ack Vector Feature (section 11.5) | 334 | * |
335 | * @dccpo_send_ndp_count - Send NDP Count Feature (7.7.2) | 335 | * @dccpms_sequence_window - Sequence Window Feature (section 7.5.2) |
336 | * @dccpms_ccid - Congestion Control Id (CCID) (section 10) | ||
337 | * @dccpms_send_ack_vector - Send Ack Vector Feature (section 11.5) | ||
338 | * @dccpms_send_ndp_count - Send NDP Count Feature (7.7.2) | ||
336 | */ | 339 | */ |
337 | struct dccp_options { | 340 | struct dccp_minisock { |
338 | __u64 dccpo_sequence_window; | 341 | __u64 dccpms_sequence_window; |
339 | __u8 dccpo_rx_ccid; | 342 | __u8 dccpms_rx_ccid; |
340 | __u8 dccpo_tx_ccid; | 343 | __u8 dccpms_tx_ccid; |
341 | __u8 dccpo_send_ack_vector; | 344 | __u8 dccpms_send_ack_vector; |
342 | __u8 dccpo_send_ndp_count; | 345 | __u8 dccpms_send_ndp_count; |
343 | __u8 dccpo_ack_ratio; | 346 | __u8 dccpms_ack_ratio; |
344 | struct list_head dccpo_pending; | 347 | struct list_head dccpms_pending; |
345 | struct list_head dccpo_conf; | 348 | struct list_head dccpms_conf; |
346 | }; | 349 | }; |
347 | 350 | ||
348 | struct dccp_opt_conf { | 351 | struct dccp_opt_conf { |
@@ -360,8 +363,9 @@ struct dccp_opt_pend { | |||
360 | struct dccp_opt_conf *dccpop_sc; | 363 | struct dccp_opt_conf *dccpop_sc; |
361 | }; | 364 | }; |
362 | 365 | ||
363 | extern void __dccp_options_init(struct dccp_options *dccpo); | 366 | extern void __dccp_minisock_init(struct dccp_minisock *dmsk); |
364 | extern void dccp_options_init(struct dccp_options *dccpo); | 367 | extern void dccp_minisock_init(struct dccp_minisock *dmsk); |
368 | |||
365 | extern int dccp_parse_options(struct sock *sk, struct sk_buff *skb); | 369 | extern int dccp_parse_options(struct sock *sk, struct sk_buff *skb); |
366 | 370 | ||
367 | struct dccp_request_sock { | 371 | struct dccp_request_sock { |
@@ -457,7 +461,7 @@ struct dccp_sock { | |||
457 | __u16 dccps_r_ack_ratio; | 461 | __u16 dccps_r_ack_ratio; |
458 | unsigned long dccps_ndp_count; | 462 | unsigned long dccps_ndp_count; |
459 | __u32 dccps_mss_cache; | 463 | __u32 dccps_mss_cache; |
460 | struct dccp_options dccps_options; | 464 | struct dccp_minisock dccps_minisock; |
461 | struct dccp_ackvec *dccps_hc_rx_ackvec; | 465 | struct dccp_ackvec *dccps_hc_rx_ackvec; |
462 | struct ccid *dccps_hc_rx_ccid; | 466 | struct ccid *dccps_hc_rx_ccid; |
463 | struct ccid *dccps_hc_tx_ccid; | 467 | struct ccid *dccps_hc_tx_ccid; |
@@ -473,6 +477,11 @@ static inline struct dccp_sock *dccp_sk(const struct sock *sk) | |||
473 | return (struct dccp_sock *)sk; | 477 | return (struct dccp_sock *)sk; |
474 | } | 478 | } |
475 | 479 | ||
480 | static inline struct dccp_minisock *dccp_msk(const struct sock *sk) | ||
481 | { | ||
482 | return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock; | ||
483 | } | ||
484 | |||
476 | static inline int dccp_service_not_initialized(const struct sock *sk) | 485 | static inline int dccp_service_not_initialized(const struct sock *sk) |
477 | { | 486 | { |
478 | return dccp_sk(sk)->dccps_service == DCCP_SERVICE_INVALID_VALUE; | 487 | return dccp_sk(sk)->dccps_service == DCCP_SERVICE_INVALID_VALUE; |