Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * sysctl_net_atalk.c: sysctl interface to net AppleTalk subsystem. |
| 3 | * |
| 4 | * Begun April 1, 1996, Mike Shaver. |
| 5 | * Added /proc/sys/net/atalk directory entry (empty =) ). [MS] |
| 6 | * Dynamic registration, added aarp entries. (5/30/97 Chris Horn) |
| 7 | */ |
| 8 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | #include <linux/sysctl.h> |
| 10 | #include <net/sock.h> |
| 11 | #include <linux/atalk.h> |
| 12 | |
| 13 | static struct ctl_table atalk_table[] = { |
| 14 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | .procname = "aarp-expiry-time", |
| 16 | .data = &sysctl_aarp_expiry_time, |
| 17 | .maxlen = sizeof(int), |
| 18 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 19 | .proc_handler = proc_dointvec_jiffies, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | }, |
| 21 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | .procname = "aarp-tick-time", |
| 23 | .data = &sysctl_aarp_tick_time, |
| 24 | .maxlen = sizeof(int), |
| 25 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 26 | .proc_handler = proc_dointvec_jiffies, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | }, |
| 28 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | .procname = "aarp-retransmit-limit", |
| 30 | .data = &sysctl_aarp_retransmit_limit, |
| 31 | .maxlen = sizeof(int), |
| 32 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 33 | .proc_handler = proc_dointvec, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | }, |
| 35 | { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | .procname = "aarp-resolve-time", |
| 37 | .data = &sysctl_aarp_resolve_time, |
| 38 | .maxlen = sizeof(int), |
| 39 | .mode = 0644, |
Alexey Dobriyan | 6d9f239 | 2008-11-03 18:21:05 -0800 | [diff] [blame] | 40 | .proc_handler = proc_dointvec_jiffies, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | }, |
Eric W. Biederman | f8572d8 | 2009-11-05 13:32:03 -0800 | [diff] [blame] | 42 | { }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | }; |
| 44 | |
Pavel Emelyanov | b5ccd79 | 2008-01-09 00:30:05 -0800 | [diff] [blame] | 45 | static struct ctl_path atalk_path[] = { |
Eric W. Biederman | f8572d8 | 2009-11-05 13:32:03 -0800 | [diff] [blame] | 46 | { .procname = "net", }, |
| 47 | { .procname = "appletalk", }, |
Pavel Emelyanov | b5ccd79 | 2008-01-09 00:30:05 -0800 | [diff] [blame] | 48 | { } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | }; |
| 50 | |
| 51 | static struct ctl_table_header *atalk_table_header; |
| 52 | |
| 53 | void atalk_register_sysctl(void) |
| 54 | { |
Pavel Emelyanov | b5ccd79 | 2008-01-09 00:30:05 -0800 | [diff] [blame] | 55 | atalk_table_header = register_sysctl_paths(atalk_path, atalk_table); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | void atalk_unregister_sysctl(void) |
| 59 | { |
| 60 | unregister_sysctl_table(atalk_table_header); |
| 61 | } |