sysctl_net.c (d585a021c0b10b0477d6b608c53e1feb8cde0507) sysctl_net.c (2c8c1e7297e19bdef3c178c3ea41d898a7716e3e)
1/* -*- linux-c -*-
2 * sysctl_net.c: sysctl interface to net subsystem.
3 *
4 * Begun April 1, 1996, Mike Shaver.
5 * Added /proc/sys/net directories for each protocol family. [MS]
6 *
7 * Revision 1.2 1996/05/08 20:24:40 shaver
8 * Added bits for NET_BRIDGE and the NET_IPV4_ARP stuff and

--- 57 unchanged lines hidden (view full) ---

66 else
67 return table->mode & ~0222;
68}
69
70static struct ctl_table_root net_sysctl_ro_root = {
71 .permissions = net_ctl_ro_header_perms,
72};
73
1/* -*- linux-c -*-
2 * sysctl_net.c: sysctl interface to net subsystem.
3 *
4 * Begun April 1, 1996, Mike Shaver.
5 * Added /proc/sys/net directories for each protocol family. [MS]
6 *
7 * Revision 1.2 1996/05/08 20:24:40 shaver
8 * Added bits for NET_BRIDGE and the NET_IPV4_ARP stuff and

--- 57 unchanged lines hidden (view full) ---

66 else
67 return table->mode & ~0222;
68}
69
70static struct ctl_table_root net_sysctl_ro_root = {
71 .permissions = net_ctl_ro_header_perms,
72};
73
74static int sysctl_net_init(struct net *net)
74static int __net_init sysctl_net_init(struct net *net)
75{
76 setup_sysctl_set(&net->sysctls,
77 &net_sysctl_ro_root.default_set,
78 is_seen);
79 return 0;
80}
81
75{
76 setup_sysctl_set(&net->sysctls,
77 &net_sysctl_ro_root.default_set,
78 is_seen);
79 return 0;
80}
81
82static void sysctl_net_exit(struct net *net)
82static void __net_exit sysctl_net_exit(struct net *net)
83{
84 WARN_ON(!list_empty(&net->sysctls.list));
85 return;
86}
87
88static struct pernet_operations sysctl_pernet_ops = {
89 .init = sysctl_net_init,
90 .exit = sysctl_net_exit,

--- 40 unchanged lines hidden ---
83{
84 WARN_ON(!list_empty(&net->sysctls.list));
85 return;
86}
87
88static struct pernet_operations sysctl_pernet_ops = {
89 .init = sysctl_net_init,
90 .exit = sysctl_net_exit,

--- 40 unchanged lines hidden ---