diff options
| -rw-r--r-- | net/dccp/ackvec.h | 21 | ||||
| -rw-r--r-- | net/dccp/ccid.h | 18 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/loss_interval.h | 8 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/packet_history.h | 25 | ||||
| -rw-r--r-- | net/dccp/ccids/lib/tfrc.h | 22 | ||||
| -rw-r--r-- | net/dccp/dccp.h | 186 | ||||
| -rw-r--r-- | net/dccp/feat.h | 26 |
7 files changed, 148 insertions, 158 deletions
diff --git a/net/dccp/ackvec.h b/net/dccp/ackvec.h index a269aa7f7923..3284bfa988c0 100644 --- a/net/dccp/ackvec.h +++ b/net/dccp/ackvec.h | |||
| @@ -101,16 +101,16 @@ struct dccp_ackvec_record { | |||
| 101 | u8 avr_ack_nonce:1; | 101 | u8 avr_ack_nonce:1; |
| 102 | }; | 102 | }; |
| 103 | 103 | ||
| 104 | extern int dccp_ackvec_init(void); | 104 | int dccp_ackvec_init(void); |
| 105 | extern void dccp_ackvec_exit(void); | 105 | void dccp_ackvec_exit(void); |
| 106 | 106 | ||
| 107 | extern struct dccp_ackvec *dccp_ackvec_alloc(const gfp_t priority); | 107 | struct dccp_ackvec *dccp_ackvec_alloc(const gfp_t priority); |
| 108 | extern void dccp_ackvec_free(struct dccp_ackvec *av); | 108 | void dccp_ackvec_free(struct dccp_ackvec *av); |
| 109 | 109 | ||
| 110 | extern void dccp_ackvec_input(struct dccp_ackvec *av, struct sk_buff *skb); | 110 | void dccp_ackvec_input(struct dccp_ackvec *av, struct sk_buff *skb); |
| 111 | extern int dccp_ackvec_update_records(struct dccp_ackvec *av, u64 seq, u8 sum); | 111 | int dccp_ackvec_update_records(struct dccp_ackvec *av, u64 seq, u8 sum); |
| 112 | extern void dccp_ackvec_clear_state(struct dccp_ackvec *av, const u64 ackno); | 112 | void dccp_ackvec_clear_state(struct dccp_ackvec *av, const u64 ackno); |
| 113 | extern u16 dccp_ackvec_buflen(const struct dccp_ackvec *av); | 113 | u16 dccp_ackvec_buflen(const struct dccp_ackvec *av); |
| 114 | 114 | ||
| 115 | static inline bool dccp_ackvec_is_empty(const struct dccp_ackvec *av) | 115 | static inline bool dccp_ackvec_is_empty(const struct dccp_ackvec *av) |
| 116 | { | 116 | { |
| @@ -133,7 +133,6 @@ struct dccp_ackvec_parsed { | |||
| 133 | struct list_head node; | 133 | struct list_head node; |
| 134 | }; | 134 | }; |
| 135 | 135 | ||
| 136 | extern int dccp_ackvec_parsed_add(struct list_head *head, | 136 | int dccp_ackvec_parsed_add(struct list_head *head, u8 *vec, u8 len, u8 nonce); |
| 137 | u8 *vec, u8 len, u8 nonce); | 137 | void dccp_ackvec_parsed_cleanup(struct list_head *parsed_chunks); |
| 138 | extern void dccp_ackvec_parsed_cleanup(struct list_head *parsed_chunks); | ||
| 139 | #endif /* _ACKVEC_H */ | 138 | #endif /* _ACKVEC_H */ |
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h index fb85d371a8de..6eb837a47b5c 100644 --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h | |||
| @@ -93,8 +93,8 @@ extern struct ccid_operations ccid2_ops; | |||
| 93 | extern struct ccid_operations ccid3_ops; | 93 | extern struct ccid_operations ccid3_ops; |
| 94 | #endif | 94 | #endif |
| 95 | 95 | ||
| 96 | extern int ccid_initialize_builtins(void); | 96 | int ccid_initialize_builtins(void); |
| 97 | extern void ccid_cleanup_builtins(void); | 97 | void ccid_cleanup_builtins(void); |
| 98 | 98 | ||
| 99 | struct ccid { | 99 | struct ccid { |
| 100 | struct ccid_operations *ccid_ops; | 100 | struct ccid_operations *ccid_ops; |
| @@ -106,12 +106,12 @@ static inline void *ccid_priv(const struct ccid *ccid) | |||
| 106 | return (void *)ccid->ccid_priv; | 106 | return (void *)ccid->ccid_priv; |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | extern bool ccid_support_check(u8 const *ccid_array, u8 array_len); | 109 | bool ccid_support_check(u8 const *ccid_array, u8 array_len); |
| 110 | extern int ccid_get_builtin_ccids(u8 **ccid_array, u8 *array_len); | 110 | int ccid_get_builtin_ccids(u8 **ccid_array, u8 *array_len); |
| 111 | extern int ccid_getsockopt_builtin_ccids(struct sock *sk, int len, | 111 | int ccid_getsockopt_builtin_ccids(struct sock *sk, int len, |
| 112 | char __user *, int __user *); | 112 | char __user *, int __user *); |
| 113 | 113 | ||
| 114 | extern struct ccid *ccid_new(const u8 id, struct sock *sk, bool rx); | 114 | struct ccid *ccid_new(const u8 id, struct sock *sk, bool rx); |
| 115 | 115 | ||
| 116 | static inline int ccid_get_current_rx_ccid(struct dccp_sock *dp) | 116 | static inline int ccid_get_current_rx_ccid(struct dccp_sock *dp) |
| 117 | { | 117 | { |
| @@ -131,8 +131,8 @@ static inline int ccid_get_current_tx_ccid(struct dccp_sock *dp) | |||
| 131 | return ccid->ccid_ops->ccid_id; | 131 | return ccid->ccid_ops->ccid_id; |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | extern void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk); | 134 | void ccid_hc_rx_delete(struct ccid *ccid, struct sock *sk); |
| 135 | extern void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk); | 135 | void ccid_hc_tx_delete(struct ccid *ccid, struct sock *sk); |
| 136 | 136 | ||
| 137 | /* | 137 | /* |
| 138 | * Congestion control of queued data packets via CCID decision. | 138 | * Congestion control of queued data packets via CCID decision. |
diff --git a/net/dccp/ccids/lib/loss_interval.h b/net/dccp/ccids/lib/loss_interval.h index d1d2f5383b7d..57f631a86ccd 100644 --- a/net/dccp/ccids/lib/loss_interval.h +++ b/net/dccp/ccids/lib/loss_interval.h | |||
| @@ -65,9 +65,9 @@ static inline u8 tfrc_lh_length(struct tfrc_loss_hist *lh) | |||
| 65 | 65 | ||
| 66 | struct tfrc_rx_hist; | 66 | struct tfrc_rx_hist; |
| 67 | 67 | ||
| 68 | extern int tfrc_lh_interval_add(struct tfrc_loss_hist *, struct tfrc_rx_hist *, | 68 | int tfrc_lh_interval_add(struct tfrc_loss_hist *, struct tfrc_rx_hist *, |
| 69 | u32 (*first_li)(struct sock *), struct sock *); | 69 | u32 (*first_li)(struct sock *), struct sock *); |
| 70 | extern u8 tfrc_lh_update_i_mean(struct tfrc_loss_hist *lh, struct sk_buff *); | 70 | u8 tfrc_lh_update_i_mean(struct tfrc_loss_hist *lh, struct sk_buff *); |
| 71 | extern void tfrc_lh_cleanup(struct tfrc_loss_hist *lh); | 71 | void tfrc_lh_cleanup(struct tfrc_loss_hist *lh); |
| 72 | 72 | ||
| 73 | #endif /* _DCCP_LI_HIST_ */ | 73 | #endif /* _DCCP_LI_HIST_ */ |
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h index 7ee4a9d9d335..ee362b0b630d 100644 --- a/net/dccp/ccids/lib/packet_history.h +++ b/net/dccp/ccids/lib/packet_history.h | |||
| @@ -60,8 +60,8 @@ static inline struct tfrc_tx_hist_entry * | |||
| 60 | return head; | 60 | return head; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | extern int tfrc_tx_hist_add(struct tfrc_tx_hist_entry **headp, u64 seqno); | 63 | int tfrc_tx_hist_add(struct tfrc_tx_hist_entry **headp, u64 seqno); |
| 64 | extern void tfrc_tx_hist_purge(struct tfrc_tx_hist_entry **headp); | 64 | void tfrc_tx_hist_purge(struct tfrc_tx_hist_entry **headp); |
| 65 | 65 | ||
| 66 | /* Subtraction a-b modulo-16, respects circular wrap-around */ | 66 | /* Subtraction a-b modulo-16, respects circular wrap-around */ |
| 67 | #define SUB16(a, b) (((a) + 16 - (b)) & 0xF) | 67 | #define SUB16(a, b) (((a) + 16 - (b)) & 0xF) |
| @@ -139,20 +139,17 @@ static inline bool tfrc_rx_hist_loss_pending(const struct tfrc_rx_hist *h) | |||
| 139 | return h->loss_count > 0; | 139 | return h->loss_count > 0; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | extern void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, | 142 | void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h, const struct sk_buff *skb, |
| 143 | const struct sk_buff *skb, const u64 ndp); | 143 | const u64 ndp); |
| 144 | 144 | ||
| 145 | extern int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb); | 145 | int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb); |
| 146 | 146 | ||
| 147 | struct tfrc_loss_hist; | 147 | struct tfrc_loss_hist; |
| 148 | extern int tfrc_rx_handle_loss(struct tfrc_rx_hist *h, | 148 | int tfrc_rx_handle_loss(struct tfrc_rx_hist *h, struct tfrc_loss_hist *lh, |
| 149 | struct tfrc_loss_hist *lh, | 149 | struct sk_buff *skb, const u64 ndp, |
| 150 | struct sk_buff *skb, const u64 ndp, | 150 | u32 (*first_li)(struct sock *sk), struct sock *sk); |
| 151 | u32 (*first_li)(struct sock *sk), | 151 | u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, const struct sk_buff *skb); |
| 152 | struct sock *sk); | 152 | int tfrc_rx_hist_alloc(struct tfrc_rx_hist *h); |
| 153 | extern u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, | 153 | void tfrc_rx_hist_purge(struct tfrc_rx_hist *h); |
| 154 | const struct sk_buff *skb); | ||
| 155 | extern int tfrc_rx_hist_alloc(struct tfrc_rx_hist *h); | ||
| 156 | extern void tfrc_rx_hist_purge(struct tfrc_rx_hist *h); | ||
| 157 | 154 | ||
| 158 | #endif /* _DCCP_PKT_HIST_ */ | 155 | #endif /* _DCCP_PKT_HIST_ */ |
diff --git a/net/dccp/ccids/lib/tfrc.h b/net/dccp/ccids/lib/tfrc.h index ed698c42a5fb..40ee7d62b652 100644 --- a/net/dccp/ccids/lib/tfrc.h +++ b/net/dccp/ccids/lib/tfrc.h | |||
| @@ -55,21 +55,21 @@ static inline u32 tfrc_ewma(const u32 avg, const u32 newval, const u8 weight) | |||
| 55 | return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; | 55 | return avg ? (weight * avg + (10 - weight) * newval) / 10 : newval; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | extern u32 tfrc_calc_x(u16 s, u32 R, u32 p); | 58 | u32 tfrc_calc_x(u16 s, u32 R, u32 p); |
| 59 | extern u32 tfrc_calc_x_reverse_lookup(u32 fvalue); | 59 | u32 tfrc_calc_x_reverse_lookup(u32 fvalue); |
| 60 | extern u32 tfrc_invert_loss_event_rate(u32 loss_event_rate); | 60 | u32 tfrc_invert_loss_event_rate(u32 loss_event_rate); |
| 61 | 61 | ||
| 62 | extern int tfrc_tx_packet_history_init(void); | 62 | int tfrc_tx_packet_history_init(void); |
| 63 | extern void tfrc_tx_packet_history_exit(void); | 63 | void tfrc_tx_packet_history_exit(void); |
| 64 | extern int tfrc_rx_packet_history_init(void); | 64 | int tfrc_rx_packet_history_init(void); |
| 65 | extern void tfrc_rx_packet_history_exit(void); | 65 | void tfrc_rx_packet_history_exit(void); |
| 66 | 66 | ||
| 67 | extern int tfrc_li_init(void); | 67 | int tfrc_li_init(void); |
| 68 | extern void tfrc_li_exit(void); | 68 | void tfrc_li_exit(void); |
| 69 | 69 | ||
| 70 | #ifdef CONFIG_IP_DCCP_TFRC_LIB | 70 | #ifdef CONFIG_IP_DCCP_TFRC_LIB |
| 71 | extern int tfrc_lib_init(void); | 71 | int tfrc_lib_init(void); |
| 72 | extern void tfrc_lib_exit(void); | 72 | void tfrc_lib_exit(void); |
| 73 | #else | 73 | #else |
| 74 | #define tfrc_lib_init() (0) | 74 | #define tfrc_lib_init() (0) |
| 75 | #define tfrc_lib_exit() | 75 | #define tfrc_lib_exit() |
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 708e75bf623d..30948784dd58 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h | |||
| @@ -53,7 +53,7 @@ extern struct inet_hashinfo dccp_hashinfo; | |||
| 53 | 53 | ||
| 54 | extern struct percpu_counter dccp_orphan_count; | 54 | extern struct percpu_counter dccp_orphan_count; |
| 55 | 55 | ||
| 56 | extern void dccp_time_wait(struct sock *sk, int state, int timeo); | 56 | void dccp_time_wait(struct sock *sk, int state, int timeo); |
| 57 | 57 | ||
| 58 | /* | 58 | /* |
| 59 | * Set safe upper bounds for header and option length. Since Data Offset is 8 | 59 | * Set safe upper bounds for header and option length. Since Data Offset is 8 |
| @@ -224,114 +224,108 @@ static inline void dccp_csum_outgoing(struct sk_buff *skb) | |||
| 224 | skb->csum = skb_checksum(skb, 0, (cov > skb->len)? skb->len : cov, 0); | 224 | skb->csum = skb_checksum(skb, 0, (cov > skb->len)? skb->len : cov, 0); |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | extern void dccp_v4_send_check(struct sock *sk, struct sk_buff *skb); | 227 | void dccp_v4_send_check(struct sock *sk, struct sk_buff *skb); |
| 228 | 228 | ||
| 229 | extern int dccp_retransmit_skb(struct sock *sk); | 229 | int dccp_retransmit_skb(struct sock *sk); |
| 230 | 230 | ||
| 231 | extern void dccp_send_ack(struct sock *sk); | 231 | void dccp_send_ack(struct sock *sk); |
| 232 | extern void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb, | 232 | void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb, |
| 233 | struct request_sock *rsk); | 233 | struct request_sock *rsk); |
| 234 | 234 | ||
| 235 | extern void dccp_send_sync(struct sock *sk, const u64 seq, | 235 | void dccp_send_sync(struct sock *sk, const u64 seq, |
| 236 | const enum dccp_pkt_type pkt_type); | 236 | const enum dccp_pkt_type pkt_type); |
| 237 | 237 | ||
| 238 | /* | 238 | /* |
| 239 | * TX Packet Dequeueing Interface | 239 | * TX Packet Dequeueing Interface |
| 240 | */ | 240 | */ |
| 241 | extern void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb); | 241 | void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb); |
| 242 | extern bool dccp_qpolicy_full(struct sock *sk); | 242 | bool dccp_qpolicy_full(struct sock *sk); |
| 243 | extern void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb); | 243 | void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb); |
| 244 | extern struct sk_buff *dccp_qpolicy_top(struct sock *sk); | 244 | struct sk_buff *dccp_qpolicy_top(struct sock *sk); |
| 245 | extern struct sk_buff *dccp_qpolicy_pop(struct sock *sk); | 245 | struct sk_buff *dccp_qpolicy_pop(struct sock *sk); |
| 246 | extern bool dccp_qpolicy_param_ok(struct sock *sk, __be32 param); | 246 | bool dccp_qpolicy_param_ok(struct sock *sk, __be32 param); |
| 247 | 247 | ||
| 248 | /* | 248 | /* |
| 249 | * TX Packet Output and TX Timers | 249 | * TX Packet Output and TX Timers |
| 250 | */ | 250 | */ |
| 251 | extern void dccp_write_xmit(struct sock *sk); | 251 | void dccp_write_xmit(struct sock *sk); |
| 252 | extern void dccp_write_space(struct sock *sk); | 252 | void dccp_write_space(struct sock *sk); |
| 253 | extern void dccp_flush_write_queue(struct sock *sk, long *time_budget); | 253 | void dccp_flush_write_queue(struct sock *sk, long *time_budget); |
| 254 | 254 | ||
| 255 | extern void dccp_init_xmit_timers(struct sock *sk); | 255 | void dccp_init_xmit_timers(struct sock *sk); |
| 256 | static inline void dccp_clear_xmit_timers(struct sock *sk) | 256 | static inline void dccp_clear_xmit_timers(struct sock *sk) |
| 257 | { | 257 | { |
| 258 | inet_csk_clear_xmit_timers(sk); | 258 | inet_csk_clear_xmit_timers(sk); |
| 259 | } | 259 | } |
| 260 | 260 | ||
| 261 | extern unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu); | 261 | unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu); |
| 262 | 262 | ||
| 263 | extern const char *dccp_packet_name(const int type); | 263 | const char *dccp_packet_name(const int type); |
| 264 | 264 | ||
| 265 | extern void dccp_set_state(struct sock *sk, const int state); | 265 | void dccp_set_state(struct sock *sk, const int state); |
| 266 | extern void dccp_done(struct sock *sk); | 266 | void dccp_done(struct sock *sk); |
| 267 | 267 | ||
| 268 | extern int dccp_reqsk_init(struct request_sock *rq, struct dccp_sock const *dp, | 268 | int dccp_reqsk_init(struct request_sock *rq, struct dccp_sock const *dp, |
| 269 | struct sk_buff const *skb); | 269 | struct sk_buff const *skb); |
| 270 | 270 | ||
| 271 | extern int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb); | 271 | int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb); |
| 272 | 272 | ||
| 273 | extern struct sock *dccp_create_openreq_child(struct sock *sk, | 273 | struct sock *dccp_create_openreq_child(struct sock *sk, |
| 274 | const struct request_sock *req, | 274 | const struct request_sock *req, |
| 275 | const struct sk_buff *skb); | 275 | const struct sk_buff *skb); |
| 276 | 276 | ||
| 277 | extern int dccp_v4_do_rcv(struct sock *sk, struct sk_buff *skb); | 277 | int dccp_v4_do_rcv(struct sock *sk, struct sk_buff *skb); |
| 278 | 278 | ||
| 279 | extern struct sock *dccp_v4_request_recv_sock(struct sock *sk, | 279 | struct sock *dccp_v4_request_recv_sock(struct sock *sk, struct sk_buff *skb, |
| 280 | struct sk_buff *skb, | 280 | struct request_sock *req, |
| 281 | struct request_sock *req, | 281 | struct dst_entry *dst); |
| 282 | struct dst_entry *dst); | 282 | struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, |
| 283 | extern struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, | 283 | struct request_sock *req, |
| 284 | struct request_sock *req, | 284 | struct request_sock **prev); |
| 285 | struct request_sock **prev); | ||
| 286 | 285 | ||
| 287 | extern int dccp_child_process(struct sock *parent, struct sock *child, | 286 | int dccp_child_process(struct sock *parent, struct sock *child, |
| 288 | struct sk_buff *skb); | 287 | struct sk_buff *skb); |
| 289 | extern int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | 288 | int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, |
| 290 | struct dccp_hdr *dh, unsigned int len); | 289 | struct dccp_hdr *dh, unsigned int len); |
| 291 | extern int dccp_rcv_established(struct sock *sk, struct sk_buff *skb, | 290 | int dccp_rcv_established(struct sock *sk, struct sk_buff *skb, |
| 292 | const struct dccp_hdr *dh, const unsigned int len); | 291 | const struct dccp_hdr *dh, const unsigned int len); |
| 293 | 292 | ||
| 294 | extern int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized); | 293 | int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized); |
| 295 | extern void dccp_destroy_sock(struct sock *sk); | 294 | void dccp_destroy_sock(struct sock *sk); |
| 296 | 295 | ||
| 297 | extern void dccp_close(struct sock *sk, long timeout); | 296 | void dccp_close(struct sock *sk, long timeout); |
| 298 | extern struct sk_buff *dccp_make_response(struct sock *sk, | 297 | struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst, |
| 299 | struct dst_entry *dst, | 298 | struct request_sock *req); |
| 300 | struct request_sock *req); | ||
| 301 | 299 | ||
| 302 | extern int dccp_connect(struct sock *sk); | 300 | int dccp_connect(struct sock *sk); |
| 303 | extern int dccp_disconnect(struct sock *sk, int flags); | 301 | int dccp_disconnect(struct sock *sk, int flags); |
| 304 | extern int dccp_getsockopt(struct sock *sk, int level, int optname, | 302 | int dccp_getsockopt(struct sock *sk, int level, int optname, |
| 305 | char __user *optval, int __user *optlen); | 303 | char __user *optval, int __user *optlen); |
| 306 | extern int dccp_setsockopt(struct sock *sk, int level, int optname, | 304 | int dccp_setsockopt(struct sock *sk, int level, int optname, |
| 307 | char __user *optval, unsigned int optlen); | 305 | char __user *optval, unsigned int optlen); |
| 308 | #ifdef CONFIG_COMPAT | 306 | #ifdef CONFIG_COMPAT |
| 309 | extern int compat_dccp_getsockopt(struct sock *sk, | 307 | int compat_dccp_getsockopt(struct sock *sk, int level, int optname, |
| 310 | int level, int optname, | 308 | char __user *optval, int __user *optlen); |
| 311 | char __user *optval, int __user *optlen); | 309 | int compat_dccp_setsockopt(struct sock *sk, int level, int optname, |
| 312 | extern int compat_dccp_setsockopt(struct sock *sk, | 310 | char __user *optval, unsigned int optlen); |
| 313 | int level, int optname, | ||
| 314 | char __user *optval, unsigned int optlen); | ||
| 315 | #endif | 311 | #endif |
| 316 | extern int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 312 | int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
| 317 | extern int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, | 313 | int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, |
| 318 | struct msghdr *msg, size_t size); | 314 | size_t size); |
| 319 | extern int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, | 315 | int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, |
| 320 | struct msghdr *msg, size_t len, int nonblock, | 316 | struct msghdr *msg, size_t len, int nonblock, int flags, |
| 321 | int flags, int *addr_len); | 317 | int *addr_len); |
| 322 | extern void dccp_shutdown(struct sock *sk, int how); | 318 | void dccp_shutdown(struct sock *sk, int how); |
| 323 | extern int inet_dccp_listen(struct socket *sock, int backlog); | 319 | int inet_dccp_listen(struct socket *sock, int backlog); |
| 324 | extern unsigned int dccp_poll(struct file *file, struct socket *sock, | 320 | unsigned int dccp_poll(struct file *file, struct socket *sock, |
| 325 | poll_table *wait); | 321 | poll_table *wait); |
| 326 | extern int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, | 322 | int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len); |
| 327 | int addr_len); | 323 | |
| 328 | 324 | struct sk_buff *dccp_ctl_make_reset(struct sock *sk, struct sk_buff *skb); | |
| 329 | extern struct sk_buff *dccp_ctl_make_reset(struct sock *sk, | 325 | int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code); |
| 330 | struct sk_buff *skb); | 326 | void dccp_send_close(struct sock *sk, const int active); |
| 331 | extern int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code); | 327 | int dccp_invalid_packet(struct sk_buff *skb); |
| 332 | extern void dccp_send_close(struct sock *sk, const int active); | 328 | u32 dccp_sample_rtt(struct sock *sk, long delta); |
| 333 | extern int dccp_invalid_packet(struct sk_buff *skb); | ||
| 334 | extern u32 dccp_sample_rtt(struct sock *sk, long delta); | ||
| 335 | 329 | ||
| 336 | static inline int dccp_bad_service_code(const struct sock *sk, | 330 | static inline int dccp_bad_service_code(const struct sock *sk, |
| 337 | const __be32 service) | 331 | const __be32 service) |
| @@ -475,25 +469,25 @@ static inline int dccp_ack_pending(const struct sock *sk) | |||
| 475 | return dccp_ackvec_pending(sk) || inet_csk_ack_scheduled(sk); | 469 | return dccp_ackvec_pending(sk) || inet_csk_ack_scheduled(sk); |
| 476 | } | 470 | } |
| 477 | 471 | ||
| 478 | extern int dccp_feat_signal_nn_change(struct sock *sk, u8 feat, u64 nn_val); | 472 | int dccp_feat_signal_nn_change(struct sock *sk, u8 feat, u64 nn_val); |
| 479 | extern int dccp_feat_finalise_settings(struct dccp_sock *dp); | 473 | int dccp_feat_finalise_settings(struct dccp_sock *dp); |
| 480 | extern int dccp_feat_server_ccid_dependencies(struct dccp_request_sock *dreq); | 474 | int dccp_feat_server_ccid_dependencies(struct dccp_request_sock *dreq); |
| 481 | extern int dccp_feat_insert_opts(struct dccp_sock*, struct dccp_request_sock*, | 475 | int dccp_feat_insert_opts(struct dccp_sock*, struct dccp_request_sock*, |
| 482 | struct sk_buff *skb); | 476 | struct sk_buff *skb); |
| 483 | extern int dccp_feat_activate_values(struct sock *sk, struct list_head *fn); | 477 | int dccp_feat_activate_values(struct sock *sk, struct list_head *fn); |
| 484 | extern void dccp_feat_list_purge(struct list_head *fn_list); | 478 | void dccp_feat_list_purge(struct list_head *fn_list); |
| 485 | 479 | ||
| 486 | extern int dccp_insert_options(struct sock *sk, struct sk_buff *skb); | 480 | int dccp_insert_options(struct sock *sk, struct sk_buff *skb); |
| 487 | extern int dccp_insert_options_rsk(struct dccp_request_sock*, struct sk_buff*); | 481 | int dccp_insert_options_rsk(struct dccp_request_sock *, struct sk_buff *); |
| 488 | extern int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed); | 482 | int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed); |
| 489 | extern u32 dccp_timestamp(void); | 483 | u32 dccp_timestamp(void); |
| 490 | extern void dccp_timestamping_init(void); | 484 | void dccp_timestamping_init(void); |
| 491 | extern int dccp_insert_option(struct sk_buff *skb, unsigned char option, | 485 | int dccp_insert_option(struct sk_buff *skb, unsigned char option, |
| 492 | const void *value, unsigned char len); | 486 | const void *value, unsigned char len); |
| 493 | 487 | ||
| 494 | #ifdef CONFIG_SYSCTL | 488 | #ifdef CONFIG_SYSCTL |
| 495 | extern int dccp_sysctl_init(void); | 489 | int dccp_sysctl_init(void); |
| 496 | extern void dccp_sysctl_exit(void); | 490 | void dccp_sysctl_exit(void); |
| 497 | #else | 491 | #else |
| 498 | static inline int dccp_sysctl_init(void) | 492 | static inline int dccp_sysctl_init(void) |
| 499 | { | 493 | { |
diff --git a/net/dccp/feat.h b/net/dccp/feat.h index 90b957d34d26..0e75cebb2187 100644 --- a/net/dccp/feat.h +++ b/net/dccp/feat.h | |||
| @@ -107,13 +107,13 @@ extern unsigned long sysctl_dccp_sequence_window; | |||
| 107 | extern int sysctl_dccp_rx_ccid; | 107 | extern int sysctl_dccp_rx_ccid; |
| 108 | extern int sysctl_dccp_tx_ccid; | 108 | extern int sysctl_dccp_tx_ccid; |
| 109 | 109 | ||
| 110 | extern int dccp_feat_init(struct sock *sk); | 110 | int dccp_feat_init(struct sock *sk); |
| 111 | extern void dccp_feat_initialise_sysctls(void); | 111 | void dccp_feat_initialise_sysctls(void); |
| 112 | extern int dccp_feat_register_sp(struct sock *sk, u8 feat, u8 is_local, | 112 | int dccp_feat_register_sp(struct sock *sk, u8 feat, u8 is_local, |
| 113 | u8 const *list, u8 len); | 113 | u8 const *list, u8 len); |
| 114 | extern int dccp_feat_parse_options(struct sock *, struct dccp_request_sock *, | 114 | int dccp_feat_parse_options(struct sock *, struct dccp_request_sock *, |
| 115 | u8 mand, u8 opt, u8 feat, u8 *val, u8 len); | 115 | u8 mand, u8 opt, u8 feat, u8 *val, u8 len); |
| 116 | extern int dccp_feat_clone_list(struct list_head const *, struct list_head *); | 116 | int dccp_feat_clone_list(struct list_head const *, struct list_head *); |
| 117 | 117 | ||
| 118 | /* | 118 | /* |
| 119 | * Encoding variable-length options and their maximum length. | 119 | * Encoding variable-length options and their maximum length. |
| @@ -127,11 +127,11 @@ extern int dccp_feat_clone_list(struct list_head const *, struct list_head *); | |||
| 127 | */ | 127 | */ |
| 128 | #define DCCP_OPTVAL_MAXLEN 6 | 128 | #define DCCP_OPTVAL_MAXLEN 6 |
| 129 | 129 | ||
| 130 | extern void dccp_encode_value_var(const u64 value, u8 *to, const u8 len); | 130 | void dccp_encode_value_var(const u64 value, u8 *to, const u8 len); |
| 131 | extern u64 dccp_decode_value_var(const u8 *bf, const u8 len); | 131 | u64 dccp_decode_value_var(const u8 *bf, const u8 len); |
| 132 | extern u64 dccp_feat_nn_get(struct sock *sk, u8 feat); | 132 | u64 dccp_feat_nn_get(struct sock *sk, u8 feat); |
| 133 | 133 | ||
| 134 | extern int dccp_insert_option_mandatory(struct sk_buff *skb); | 134 | int dccp_insert_option_mandatory(struct sk_buff *skb); |
| 135 | extern int dccp_insert_fn_opt(struct sk_buff *skb, u8 type, u8 feat, | 135 | int dccp_insert_fn_opt(struct sk_buff *skb, u8 type, u8 feat, u8 *val, u8 len, |
| 136 | u8 *val, u8 len, bool repeat_first); | 136 | bool repeat_first); |
| 137 | #endif /* _DCCP_FEAT_H */ | 137 | #endif /* _DCCP_FEAT_H */ |
