import of ftp.dlink.com/GPL/DSMG-600_reB/ppclinux.tar.gz
[linux-2.4.21-pre4.git] / net / core / sysctl_net_core.c
1 /* -*- linux-c -*-
2  * sysctl_net_core.c: sysctl interface to net core subsystem.
3  *
4  * Begun April 1, 1996, Mike Shaver.
5  * Added /proc/sys/net/core directory entry (empty =) ). [MS]
6  */
7
8 #include <linux/mm.h>
9 #include <linux/sysctl.h>
10 #include <linux/config.h>
11
12 #ifdef CONFIG_SYSCTL
13
14 extern int netdev_max_backlog;
15 extern int weight_p;
16 extern int no_cong_thresh;
17 extern int no_cong;
18 extern int lo_cong;
19 extern int mod_cong;
20 extern int netdev_fastroute;
21 extern int net_msg_cost;
22 extern int net_msg_burst;
23
24 extern __u32 sysctl_wmem_max;
25 extern __u32 sysctl_rmem_max;
26 extern __u32 sysctl_wmem_default;
27 extern __u32 sysctl_rmem_default;
28
29 extern int sysctl_core_destroy_delay;
30 extern int sysctl_optmem_max;
31 extern int sysctl_hot_list_len;
32
33 #ifdef CONFIG_NET_DIVERT
34 extern char sysctl_divert_version[];
35 #endif /* CONFIG_NET_DIVERT */
36
37 ctl_table core_table[] = {
38 #ifdef CONFIG_NET
39         {NET_CORE_WMEM_MAX, "wmem_max",
40          &sysctl_wmem_max, sizeof(int), 0644, NULL,
41          &proc_dointvec},
42         {NET_CORE_RMEM_MAX, "rmem_max",
43          &sysctl_rmem_max, sizeof(int), 0644, NULL,
44          &proc_dointvec},
45         {NET_CORE_WMEM_DEFAULT, "wmem_default",
46          &sysctl_wmem_default, sizeof(int), 0644, NULL,
47          &proc_dointvec},
48         {NET_CORE_RMEM_DEFAULT, "rmem_default",
49          &sysctl_rmem_default, sizeof(int), 0644, NULL,
50          &proc_dointvec},
51         {NET_CORE_DEV_WEIGHT, "dev_weight",
52          &weight_p, sizeof(int), 0644, NULL,
53          &proc_dointvec},
54         {NET_CORE_MAX_BACKLOG, "netdev_max_backlog",
55          &netdev_max_backlog, sizeof(int), 0644, NULL,
56          &proc_dointvec},
57         {NET_CORE_NO_CONG_THRESH, "no_cong_thresh",
58          &no_cong, sizeof(int), 0644, NULL,
59          &proc_dointvec},
60         {NET_CORE_NO_CONG, "no_cong",
61          &no_cong, sizeof(int), 0644, NULL,
62          &proc_dointvec},
63         {NET_CORE_LO_CONG, "lo_cong",
64          &lo_cong, sizeof(int), 0644, NULL,
65          &proc_dointvec},
66         {NET_CORE_MOD_CONG, "mod_cong",
67          &mod_cong, sizeof(int), 0644, NULL,
68          &proc_dointvec},
69 #ifdef CONFIG_NET_FASTROUTE
70         {NET_CORE_FASTROUTE, "netdev_fastroute",
71          &netdev_fastroute, sizeof(int), 0644, NULL,
72          &proc_dointvec},
73 #endif
74         {NET_CORE_MSG_COST, "message_cost",
75          &net_msg_cost, sizeof(int), 0644, NULL,
76          &proc_dointvec_jiffies},
77         {NET_CORE_MSG_BURST, "message_burst",
78          &net_msg_burst, sizeof(int), 0644, NULL,
79          &proc_dointvec_jiffies},
80         {NET_CORE_OPTMEM_MAX, "optmem_max",
81          &sysctl_optmem_max, sizeof(int), 0644, NULL,
82          &proc_dointvec},
83         {NET_CORE_HOT_LIST_LENGTH, "hot_list_length",
84          &sysctl_hot_list_len, sizeof(int), 0644, NULL,
85          &proc_dointvec},
86 #ifdef CONFIG_NET_DIVERT
87         {NET_CORE_DIVERT_VERSION, "divert_version",
88          (void *)sysctl_divert_version, 32, 0444, NULL,
89          &proc_dostring},
90 #endif /* CONFIG_NET_DIVERT */
91 #endif /* CONFIG_NET */
92         { 0 }
93 };
94 #endif