patch-2.1.68 linux/net/unix/sysctl_net_unix.c

Next file: linux/net/x25/af_x25.c
Previous file: linux/net/unix/af_unix.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.67/linux/net/unix/sysctl_net_unix.c linux/net/unix/sysctl_net_unix.c
@@ -29,4 +29,31 @@
 	 &proc_dointvec_jiffies},
 	{0}
 };
-#endif
+
+#ifdef MODULE
+static struct ctl_table_header * unix_sysctl_header;
+static struct ctl_table unix_root_table[];
+static struct ctl_table unix_net_table[];
+
+ctl_table unix_root_table[] = {
+	{CTL_NET, "net", NULL, 0, 0555, unix_net_table},
+	{0}
+};
+
+ctl_table unix_net_table[] = {
+	{NET_UNIX, "unix", NULL, 0, 0555, unix_table},
+	{0}
+};
+
+void unix_sysctl_register(void)
+{
+	unix_sysctl_header = register_sysctl_table(unix_root_table, 0);
+}
+
+void unix_sysctl_unregister(void)
+{
+	unregister_sysctl_table(unix_sysctl_header);
+}
+#endif	/* MODULE */
+
+#endif	/* CONFIG_SYSCTL */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov