Lines Matching defs:net

2  * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem.
5 * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS]
18 #include <net/snmp.h>
19 #include <net/icmp.h>
20 #include <net/ip.h>
21 #include <net/route.h>
22 #include <net/tcp.h>
23 #include <net/udp.h>
24 #include <net/cipso_ipv4.h>
25 #include <net/inet_frag.h>
26 #include <net/ping.h>
27 #include <net/tcp_memcontrol.h>
46 static void set_local_port_range(struct net *net, int range[2])
48 write_seqlock(&net->ipv4.ip_local_ports.lock);
49 net->ipv4.ip_local_ports.range[0] = range[0];
50 net->ipv4.ip_local_ports.range[1] = range[1];
51 write_sequnlock(&net->ipv4.ip_local_ports.lock);
59 struct net *net =
60 container_of(table->data, struct net, ipv4.ip_local_ports.range);
71 inet_get_local_port_range(net, &range[0], &range[1]);
79 set_local_port_range(net, range);
89 struct net *net =
90 container_of(table->data, struct net, ipv4.ping_group_range.range);
93 seq = read_seqbegin(&net->ipv4.ip_local_ports.lock);
97 } while (read_seqretry(&net->ipv4.ip_local_ports.lock, seq));
104 struct net *net =
105 container_of(table->data, struct net, ipv4.ping_group_range.range);
106 write_seqlock(&net->ipv4.ip_local_ports.lock);
109 write_sequnlock(&net->ipv4.ip_local_ports.lock);
897 static __net_init int ipv4_sysctl_init_net(struct net *net)
902 if (!net_eq(net, &init_net)) {
909 /* Update the variables to point into the current struct net */
911 table[i].data += (void *)net - (void *)&init_net;
914 net->ipv4.ipv4_hdr = register_net_sysctl(net, "net/ipv4", table);
915 if (net->ipv4.ipv4_hdr == NULL)
918 net->ipv4.sysctl_local_reserved_ports = kzalloc(65536 / 8, GFP_KERNEL);
919 if (!net->ipv4.sysctl_local_reserved_ports)
925 unregister_net_sysctl_table(net->ipv4.ipv4_hdr);
927 if (!net_eq(net, &init_net))
933 static __net_exit void ipv4_sysctl_exit_net(struct net *net)
937 kfree(net->ipv4.sysctl_local_reserved_ports);
938 table = net->ipv4.ipv4_hdr->ctl_table_arg;
939 unregister_net_sysctl_table(net->ipv4.ipv4_hdr);
952 hdr = register_net_sysctl(&init_net, "net/ipv4", ipv4_table);