File: sysctl_net_atalk.c

package info (click to toggle)
kernel-source-2.4.14 2.4.14-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 139,160 kB
  • ctags: 428,423
  • sloc: ansic: 2,435,554; asm: 141,119; makefile: 8,258; sh: 3,099; perl: 2,561; yacc: 1,177; cpp: 755; tcl: 577; lex: 352; awk: 251; lisp: 218; sed: 72
file content (61 lines) | stat: -rw-r--r-- 1,602 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* -*- linux-c -*-
 * sysctl_net_atalk.c: sysctl interface to net AppleTalk subsystem.
 *
 * Begun April 1, 1996, Mike Shaver.
 * Added /proc/sys/net/atalk directory entry (empty =) ). [MS]
 * Dynamic registration, added aarp entries. (5/30/97 Chris Horn)
 */

#include <linux/config.h>
#include <linux/mm.h>
#include <linux/sysctl.h>

extern int sysctl_aarp_expiry_time;
extern int sysctl_aarp_tick_time;
extern int sysctl_aarp_retransmit_limit;
extern int sysctl_aarp_resolve_time;

#ifdef CONFIG_SYSCTL
static ctl_table atalk_table[] = {
	{NET_ATALK_AARP_EXPIRY_TIME, "aarp-expiry-time",
	 &sysctl_aarp_expiry_time, sizeof(int), 0644, NULL, &proc_dointvec_jiffies},
	{NET_ATALK_AARP_TICK_TIME, "aarp-tick-time",
	 &sysctl_aarp_tick_time, sizeof(int), 0644, NULL, &proc_dointvec_jiffies},
	{NET_ATALK_AARP_RETRANSMIT_LIMIT, "aarp-retransmit-limit",
	 &sysctl_aarp_retransmit_limit, sizeof(int), 0644, NULL, &proc_dointvec},
	{NET_ATALK_AARP_RESOLVE_TIME, "aarp-resolve-time",
	 &sysctl_aarp_resolve_time, sizeof(int), 0644, NULL, &proc_dointvec_jiffies},
	{0}
};

static ctl_table atalk_dir_table[] = {
	{NET_ATALK, "appletalk", NULL, 0, 0555, atalk_table},
	{0}
};

static ctl_table atalk_root_table[] = {
	{CTL_NET, "net", NULL, 0, 0555, atalk_dir_table},
	{0}
};

static struct ctl_table_header *atalk_table_header;

void atalk_register_sysctl(void)
{
	atalk_table_header = register_sysctl_table(atalk_root_table, 1);
}

void atalk_unregister_sysctl(void)
{
	unregister_sysctl_table(atalk_table_header);
}

#else
void atalk_register_sysctl(void)
{
}

void atalk_unregister_sysctl(void)
{
}
#endif