aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/dccp.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-10-18 16:48:23 -0400
committerDavid S. Miller <davem@davemloft.net>2013-10-19 19:12:11 -0400
commita402a5aa9b4cbb42cc41bf573d2e5c4713541af0 (patch)
treeb00fd8bc04ef28bf384c21641d1a634b77e8c29d /net/dccp/dccp.h
parent348662a1429f95ed2d488c939c324ec152638742 (diff)
net: dccp: Remove extern from function prototypes
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/dccp.h')
-rw-r--r--net/dccp/dccp.h186
1 files changed, 90 insertions, 96 deletions
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
54extern struct percpu_counter dccp_orphan_count; 54extern struct percpu_counter dccp_orphan_count;
55 55
56extern void dccp_time_wait(struct sock *sk, int state, int timeo); 56void 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
227extern void dccp_v4_send_check(struct sock *sk, struct sk_buff *skb); 227void dccp_v4_send_check(struct sock *sk, struct sk_buff *skb);
228 228
229extern int dccp_retransmit_skb(struct sock *sk); 229int dccp_retransmit_skb(struct sock *sk);
230 230
231extern void dccp_send_ack(struct sock *sk); 231void dccp_send_ack(struct sock *sk);
232extern void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb, 232void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
233 struct request_sock *rsk); 233 struct request_sock *rsk);
234 234
235extern void dccp_send_sync(struct sock *sk, const u64 seq, 235void 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 */
241extern void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb); 241void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb);
242extern bool dccp_qpolicy_full(struct sock *sk); 242bool dccp_qpolicy_full(struct sock *sk);
243extern void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb); 243void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb);
244extern struct sk_buff *dccp_qpolicy_top(struct sock *sk); 244struct sk_buff *dccp_qpolicy_top(struct sock *sk);
245extern struct sk_buff *dccp_qpolicy_pop(struct sock *sk); 245struct sk_buff *dccp_qpolicy_pop(struct sock *sk);
246extern bool dccp_qpolicy_param_ok(struct sock *sk, __be32 param); 246bool 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 */
251extern void dccp_write_xmit(struct sock *sk); 251void dccp_write_xmit(struct sock *sk);
252extern void dccp_write_space(struct sock *sk); 252void dccp_write_space(struct sock *sk);
253extern void dccp_flush_write_queue(struct sock *sk, long *time_budget); 253void dccp_flush_write_queue(struct sock *sk, long *time_budget);
254 254
255extern void dccp_init_xmit_timers(struct sock *sk); 255void dccp_init_xmit_timers(struct sock *sk);
256static inline void dccp_clear_xmit_timers(struct sock *sk) 256static 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
261extern unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu); 261unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu);
262 262
263extern const char *dccp_packet_name(const int type); 263const char *dccp_packet_name(const int type);
264 264
265extern void dccp_set_state(struct sock *sk, const int state); 265void dccp_set_state(struct sock *sk, const int state);
266extern void dccp_done(struct sock *sk); 266void dccp_done(struct sock *sk);
267 267
268extern int dccp_reqsk_init(struct request_sock *rq, struct dccp_sock const *dp, 268int 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
271extern int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb); 271int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb);
272 272
273extern struct sock *dccp_create_openreq_child(struct sock *sk, 273struct 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
277extern int dccp_v4_do_rcv(struct sock *sk, struct sk_buff *skb); 277int dccp_v4_do_rcv(struct sock *sk, struct sk_buff *skb);
278 278
279extern struct sock *dccp_v4_request_recv_sock(struct sock *sk, 279struct 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); 282struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb,
283extern 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
287extern int dccp_child_process(struct sock *parent, struct sock *child, 286int dccp_child_process(struct sock *parent, struct sock *child,
288 struct sk_buff *skb); 287 struct sk_buff *skb);
289extern int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, 288int 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);
291extern int dccp_rcv_established(struct sock *sk, struct sk_buff *skb, 290int 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
294extern int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized); 293int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized);
295extern void dccp_destroy_sock(struct sock *sk); 294void dccp_destroy_sock(struct sock *sk);
296 295
297extern void dccp_close(struct sock *sk, long timeout); 296void dccp_close(struct sock *sk, long timeout);
298extern struct sk_buff *dccp_make_response(struct sock *sk, 297struct 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
302extern int dccp_connect(struct sock *sk); 300int dccp_connect(struct sock *sk);
303extern int dccp_disconnect(struct sock *sk, int flags); 301int dccp_disconnect(struct sock *sk, int flags);
304extern int dccp_getsockopt(struct sock *sk, int level, int optname, 302int dccp_getsockopt(struct sock *sk, int level, int optname,
305 char __user *optval, int __user *optlen); 303 char __user *optval, int __user *optlen);
306extern int dccp_setsockopt(struct sock *sk, int level, int optname, 304int 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
309extern int compat_dccp_getsockopt(struct sock *sk, 307int 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); 309int compat_dccp_setsockopt(struct sock *sk, int level, int optname,
312extern 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
316extern int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg); 312int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg);
317extern int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, 313int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
318 struct msghdr *msg, size_t size); 314 size_t size);
319extern int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, 315int 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);
322extern void dccp_shutdown(struct sock *sk, int how); 318void dccp_shutdown(struct sock *sk, int how);
323extern int inet_dccp_listen(struct socket *sock, int backlog); 319int inet_dccp_listen(struct socket *sock, int backlog);
324extern unsigned int dccp_poll(struct file *file, struct socket *sock, 320unsigned int dccp_poll(struct file *file, struct socket *sock,
325 poll_table *wait); 321 poll_table *wait);
326extern int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, 322int dccp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
327 int addr_len); 323
328 324struct sk_buff *dccp_ctl_make_reset(struct sock *sk, struct sk_buff *skb);
329extern struct sk_buff *dccp_ctl_make_reset(struct sock *sk, 325int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code);
330 struct sk_buff *skb); 326void dccp_send_close(struct sock *sk, const int active);
331extern int dccp_send_reset(struct sock *sk, enum dccp_reset_codes code); 327int dccp_invalid_packet(struct sk_buff *skb);
332extern void dccp_send_close(struct sock *sk, const int active); 328u32 dccp_sample_rtt(struct sock *sk, long delta);
333extern int dccp_invalid_packet(struct sk_buff *skb);
334extern u32 dccp_sample_rtt(struct sock *sk, long delta);
335 329
336static inline int dccp_bad_service_code(const struct sock *sk, 330static 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
478extern int dccp_feat_signal_nn_change(struct sock *sk, u8 feat, u64 nn_val); 472int dccp_feat_signal_nn_change(struct sock *sk, u8 feat, u64 nn_val);
479extern int dccp_feat_finalise_settings(struct dccp_sock *dp); 473int dccp_feat_finalise_settings(struct dccp_sock *dp);
480extern int dccp_feat_server_ccid_dependencies(struct dccp_request_sock *dreq); 474int dccp_feat_server_ccid_dependencies(struct dccp_request_sock *dreq);
481extern int dccp_feat_insert_opts(struct dccp_sock*, struct dccp_request_sock*, 475int dccp_feat_insert_opts(struct dccp_sock*, struct dccp_request_sock*,
482 struct sk_buff *skb); 476 struct sk_buff *skb);
483extern int dccp_feat_activate_values(struct sock *sk, struct list_head *fn); 477int dccp_feat_activate_values(struct sock *sk, struct list_head *fn);
484extern void dccp_feat_list_purge(struct list_head *fn_list); 478void dccp_feat_list_purge(struct list_head *fn_list);
485 479
486extern int dccp_insert_options(struct sock *sk, struct sk_buff *skb); 480int dccp_insert_options(struct sock *sk, struct sk_buff *skb);
487extern int dccp_insert_options_rsk(struct dccp_request_sock*, struct sk_buff*); 481int dccp_insert_options_rsk(struct dccp_request_sock *, struct sk_buff *);
488extern int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed); 482int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed);
489extern u32 dccp_timestamp(void); 483u32 dccp_timestamp(void);
490extern void dccp_timestamping_init(void); 484void dccp_timestamping_init(void);
491extern int dccp_insert_option(struct sk_buff *skb, unsigned char option, 485int 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
495extern int dccp_sysctl_init(void); 489int dccp_sysctl_init(void);
496extern void dccp_sysctl_exit(void); 490void dccp_sysctl_exit(void);
497#else 491#else
498static inline int dccp_sysctl_init(void) 492static inline int dccp_sysctl_init(void)
499{ 493{