diff options
Diffstat (limited to 'include/net/ax25.h')
-rw-r--r-- | include/net/ax25.h | 215 |
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 | ||
198 | extern void __ax25_put_route(ax25_route *ax25_rt); | 198 | void __ax25_put_route(ax25_route *ax25_rt); |
199 | 199 | ||
200 | static inline void ax25_put_route(ax25_route *ax25_rt) | 200 | static 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 */ |
273 | extern struct hlist_head ax25_list; | 273 | extern struct hlist_head ax25_list; |
274 | extern spinlock_t ax25_list_lock; | 274 | extern spinlock_t ax25_list_lock; |
275 | extern void ax25_cb_add(ax25_cb *); | 275 | void ax25_cb_add(ax25_cb *); |
276 | struct sock *ax25_find_listener(ax25_address *, int, struct net_device *, int); | 276 | struct sock *ax25_find_listener(ax25_address *, int, struct net_device *, int); |
277 | struct sock *ax25_get_socket(ax25_address *, ax25_address *, int); | 277 | struct sock *ax25_get_socket(ax25_address *, ax25_address *, int); |
278 | extern ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, struct net_device *); | 278 | ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, |
279 | extern void ax25_send_to_raw(ax25_address *, struct sk_buff *, int); | 279 | struct net_device *); |
280 | extern void ax25_destroy_socket(ax25_cb *); | 280 | void ax25_send_to_raw(ax25_address *, struct sk_buff *, int); |
281 | extern ax25_cb * __must_check ax25_create_cb(void); | 281 | void ax25_destroy_socket(ax25_cb *); |
282 | extern void ax25_fillin_cb(ax25_cb *, ax25_dev *); | 282 | ax25_cb * __must_check ax25_create_cb(void); |
283 | extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *); | 283 | void ax25_fillin_cb(ax25_cb *, ax25_dev *); |
284 | struct sock *ax25_make_new(struct sock *, struct ax25_dev *); | ||
284 | 285 | ||
285 | /* ax25_addr.c */ | 286 | /* ax25_addr.c */ |
286 | extern const ax25_address ax25_bcast; | 287 | extern const ax25_address ax25_bcast; |
287 | extern const ax25_address ax25_defaddr; | 288 | extern const ax25_address ax25_defaddr; |
288 | extern const ax25_address null_ax25_address; | 289 | extern const ax25_address null_ax25_address; |
289 | extern char *ax2asc(char *buf, const ax25_address *); | 290 | char *ax2asc(char *buf, const ax25_address *); |
290 | extern void asc2ax(ax25_address *addr, const char *callsign); | 291 | void asc2ax(ax25_address *addr, const char *callsign); |
291 | extern int ax25cmp(const ax25_address *, const ax25_address *); | 292 | int ax25cmp(const ax25_address *, const ax25_address *); |
292 | extern int ax25digicmp(const ax25_digi *, const ax25_digi *); | 293 | int ax25digicmp(const ax25_digi *, const ax25_digi *); |
293 | extern const unsigned char *ax25_addr_parse(const unsigned char *, int, | 294 | const 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 *); |
295 | extern int ax25_addr_build(unsigned char *, const ax25_address *, | 296 | int 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); |
297 | extern int ax25_addr_size(const ax25_digi *); | 298 | int ax25_addr_size(const ax25_digi *); |
298 | extern void ax25_digi_invert(const ax25_digi *, ax25_digi *); | 299 | void ax25_digi_invert(const ax25_digi *, ax25_digi *); |
299 | 300 | ||
300 | /* ax25_dev.c */ | 301 | /* ax25_dev.c */ |
301 | extern ax25_dev *ax25_dev_list; | 302 | extern 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 | ||
309 | extern ax25_dev *ax25_addr_ax25dev(ax25_address *); | 310 | ax25_dev *ax25_addr_ax25dev(ax25_address *); |
310 | extern void ax25_dev_device_up(struct net_device *); | 311 | void ax25_dev_device_up(struct net_device *); |
311 | extern void ax25_dev_device_down(struct net_device *); | 312 | void ax25_dev_device_down(struct net_device *); |
312 | extern int ax25_fwd_ioctl(unsigned int, struct ax25_fwd_struct *); | 313 | int ax25_fwd_ioctl(unsigned int, struct ax25_fwd_struct *); |
313 | extern struct net_device *ax25_fwd_dev(struct net_device *); | 314 | struct net_device *ax25_fwd_dev(struct net_device *); |
314 | extern void ax25_dev_free(void); | 315 | void ax25_dev_free(void); |
315 | 316 | ||
316 | /* ax25_ds_in.c */ | 317 | /* ax25_ds_in.c */ |
317 | extern int ax25_ds_frame_in(ax25_cb *, struct sk_buff *, int); | 318 | int ax25_ds_frame_in(ax25_cb *, struct sk_buff *, int); |
318 | 319 | ||
319 | /* ax25_ds_subr.c */ | 320 | /* ax25_ds_subr.c */ |
320 | extern void ax25_ds_nr_error_recovery(ax25_cb *); | 321 | void ax25_ds_nr_error_recovery(ax25_cb *); |
321 | extern void ax25_ds_enquiry_response(ax25_cb *); | 322 | void ax25_ds_enquiry_response(ax25_cb *); |
322 | extern void ax25_ds_establish_data_link(ax25_cb *); | 323 | void ax25_ds_establish_data_link(ax25_cb *); |
323 | extern void ax25_dev_dama_off(ax25_dev *); | 324 | void ax25_dev_dama_off(ax25_dev *); |
324 | extern void ax25_dama_on(ax25_cb *); | 325 | void ax25_dama_on(ax25_cb *); |
325 | extern void ax25_dama_off(ax25_cb *); | 326 | void ax25_dama_off(ax25_cb *); |
326 | 327 | ||
327 | /* ax25_ds_timer.c */ | 328 | /* ax25_ds_timer.c */ |
328 | extern void ax25_ds_setup_timer(ax25_dev *); | 329 | void ax25_ds_setup_timer(ax25_dev *); |
329 | extern void ax25_ds_set_timer(ax25_dev *); | 330 | void ax25_ds_set_timer(ax25_dev *); |
330 | extern void ax25_ds_del_timer(ax25_dev *); | 331 | void ax25_ds_del_timer(ax25_dev *); |
331 | extern void ax25_ds_timer(ax25_cb *); | 332 | void ax25_ds_timer(ax25_cb *); |
332 | extern void ax25_ds_t1_timeout(ax25_cb *); | 333 | void ax25_ds_t1_timeout(ax25_cb *); |
333 | extern void ax25_ds_heartbeat_expiry(ax25_cb *); | 334 | void ax25_ds_heartbeat_expiry(ax25_cb *); |
334 | extern void ax25_ds_t3timer_expiry(ax25_cb *); | 335 | void ax25_ds_t3timer_expiry(ax25_cb *); |
335 | extern void ax25_ds_idletimer_expiry(ax25_cb *); | 336 | void 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 | ||
345 | extern void ax25_register_pid(struct ax25_protocol *ap); | 346 | void ax25_register_pid(struct ax25_protocol *ap); |
346 | extern void ax25_protocol_release(unsigned int); | 347 | void ax25_protocol_release(unsigned int); |
347 | 348 | ||
348 | struct ax25_linkfail { | 349 | struct 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 | ||
353 | extern void ax25_linkfail_register(struct ax25_linkfail *lf); | 354 | void ax25_linkfail_register(struct ax25_linkfail *lf); |
354 | extern void ax25_linkfail_release(struct ax25_linkfail *lf); | 355 | void ax25_linkfail_release(struct ax25_linkfail *lf); |
355 | extern int __must_check ax25_listen_register(ax25_address *, | 356 | int __must_check ax25_listen_register(ax25_address *, struct net_device *); |
356 | struct net_device *); | 357 | void ax25_listen_release(ax25_address *, struct net_device *); |
357 | extern void ax25_listen_release(ax25_address *, struct net_device *); | 358 | int(*ax25_protocol_function(unsigned int))(struct sk_buff *, ax25_cb *); |
358 | extern int (*ax25_protocol_function(unsigned int))(struct sk_buff *, ax25_cb *); | 359 | int ax25_listen_mine(ax25_address *, struct net_device *); |
359 | extern int ax25_listen_mine(ax25_address *, struct net_device *); | 360 | void ax25_link_failed(ax25_cb *, int); |
360 | extern void ax25_link_failed(ax25_cb *, int); | 361 | int ax25_protocol_is_registered(unsigned int); |
361 | extern int ax25_protocol_is_registered(unsigned int); | ||
362 | 362 | ||
363 | /* ax25_in.c */ | 363 | /* ax25_in.c */ |
364 | extern int ax25_rx_iframe(ax25_cb *, struct sk_buff *); | 364 | int ax25_rx_iframe(ax25_cb *, struct sk_buff *); |
365 | extern int ax25_kiss_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); | 365 | int 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 */ |
368 | extern int ax25_hard_header(struct sk_buff *, struct net_device *, | 369 | int 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); | 371 | int ax25_rebuild_header(struct sk_buff *); |
371 | extern int ax25_rebuild_header(struct sk_buff *); | ||
372 | extern const struct header_ops ax25_header_ops; | 372 | extern const struct header_ops ax25_header_ops; |
373 | 373 | ||
374 | /* ax25_out.c */ | 374 | /* ax25_out.c */ |
375 | extern ax25_cb *ax25_send_frame(struct sk_buff *, int, ax25_address *, ax25_address *, ax25_digi *, struct net_device *); | 375 | ax25_cb *ax25_send_frame(struct sk_buff *, int, ax25_address *, ax25_address *, |
376 | extern void ax25_output(ax25_cb *, int, struct sk_buff *); | 376 | ax25_digi *, struct net_device *); |
377 | extern void ax25_kick(ax25_cb *); | 377 | void ax25_output(ax25_cb *, int, struct sk_buff *); |
378 | extern void ax25_transmit_buffer(ax25_cb *, struct sk_buff *, int); | 378 | void ax25_kick(ax25_cb *); |
379 | extern void ax25_queue_xmit(struct sk_buff *skb, struct net_device *dev); | 379 | void ax25_transmit_buffer(ax25_cb *, struct sk_buff *, int); |
380 | extern int ax25_check_iframes_acked(ax25_cb *, unsigned short); | 380 | void ax25_queue_xmit(struct sk_buff *skb, struct net_device *dev); |
381 | int ax25_check_iframes_acked(ax25_cb *, unsigned short); | ||
381 | 382 | ||
382 | /* ax25_route.c */ | 383 | /* ax25_route.c */ |
383 | extern void ax25_rt_device_down(struct net_device *); | 384 | void ax25_rt_device_down(struct net_device *); |
384 | extern int ax25_rt_ioctl(unsigned int, void __user *); | 385 | int ax25_rt_ioctl(unsigned int, void __user *); |
385 | extern const struct file_operations ax25_route_fops; | 386 | extern const struct file_operations ax25_route_fops; |
386 | extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); | 387 | ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); |
387 | extern int ax25_rt_autobind(ax25_cb *, ax25_address *); | 388 | int ax25_rt_autobind(ax25_cb *, ax25_address *); |
388 | extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); | 389 | struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, |
389 | extern void ax25_rt_free(void); | 390 | ax25_address *, ax25_digi *); |
391 | void ax25_rt_free(void); | ||
390 | 392 | ||
391 | /* ax25_std_in.c */ | 393 | /* ax25_std_in.c */ |
392 | extern int ax25_std_frame_in(ax25_cb *, struct sk_buff *, int); | 394 | int ax25_std_frame_in(ax25_cb *, struct sk_buff *, int); |
393 | 395 | ||
394 | /* ax25_std_subr.c */ | 396 | /* ax25_std_subr.c */ |
395 | extern void ax25_std_nr_error_recovery(ax25_cb *); | 397 | void ax25_std_nr_error_recovery(ax25_cb *); |
396 | extern void ax25_std_establish_data_link(ax25_cb *); | 398 | void ax25_std_establish_data_link(ax25_cb *); |
397 | extern void ax25_std_transmit_enquiry(ax25_cb *); | 399 | void ax25_std_transmit_enquiry(ax25_cb *); |
398 | extern void ax25_std_enquiry_response(ax25_cb *); | 400 | void ax25_std_enquiry_response(ax25_cb *); |
399 | extern void ax25_std_timeout_response(ax25_cb *); | 401 | void ax25_std_timeout_response(ax25_cb *); |
400 | 402 | ||
401 | /* ax25_std_timer.c */ | 403 | /* ax25_std_timer.c */ |
402 | extern void ax25_std_heartbeat_expiry(ax25_cb *); | 404 | void ax25_std_heartbeat_expiry(ax25_cb *); |
403 | extern void ax25_std_t1timer_expiry(ax25_cb *); | 405 | void ax25_std_t1timer_expiry(ax25_cb *); |
404 | extern void ax25_std_t2timer_expiry(ax25_cb *); | 406 | void ax25_std_t2timer_expiry(ax25_cb *); |
405 | extern void ax25_std_t3timer_expiry(ax25_cb *); | 407 | void ax25_std_t3timer_expiry(ax25_cb *); |
406 | extern void ax25_std_idletimer_expiry(ax25_cb *); | 408 | void ax25_std_idletimer_expiry(ax25_cb *); |
407 | 409 | ||
408 | /* ax25_subr.c */ | 410 | /* ax25_subr.c */ |
409 | extern void ax25_clear_queues(ax25_cb *); | 411 | void ax25_clear_queues(ax25_cb *); |
410 | extern void ax25_frames_acked(ax25_cb *, unsigned short); | 412 | void ax25_frames_acked(ax25_cb *, unsigned short); |
411 | extern void ax25_requeue_frames(ax25_cb *); | 413 | void ax25_requeue_frames(ax25_cb *); |
412 | extern int ax25_validate_nr(ax25_cb *, unsigned short); | 414 | int ax25_validate_nr(ax25_cb *, unsigned short); |
413 | extern int ax25_decode(ax25_cb *, struct sk_buff *, int *, int *, int *); | 415 | int ax25_decode(ax25_cb *, struct sk_buff *, int *, int *, int *); |
414 | extern void ax25_send_control(ax25_cb *, int, int, int); | 416 | void ax25_send_control(ax25_cb *, int, int, int); |
415 | extern void ax25_return_dm(struct net_device *, ax25_address *, ax25_address *, ax25_digi *); | 417 | void ax25_return_dm(struct net_device *, ax25_address *, ax25_address *, |
416 | extern void ax25_calculate_t1(ax25_cb *); | 418 | ax25_digi *); |
417 | extern void ax25_calculate_rtt(ax25_cb *); | 419 | void ax25_calculate_t1(ax25_cb *); |
418 | extern void ax25_disconnect(ax25_cb *, int); | 420 | void ax25_calculate_rtt(ax25_cb *); |
421 | void ax25_disconnect(ax25_cb *, int); | ||
419 | 422 | ||
420 | /* ax25_timer.c */ | 423 | /* ax25_timer.c */ |
421 | extern void ax25_setup_timers(ax25_cb *); | 424 | void ax25_setup_timers(ax25_cb *); |
422 | extern void ax25_start_heartbeat(ax25_cb *); | 425 | void ax25_start_heartbeat(ax25_cb *); |
423 | extern void ax25_start_t1timer(ax25_cb *); | 426 | void ax25_start_t1timer(ax25_cb *); |
424 | extern void ax25_start_t2timer(ax25_cb *); | 427 | void ax25_start_t2timer(ax25_cb *); |
425 | extern void ax25_start_t3timer(ax25_cb *); | 428 | void ax25_start_t3timer(ax25_cb *); |
426 | extern void ax25_start_idletimer(ax25_cb *); | 429 | void ax25_start_idletimer(ax25_cb *); |
427 | extern void ax25_stop_heartbeat(ax25_cb *); | 430 | void ax25_stop_heartbeat(ax25_cb *); |
428 | extern void ax25_stop_t1timer(ax25_cb *); | 431 | void ax25_stop_t1timer(ax25_cb *); |
429 | extern void ax25_stop_t2timer(ax25_cb *); | 432 | void ax25_stop_t2timer(ax25_cb *); |
430 | extern void ax25_stop_t3timer(ax25_cb *); | 433 | void ax25_stop_t3timer(ax25_cb *); |
431 | extern void ax25_stop_idletimer(ax25_cb *); | 434 | void ax25_stop_idletimer(ax25_cb *); |
432 | extern int ax25_t1timer_running(ax25_cb *); | 435 | int ax25_t1timer_running(ax25_cb *); |
433 | extern unsigned long ax25_display_timer(struct timer_list *); | 436 | unsigned long ax25_display_timer(struct timer_list *); |
434 | 437 | ||
435 | /* ax25_uid.c */ | 438 | /* ax25_uid.c */ |
436 | extern int ax25_uid_policy; | 439 | extern int ax25_uid_policy; |
437 | extern ax25_uid_assoc *ax25_findbyuid(kuid_t); | 440 | ax25_uid_assoc *ax25_findbyuid(kuid_t); |
438 | extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); | 441 | int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); |
439 | extern const struct file_operations ax25_uid_fops; | 442 | extern const struct file_operations ax25_uid_fops; |
440 | extern void ax25_uid_free(void); | 443 | void ax25_uid_free(void); |
441 | 444 | ||
442 | /* sysctl_net_ax25.c */ | 445 | /* sysctl_net_ax25.c */ |
443 | #ifdef CONFIG_SYSCTL | 446 | #ifdef CONFIG_SYSCTL |
444 | extern int ax25_register_dev_sysctl(ax25_dev *ax25_dev); | 447 | int ax25_register_dev_sysctl(ax25_dev *ax25_dev); |
445 | extern void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev); | 448 | void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev); |
446 | #else | 449 | #else |
447 | static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0; } | 450 | static inline int ax25_register_dev_sysctl(ax25_dev *ax25_dev) { return 0; } |
448 | static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {} | 451 | static inline void ax25_unregister_dev_sysctl(ax25_dev *ax25_dev) {} |