1b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0
21da177e4SLinus Torvalds /*
31da177e4SLinus Torvalds * sysctl_net_atalk.c: sysctl interface to net AppleTalk subsystem.
41da177e4SLinus Torvalds *
51da177e4SLinus Torvalds * Begun April 1, 1996, Mike Shaver.
61da177e4SLinus Torvalds * Added /proc/sys/net/atalk directory entry (empty =) ). [MS]
71da177e4SLinus Torvalds * Dynamic registration, added aarp entries. (5/30/97 Chris Horn)
81da177e4SLinus Torvalds */
91da177e4SLinus Torvalds
101da177e4SLinus Torvalds #include <linux/sysctl.h>
111da177e4SLinus Torvalds #include <net/sock.h>
121da177e4SLinus Torvalds #include <linux/atalk.h>
131da177e4SLinus Torvalds
141da177e4SLinus Torvalds static struct ctl_table atalk_table[] = {
151da177e4SLinus Torvalds {
161da177e4SLinus Torvalds .procname = "aarp-expiry-time",
171da177e4SLinus Torvalds .data = &sysctl_aarp_expiry_time,
181da177e4SLinus Torvalds .maxlen = sizeof(int),
191da177e4SLinus Torvalds .mode = 0644,
206d9f239aSAlexey Dobriyan .proc_handler = proc_dointvec_jiffies,
211da177e4SLinus Torvalds },
221da177e4SLinus Torvalds {
231da177e4SLinus Torvalds .procname = "aarp-tick-time",
241da177e4SLinus Torvalds .data = &sysctl_aarp_tick_time,
251da177e4SLinus Torvalds .maxlen = sizeof(int),
261da177e4SLinus Torvalds .mode = 0644,
276d9f239aSAlexey Dobriyan .proc_handler = proc_dointvec_jiffies,
281da177e4SLinus Torvalds },
291da177e4SLinus Torvalds {
301da177e4SLinus Torvalds .procname = "aarp-retransmit-limit",
311da177e4SLinus Torvalds .data = &sysctl_aarp_retransmit_limit,
321da177e4SLinus Torvalds .maxlen = sizeof(int),
331da177e4SLinus Torvalds .mode = 0644,
346d9f239aSAlexey Dobriyan .proc_handler = proc_dointvec,
351da177e4SLinus Torvalds },
361da177e4SLinus Torvalds {
371da177e4SLinus Torvalds .procname = "aarp-resolve-time",
381da177e4SLinus Torvalds .data = &sysctl_aarp_resolve_time,
391da177e4SLinus Torvalds .maxlen = sizeof(int),
401da177e4SLinus Torvalds .mode = 0644,
416d9f239aSAlexey Dobriyan .proc_handler = proc_dointvec_jiffies,
421da177e4SLinus Torvalds },
43f8572d8fSEric W. Biederman { },
441da177e4SLinus Torvalds };
451da177e4SLinus Torvalds
461da177e4SLinus Torvalds static struct ctl_table_header *atalk_table_header;
471da177e4SLinus Torvalds
atalk_register_sysctl(void)48*6377f787SYueHaibing int __init atalk_register_sysctl(void)
491da177e4SLinus Torvalds {
50ec8f23ceSEric W. Biederman atalk_table_header = register_net_sysctl(&init_net, "net/appletalk", atalk_table);
51*6377f787SYueHaibing if (!atalk_table_header)
52*6377f787SYueHaibing return -ENOMEM;
53*6377f787SYueHaibing return 0;
541da177e4SLinus Torvalds }
551da177e4SLinus Torvalds
atalk_unregister_sysctl(void)561da177e4SLinus Torvalds void atalk_unregister_sysctl(void)
571da177e4SLinus Torvalds {
585dd3df10SEric W. Biederman unregister_net_sysctl_table(atalk_table_header);
591da177e4SLinus Torvalds }
60