aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ax25.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-07-31 20:31:36 -0400
committerDavid S. Miller <davem@davemloft.net>2013-07-31 20:50:02 -0400
commitc1d8f8041cd0357643d5d051d1425a17b75e9d2c (patch)
tree5bcf385570acf57361b3a5dab97a7008bedd94ca /include/net/ax25.h
parent90972b22116bc22181717517ad5b0c7043edb178 (diff)
ax25.h: 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. Reflow modified prototypes to 80 columns. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ax25.h')
-rw-r--r--include/net/ax25.h215
1 files changed, 109 insertions, 106 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 89ed9ac5701f..bf0396e9a5d3 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -195,7 +195,7 @@ static inline void ax25_hold_route(ax25_route *ax25_rt)
195 atomic_inc(&ax25_rt->refcount); 195 atomic_inc(&ax25_rt->refcount);
196} 196}
197 197
198extern void __ax25_put_route(ax25_route *ax25_rt); 198void __ax25_put_route(ax25_route *ax25_rt);
199 199
200static inline void ax25_put_route(ax25_route *ax25_rt) 200static inline void ax25_put_route(ax25_route *ax25_rt)
201{ 201{
@@ -272,30 +272,31 @@ static inline __be16 ax25_type_trans(struct sk_buff *skb, struct net_device *dev
272/* af_ax25.c */ 272/* af_ax25.c */
273extern struct hlist_head ax25_list; 273extern struct hlist_head ax25_list;
274extern spinlock_t ax25_list_lock; 274extern spinlock_t ax25_list_lock;
275extern void ax25_cb_add(ax25_cb *); 275void ax25_cb_add(ax25_cb *);
276struct sock *ax25_find_listener(ax25_address *, int, struct net_device *, int); 276struct sock *ax25_find_listener(ax25_address *, int, struct net_device *, int);
277struct sock *ax25_get_socket(ax25_address *, ax25_address *, int); 277struct sock *ax25_get_socket(ax25_address *, ax25_address *, int);
278extern ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, struct net_device *); 278ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *,
279extern void ax25_send_to_raw(ax25_address *, struct sk_buff *, int); 279 struct net_device *);
280extern void ax25_destroy_socket(ax25_cb *); 280void ax25_send_to_raw(ax25_address *, struct sk_buff *, int);
281extern ax25_cb * __must_check ax25_create_cb(void); 281void ax25_destroy_socket(ax25_cb *);
282extern void ax25_fillin_cb(ax25_cb *, ax25_dev *); 282ax25_cb * __must_check ax25_create_cb(void);
283extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *); 283void ax25_fillin_cb(ax25_cb *, ax25_dev *);
284struct sock *ax25_make_new(struct sock *, struct ax25_dev *);
284 285
285/* ax25_addr.c */ 286/* ax25_addr.c */
286extern const ax25_address ax25_bcast; 287extern const ax25_address ax25_bcast;
287extern const ax25_address ax25_defaddr; 288extern const ax25_address ax25_defaddr;
288extern const ax25_address null_ax25_address; 289extern const ax25_address null_ax25_address;
289extern char *ax2asc(char *buf, const ax25_address *); 290char *ax2asc(char *buf, const ax25_address *);
290extern void asc2ax(ax25_address *addr, const char *callsign); 291void asc2ax(ax25_address *addr, const char *callsign);
291extern int ax25cmp(const ax25_address *, const ax25_address *); 292int ax25cmp(const ax25_address *, const ax25_address *);
292extern int ax25digicmp(const ax25_digi *, const ax25_digi *); 293int ax25digicmp(const ax25_digi *, const ax25_digi *);
293extern const unsigned char *ax25_addr_parse(const unsigned char *, int, 294const unsigned char *ax25_addr_parse(const unsigned char *, int,
294 ax25_address *, ax25_address *, ax25_digi *, int *, int *); 295 ax25_address *, ax25_address *, ax25_digi *, int *, int *);
295extern int ax25_addr_build(unsigned char *, const ax25_address *, 296int ax25_addr_build(unsigned char *, const ax25_address *,
296 const ax25_address *, const ax25_digi *, int, int); 297 const ax25_address *, const ax25_digi *, int, int);
297extern int ax25_addr_size(const ax25_digi *); 298int ax25_addr_size(const ax25_digi *);
298extern void ax25_digi_invert(const ax25_digi *, ax25_digi *); 299void ax25_digi_invert(const ax25_digi *, ax25_digi *);
299 300
300/* ax25_dev.c */ 301/* ax25_dev.c */
301extern ax25_dev *ax25_dev_list; 302extern ax25_dev *ax25_dev_list;
@@ -306,33 +307,33 @@ static inline ax25_dev *ax25_dev_ax25dev(struct net_device *dev)
306 return dev->ax25_ptr; 307 return dev->ax25_ptr;
307} 308}
308 309
309extern ax25_dev *ax25_addr_ax25dev(ax25_address *); 310ax25_dev *ax25_addr_ax25dev(ax25_address *);
310extern void ax25_dev_device_up(struct net_device *); 311void ax25_dev_device_up(struct net_device *);
311extern void ax25_dev_device_down(struct net_device *); 312void ax25_dev_device_down(struct net_device *);
312extern int ax25_fwd_ioctl(unsigned int, struct ax25_fwd_struct *); 313int ax25_fwd_ioctl(unsigned int, struct ax25_fwd_struct *);
313extern struct net_device *ax25_fwd_dev(struct net_device *); 314struct net_device *ax25_fwd_dev(struct net_device *);
314extern void ax25_dev_free(void); 315void ax25_dev_free(void);
315 316
316/* ax25_ds_in.c */ 317/* ax25_ds_in.c */
317extern int ax25_ds_frame_in(ax25_cb *, struct sk_buff *, int); 318int ax25_ds_frame_in(ax25_cb *, struct sk_buff *, int);
318 319
319/* ax25_ds_subr.c */ 320/* ax25_ds_subr.c */
320extern void ax25_ds_nr_error_recovery(ax25_cb *); 321void ax25_ds_nr_error_recovery(ax25_cb *);
321extern void ax25_ds_enquiry_response(ax25_cb *); 322void ax25_ds_enquiry_response(ax25_cb *);
322extern void ax25_ds_establish_data_link(ax25_cb *); 323void ax25_ds_establish_data_link(ax25_cb *);
323extern void ax25_dev_dama_off(ax25_dev *); 324void ax25_dev_dama_off(ax25_dev *);
324extern void ax25_dama_on(ax25_cb *); 325void ax25_dama_on(ax25_cb *);
325extern void ax25_dama_off(ax25_cb *); 326void ax25_dama_off(ax25_cb *);
326 327
327/* ax25_ds_timer.c */ 328/* ax25_ds_timer.c */
328extern void ax25_ds_setup_timer(ax25_dev *); 329void ax25_ds_setup_timer(ax25_dev *);
329extern void ax25_ds_set_timer(ax25_dev *); 330void ax25_ds_set_timer(ax25_dev *);
330extern void ax25_ds_del_timer(ax25_dev *); 331void ax25_ds_del_timer(ax25_dev *);
331extern void ax25_ds_timer(ax25_cb *); 332void ax25_ds_timer(ax25_cb *);
332extern void ax25_ds_t1_timeout(ax25_cb *); 333void ax25_ds_t1_timeout(ax25_cb *);
333extern void ax25_ds_heartbeat_expiry(ax25_cb *); 334void ax25_ds_heartbeat_expiry(ax25_cb *);
334extern void ax25_ds_t3timer_expiry(ax25_cb *); 335void ax25_ds_t3timer_expiry(ax25_cb *);
335extern void ax25_ds_idletimer_expiry(ax25_cb *); 336void ax25_ds_idletimer_expiry(ax25_cb *);
336 337
337/* ax25_iface.c */ 338/* ax25_iface.c */
338 339
@@ -342,107 +343,109 @@ struct ax25_protocol {
342 int (*func)(struct sk_buff *, ax25_cb *); 343 int (*func)(struct sk_buff *, ax25_cb *);
343}; 344};
344 345
345extern void ax25_register_pid(struct ax25_protocol *ap); 346void ax25_register_pid(struct ax25_protocol *ap);
346extern void ax25_protocol_release(unsigned int); 347void ax25_protocol_release(unsigned int);
347 348
348struct ax25_linkfail { 349struct ax25_linkfail {
349 struct hlist_node lf_node; 350 struct hlist_node lf_node;
350 void (*func)(ax25_cb *, int); 351 void (*func)(ax25_cb *, int);
351}; 352};
352 353
353extern void ax25_linkfail_register(struct ax25_linkfail *lf); 354void ax25_linkfail_register(struct ax25_linkfail *lf);
354extern void ax25_linkfail_release(struct ax25_linkfail *lf); 355void ax25_linkfail_release(struct ax25_linkfail *lf);
355extern int __must_check ax25_listen_register(ax25_address *, 356int __must_check ax25_listen_register(ax25_address *, struct net_device *);
356 struct net_device *); 357void ax25_listen_release(ax25_address *, struct net_device *);
357extern void ax25_listen_release(ax25_address *, struct net_device *); 358int(*ax25_protocol_function(unsigned int))(struct sk_buff *, ax25_cb *);
358extern int (*ax25_protocol_function(unsigned int))(struct sk_buff *, ax25_cb *); 359int ax25_listen_mine(ax25_address *, struct net_device *);
359extern int ax25_listen_mine(ax25_address *, struct net_device *); 360void ax25_link_failed(ax25_cb *, int);
360extern void ax25_link_failed(ax25_cb *, int); 361int ax25_protocol_is_registered(unsigned int);
361extern int ax25_protocol_is_registered(unsigned int);
362 362
363/* ax25_in.c */ 363/* ax25_in.c */
364extern int ax25_rx_iframe(ax25_cb *, struct sk_buff *); 364int ax25_rx_iframe(ax25_cb *, struct sk_buff *);
365extern int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); 365int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *,
366 struct net_device *);
366 367
367/* ax25_ip.c */ 368/* ax25_ip.c */
368extern int ax25_hard_header(struct sk_buff *, struct net_device *, 369int ax25_hard_header(struct sk_buff *, struct net_device *, unsigned short,
369 unsigned short, const void *, 370 const void *, const void *, unsigned int);
370 const void *, unsigned int); 371int ax25_rebuild_header(struct sk_buff *);
371extern int ax25_rebuild_header(struct sk_buff *);
372extern const struct header_ops ax25_header_ops; 372extern const struct header_ops ax25_header_ops;
373 373
374/* ax25_out.c */ 374/* ax25_out.c */
375extern ax25_cb *ax25_send_frame(struct sk_buff *, int, ax25_address *, ax25_address *, ax25_digi *, struct net_device *); 375ax25_cb *ax25_send_frame(struct sk_buff *, int, ax25_address *, ax25_address *,
376extern void ax25_output(ax25_cb *, int, struct sk_buff *); 376 ax25_digi *, struct net_device *);
377extern void ax25_kick(ax25_cb *); 377void ax25_output(ax25_cb *, int, struct sk_buff *);
378extern void ax25_transmit_buffer(ax25_cb *, struct sk_buff *, int); 378void ax25_kick(ax25_cb *);
379extern void ax25_queue_xmit(struct sk_buff *skb, struct net_device *dev); 379void ax25_transmit_buffer(ax25_cb *, struct sk_buff *, int);
380extern int ax25_check_iframes_acked(ax25_cb *, unsigned short); 380void ax25_queue_xmit(struct sk_buff *skb, struct net_device *dev);
381int ax25_check_iframes_acked(ax25_cb *, unsigned short);
381 382
382/* ax25_route.c */ 383/* ax25_route.c */
383extern void ax25_rt_device_down(struct net_device *); 384void ax25_rt_device_down(struct net_device *);
384extern int ax25_rt_ioctl(unsigned int, void __user *); 385int ax25_rt_ioctl(unsigned int, void __user *);
385extern const struct file_operations ax25_route_fops; 386extern const struct file_operations ax25_route_fops;
386extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); 387ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev);
387extern int ax25_rt_autobind(ax25_cb *, ax25_address *); 388int ax25_rt_autobind(ax25_cb *, ax25_address *);
388extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); 389struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *,
389extern void ax25_rt_free(void); 390 ax25_address *, ax25_digi *);
391void ax25_rt_free(void);
390 392
391/* ax25_std_in.c */ 393/* ax25_std_in.c */
392extern int ax25_std_frame_in(ax25_cb *, struct sk_buff *, int); 394int ax25_std_frame_in(ax25_cb *, struct sk_buff *, int);
393 395
394/* ax25_std_subr.c */ 396/* ax25_std_subr.c */
395extern void ax25_std_nr_error_recovery(ax25_cb *); 397void ax25_std_nr_error_recovery(ax25_cb *);
396extern void ax25_std_establish_data_link(ax25_cb *); 398void ax25_std_establish_data_link(ax25_cb *);
397extern void ax25_std_transmit_enquiry(ax25_cb *); 399void ax25_std_transmit_enquiry(ax25_cb *);
398extern void ax25_std_enquiry_response(ax25_cb *); 400void ax25_std_enquiry_response(ax25_cb *);
399extern void ax25_std_timeout_response(ax25_cb *); 401void ax25_std_timeout_response(ax25_cb *);
400 402
401/* ax25_std_timer.c */ 403/* ax25_std_timer.c */
402extern void ax25_std_heartbeat_expiry(ax25_cb *); 404void ax25_std_heartbeat_expiry(ax25_cb *);
403extern void ax25_std_t1timer_expiry(ax25_cb *); 405void ax25_std_t1timer_expiry(ax25_cb *);
404extern void ax25_std_t2timer_expiry(ax25_cb *); 406void ax25_std_t2timer_expiry(ax25_cb *);
405extern void ax25_std_t3timer_expiry(ax25_cb *); 407void ax25_std_t3timer_expiry(ax25_cb *);
406extern void ax25_std_idletimer_expiry(ax25_cb *); 408void ax25_std_idletimer_expiry(ax25_cb *);
407 409
408/* ax25_subr.c */ 410/* ax25_subr.c */
409extern void ax25_clear_queues(ax25_cb *); 411void ax25_clear_queues(ax25_cb *);
410extern void ax25_frames_acked(ax25_cb *, unsigned short); 412void ax25_frames_acked(ax25_cb *, unsigned short);
411extern void ax25_requeue_frames(ax25_cb *); 413void ax25_requeue_frames(ax25_cb *);
412extern int ax25_validate_nr(ax25_cb *, unsigned short); 414int ax25_validate_nr(ax25_cb *, unsigned short);
413extern int ax25_decode(ax25_cb *, struct sk_buff *, int *, int *, int *); 415int ax25_decode(ax25_cb *, struct sk_buff *, int *, int *, int *);
414extern void ax25_send_control(ax25_cb *, int, int, int); 416void ax25_send_control(ax25_cb *, int, int, int);
415extern void ax25_return_dm(struct net_device *, ax25_address *, ax25_address *, ax25_digi *); 417void ax25_return_dm(struct net_device *, ax25_address *, ax25_address *,
416extern void ax25_calculate_t1(ax25_cb *); 418 ax25_digi *);
417extern void ax25_calculate_rtt(ax25_cb *); 419void ax25_calculate_t1(ax25_cb *);
418extern void ax25_disconnect(ax25_cb *, int); 420void ax25_calculate_rtt(ax25_cb *);
421void ax25_disconnect(ax25_cb *, int);
419 422
420/* ax25_timer.c */ 423/* ax25_timer.c */
421extern void ax25_setup_timers(ax25_cb *); 424void ax25_setup_timers(ax25_cb *);
422extern void ax25_start_heartbeat(ax25_cb *); 425void ax25_start_heartbeat(ax25_cb *);
423extern void ax25_start_t1timer(ax25_cb *); 426void ax25_start_t1timer(ax25_cb *);
424extern void ax25_start_t2timer(ax25_cb *); 427void ax25_start_t2timer(ax25_cb *);
425extern void ax25_start_t3timer(ax25_cb *); 428void ax25_start_t3timer(ax25_cb *);
426extern void ax25_start_idletimer(ax25_cb *); 429void ax25_start_idletimer(ax25_cb *);
427extern void ax25_stop_heartbeat(ax25_cb *); 430void ax25_stop_heartbeat(ax25_cb *);
428extern void ax25_stop_t1timer(ax25_cb *); 431void ax25_stop_t1timer(ax25_cb *);
429extern void ax25_stop_t2timer(ax25_cb *); 432void ax25_stop_t2timer(ax25_cb *);
430extern void ax25_stop_t3timer(ax25_cb *); 433void ax25_stop_t3timer(ax25_cb *);
431extern void ax25_stop_idletimer(ax25_cb *); 434void ax25_stop_idletimer(ax25_cb *);
432extern int ax25_t1timer_running(ax25_cb *); 435int ax25_t1timer_running(ax25_cb *);
433extern unsigned long ax25_display_timer(struct timer_list *); 436unsigned long ax25_display_timer(struct timer_list *);
434 437
435/* ax25_uid.c */ 438/* ax25_uid.c */
436extern int ax25_uid_policy; 439extern int ax25_uid_policy;
437extern ax25_uid_assoc *ax25_findbyuid(kuid_t); 440ax25_uid_assoc *ax25_findbyuid(kuid_t);
438extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); 441int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *);
439extern const struct file_operations ax25_uid_fops; 442extern const struct file_operations ax25_uid_fops;
440extern void ax25_uid_free(void); 443void ax25_uid_free(void);
441 444
442/* sysctl_net_ax25.c */ 445/* sysctl_net_ax25.c */
443#ifdef CONFIG_SYSCTL 446#ifdef CONFIG_SYSCTL
444extern int ax25_register_dev_sysctl(ax25_dev *ax25_dev); 447int ax25_register_dev_sysctl(ax25_dev *ax25_dev);
445extern void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev); 448void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev);
446#else 449#else
447static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0; } 450static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0; }
448static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {} 451static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {}