blob: ebb864361f7a27a713f2dc14194787346557b320 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 Torvalds1da177e2005-04-16 15:20:36 -07009#include <linux/sysctl.h>
10#include <net/sock.h>
11#include <linux/atalk.h>
12
13static struct ctl_table atalk_table[] = {
14 {
Linus Torvalds1da177e2005-04-16 15:20:36 -070015 .procname = "aarp-expiry-time",
16 .data = &sysctl_aarp_expiry_time,
17 .maxlen = sizeof(int),
18 .mode = 0644,
Alexey Dobriyan6d9f2392008-11-03 18:21:05 -080019 .proc_handler = proc_dointvec_jiffies,
Linus Torvalds1da177e2005-04-16 15:20:36 -070020 },
21 {
Linus Torvalds1da177e2005-04-16 15:20:36 -070022 .procname = "aarp-tick-time",
23 .data = &sysctl_aarp_tick_time,
24 .maxlen = sizeof(int),
25 .mode = 0644,
Alexey Dobriyan6d9f2392008-11-03 18:21:05 -080026 .proc_handler = proc_dointvec_jiffies,
Linus Torvalds1da177e2005-04-16 15:20:36 -070027 },
28 {
Linus Torvalds1da177e2005-04-16 15:20:36 -070029 .procname = "aarp-retransmit-limit",
30 .data = &sysctl_aarp_retransmit_limit,
31 .maxlen = sizeof(int),
32 .mode = 0644,
Alexey Dobriyan6d9f2392008-11-03 18:21:05 -080033 .proc_handler = proc_dointvec,
Linus Torvalds1da177e2005-04-16 15:20:36 -070034 },
35 {
Linus Torvalds1da177e2005-04-16 15:20:36 -070036 .procname = "aarp-resolve-time",
37 .data = &sysctl_aarp_resolve_time,
38 .maxlen = sizeof(int),
39 .mode = 0644,
Alexey Dobriyan6d9f2392008-11-03 18:21:05 -080040 .proc_handler = proc_dointvec_jiffies,
Linus Torvalds1da177e2005-04-16 15:20:36 -070041 },
Eric W. Biedermanf8572d82009-11-05 13:32:03 -080042 { },
Linus Torvalds1da177e2005-04-16 15:20:36 -070043};
44
Linus Torvalds1da177e2005-04-16 15:20:36 -070045static struct ctl_table_header *atalk_table_header;
46
47void atalk_register_sysctl(void)
48{
Eric W. Biedermanec8f23c2012-04-19 13:44:49 +000049 atalk_table_header = register_net_sysctl(&init_net, "net/appletalk", atalk_table);
Linus Torvalds1da177e2005-04-16 15:20:36 -070050}
51
52void atalk_unregister_sysctl(void)
53{
Eric W. Biederman5dd3df12012-04-19 13:24:33 +000054 unregister_net_sysctl_table(atalk_table_header);
Linus Torvalds1da177e2005-04-16 15:20:36 -070055}