net/dccp/dccp.h
changeset 2 d1f6d8b6f81c
parent 0 aa628870c1d3
equal deleted inserted replaced
1:0056487c491e 2:d1f6d8b6f81c
    47 #define dccp_pr_debug_cat(format, a...)
    47 #define dccp_pr_debug_cat(format, a...)
    48 #endif
    48 #endif
    49 
    49 
    50 extern struct inet_hashinfo dccp_hashinfo;
    50 extern struct inet_hashinfo dccp_hashinfo;
    51 
    51 
    52 extern atomic_t dccp_orphan_count;
    52 extern struct percpu_counter dccp_orphan_count;
    53 
    53 
    54 extern void dccp_time_wait(struct sock *sk, int state, int timeo);
    54 extern void dccp_time_wait(struct sock *sk, int state, int timeo);
    55 
    55 
    56 /*
    56 /*
    57  *  Set safe upper bounds for header and option length. Since Data Offset is 8
    57  *  Set safe upper bounds for header and option length. Since Data Offset is 8
    96 extern int  sysctl_dccp_retries1;
    96 extern int  sysctl_dccp_retries1;
    97 extern int  sysctl_dccp_retries2;
    97 extern int  sysctl_dccp_retries2;
    98 extern int  sysctl_dccp_feat_sequence_window;
    98 extern int  sysctl_dccp_feat_sequence_window;
    99 extern int  sysctl_dccp_feat_rx_ccid;
    99 extern int  sysctl_dccp_feat_rx_ccid;
   100 extern int  sysctl_dccp_feat_tx_ccid;
   100 extern int  sysctl_dccp_feat_tx_ccid;
   101 extern int  sysctl_dccp_feat_ack_ratio;
       
   102 extern int  sysctl_dccp_feat_send_ack_vector;
       
   103 extern int  sysctl_dccp_feat_send_ndp_count;
       
   104 extern int  sysctl_dccp_tx_qlen;
   101 extern int  sysctl_dccp_tx_qlen;
   105 extern int  sysctl_dccp_sync_ratelimit;
   102 extern int  sysctl_dccp_sync_ratelimit;
   106 
   103 
   107 /*
   104 /*
   108  *	48-bit sequence number arithmetic (signed and unsigned)
   105  *	48-bit sequence number arithmetic (signed and unsigned)
   250 extern const char *dccp_state_name(const int state);
   247 extern const char *dccp_state_name(const int state);
   251 
   248 
   252 extern void dccp_set_state(struct sock *sk, const int state);
   249 extern void dccp_set_state(struct sock *sk, const int state);
   253 extern void dccp_done(struct sock *sk);
   250 extern void dccp_done(struct sock *sk);
   254 
   251 
   255 extern void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb);
   252 extern int  dccp_reqsk_init(struct request_sock *rq, struct dccp_sock const *dp,
       
   253 			    struct sk_buff const *skb);
   256 
   254 
   257 extern int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb);
   255 extern int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb);
   258 
   256 
   259 extern struct sock *dccp_create_openreq_child(struct sock *sk,
   257 extern struct sock *dccp_create_openreq_child(struct sock *sk,
   260 					      const struct request_sock *req,
   258 					      const struct request_sock *req,
   432 
   430 
   433 static inline int dccp_ack_pending(const struct sock *sk)
   431 static inline int dccp_ack_pending(const struct sock *sk)
   434 {
   432 {
   435 	const struct dccp_sock *dp = dccp_sk(sk);
   433 	const struct dccp_sock *dp = dccp_sk(sk);
   436 	return dp->dccps_timestamp_echo != 0 ||
   434 	return dp->dccps_timestamp_echo != 0 ||
   437 #ifdef CONFIG_IP_DCCP_ACKVEC
   435 	       (dp->dccps_hc_rx_ackvec != NULL &&
   438 	       (dccp_msk(sk)->dccpms_send_ack_vector &&
       
   439 		dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) ||
   436 		dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) ||
   440 #endif
       
   441 	       inet_csk_ack_scheduled(sk);
   437 	       inet_csk_ack_scheduled(sk);
   442 }
   438 }
       
   439 
       
   440 extern int  dccp_feat_finalise_settings(struct dccp_sock *dp);
       
   441 extern int  dccp_feat_server_ccid_dependencies(struct dccp_request_sock *dreq);
       
   442 extern int  dccp_feat_insert_opts(struct dccp_sock*, struct dccp_request_sock*,
       
   443 				  struct sk_buff *skb);
       
   444 extern int  dccp_feat_activate_values(struct sock *sk, struct list_head *fn);
       
   445 extern void dccp_feat_list_purge(struct list_head *fn_list);
   443 
   446 
   444 extern int dccp_insert_options(struct sock *sk, struct sk_buff *skb);
   447 extern int dccp_insert_options(struct sock *sk, struct sk_buff *skb);
   445 extern int dccp_insert_options_rsk(struct dccp_request_sock*, struct sk_buff*);
   448 extern int dccp_insert_options_rsk(struct dccp_request_sock*, struct sk_buff*);
   446 extern int dccp_insert_option_elapsed_time(struct sock *sk,
   449 extern int dccp_insert_option_elapsed_time(struct sock *sk,
   447 					    struct sk_buff *skb,
   450 					    struct sk_buff *skb,