2 * sysctl_net_core.c: sysctl interface to net core subsystem.
4 * Begun April 1, 1996, Mike Shaver.
5 * Added /proc/sys/net/core directory entry (empty =) ). [MS]
9 #include <linux/sysctl.h>
10 #include <linux/config.h>
11 #include <linux/module.h>
12 #include <linux/socket.h>
17 extern int netdev_max_backlog;
20 extern __u32 sysctl_wmem_max;
21 extern __u32 sysctl_rmem_max;
23 extern int sysctl_core_destroy_delay;
25 #ifdef CONFIG_NET_DIVERT
26 extern char sysctl_divert_version[];
27 #endif /* CONFIG_NET_DIVERT */
29 ctl_table core_table[] = {
32 .ctl_name = NET_CORE_WMEM_MAX,
33 .procname = "wmem_max",
34 .data = &sysctl_wmem_max,
35 .maxlen = sizeof(int),
37 .proc_handler = &proc_dointvec
40 .ctl_name = NET_CORE_RMEM_MAX,
41 .procname = "rmem_max",
42 .data = &sysctl_rmem_max,
43 .maxlen = sizeof(int),
45 .proc_handler = &proc_dointvec
48 .ctl_name = NET_CORE_WMEM_DEFAULT,
49 .procname = "wmem_default",
50 .data = &sysctl_wmem_default,
51 .maxlen = sizeof(int),
53 .proc_handler = &proc_dointvec
56 .ctl_name = NET_CORE_RMEM_DEFAULT,
57 .procname = "rmem_default",
58 .data = &sysctl_rmem_default,
59 .maxlen = sizeof(int),
61 .proc_handler = &proc_dointvec
64 .ctl_name = NET_CORE_DEV_WEIGHT,
65 .procname = "dev_weight",
67 .maxlen = sizeof(int),
69 .proc_handler = &proc_dointvec
72 .ctl_name = NET_CORE_MAX_BACKLOG,
73 .procname = "netdev_max_backlog",
74 .data = &netdev_max_backlog,
75 .maxlen = sizeof(int),
77 .proc_handler = &proc_dointvec
80 .ctl_name = NET_CORE_MSG_COST,
81 .procname = "message_cost",
82 .data = &net_msg_cost,
83 .maxlen = sizeof(int),
85 .proc_handler = &proc_dointvec_jiffies,
86 .strategy = &sysctl_jiffies,
89 .ctl_name = NET_CORE_MSG_BURST,
90 .procname = "message_burst",
91 .data = &net_msg_burst,
92 .maxlen = sizeof(int),
94 .proc_handler = &proc_dointvec,
97 .ctl_name = NET_CORE_OPTMEM_MAX,
98 .procname = "optmem_max",
99 .data = &sysctl_optmem_max,
100 .maxlen = sizeof(int),
102 .proc_handler = &proc_dointvec
104 #ifdef CONFIG_NET_DIVERT
106 .ctl_name = NET_CORE_DIVERT_VERSION,
107 .procname = "divert_version",
108 .data = (void *)sysctl_divert_version,
111 .proc_handler = &proc_dostring
113 #endif /* CONFIG_NET_DIVERT */
114 #endif /* CONFIG_NET */
116 .ctl_name = NET_CORE_SOMAXCONN,
117 .procname = "somaxconn",
118 .data = &sysctl_somaxconn,
119 .maxlen = sizeof(int),
121 .proc_handler = &proc_dointvec
124 .ctl_name = NET_CORE_BUDGET,
125 .procname = "netdev_budget",
126 .data = &netdev_budget,
127 .maxlen = sizeof(int),
129 .proc_handler = &proc_dointvec