blob: 8d237b15183b8acdf8a71fba259dc0c58fceb4cf [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 {
15 .ctl_name = NET_ATALK_AARP_EXPIRY_TIME,
16 .procname = "aarp-expiry-time",
17 .data = &sysctl_aarp_expiry_time,
18 .maxlen = sizeof(int),
19 .mode = 0644,
Alexey Dobriyan6d9f2392008-11-03 18:21:05 -080020 .proc_handler = proc_dointvec_jiffies,
21 .strategy = sysctl_jiffies,
Linus Torvalds1da177e2005-04-16 15:20:36 -070022 },
23 {
24 .ctl_name = NET_ATALK_AARP_TICK_TIME,
25 .procname = "aarp-tick-time",
26 .data = &sysctl_aarp_tick_time,
27 .maxlen = sizeof(int),
28 .mode = 0644,
Alexey Dobriyan6d9f2392008-11-03 18:21:05 -080029 .proc_handler = proc_dointvec_jiffies,
30 .strategy = sysctl_jiffies,
Linus Torvalds1da177e2005-04-16 15:20:36 -070031 },
32 {
33 .ctl_name = NET_ATALK_AARP_RETRANSMIT_LIMIT,
34 .procname = "aarp-retransmit-limit",
35 .data = &sysctl_aarp_retransmit_limit,
36 .maxlen = sizeof(int),
37 .mode = 0644,
Alexey Dobriyan6d9f2392008-11-03 18:21:05 -080038 .proc_handler = proc_dointvec,
Linus Torvalds1da177e2005-04-16 15:20:36 -070039 },
40 {
41 .ctl_name = NET_ATALK_AARP_RESOLVE_TIME,
42 .procname = "aarp-resolve-time",
43 .data = &sysctl_aarp_resolve_time,
44 .maxlen = sizeof(int),
45 .mode = 0644,
Alexey Dobriyan6d9f2392008-11-03 18:21:05 -080046 .proc_handler = proc_dointvec_jiffies,
47 .strategy = sysctl_jiffies,
Linus Torvalds1da177e2005-04-16 15:20:36 -070048 },
49 { 0 },
50};
51
Pavel Emelyanovb5ccd792008-01-09 00:30:05 -080052static struct ctl_path atalk_path[] = {
53 { .procname = "net", .ctl_name = CTL_NET, },
54 { .procname = "appletalk", .ctl_name = NET_ATALK, },
55 { }
Linus Torvalds1da177e2005-04-16 15:20:36 -070056};
57
58static struct ctl_table_header *atalk_table_header;
59
60void atalk_register_sysctl(void)
61{
Pavel Emelyanovb5ccd792008-01-09 00:30:05 -080062 atalk_table_header = register_sysctl_paths(atalk_path, atalk_table);
Linus Torvalds1da177e2005-04-16 15:20:36 -070063}
64
65void atalk_unregister_sysctl(void)
66{
67 unregister_sysctl_table(atalk_table_header);
68}