aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dccp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dccp.h')
-rw-r--r--include/linux/dccp.h43
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 */
337struct dccp_options { 340struct 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
348struct dccp_opt_conf { 351struct 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
363extern void __dccp_options_init(struct dccp_options *dccpo); 366extern void __dccp_minisock_init(struct dccp_minisock *dmsk);
364extern void dccp_options_init(struct dccp_options *dccpo); 367extern void dccp_minisock_init(struct dccp_minisock *dmsk);
368
365extern int dccp_parse_options(struct sock *sk, struct sk_buff *skb); 369extern int dccp_parse_options(struct sock *sk, struct sk_buff *skb);
366 370
367struct dccp_request_sock { 371struct 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
480static inline struct dccp_minisock *dccp_msk(const struct sock *sk)
481{
482 return (struct dccp_minisock *)&dccp_sk(sk)->dccps_minisock;
483}
484
476static inline int dccp_service_not_initialized(const struct sock *sk) 485static 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;