blob: 80f500a29498e1fc9b8892e5c66be6bd02362eaa [file] [log] [blame]
Pavel Emelyanov8afd3512007-12-16 13:29:36 -08001/*
2 * ipv4 in net namespaces
3 */
4
5#ifndef __NETNS_IPV4_H__
6#define __NETNS_IPV4_H__
Denis V. Luneve4e49712008-01-10 03:27:51 -08007
Eric W. Biederman7064d162012-05-24 10:34:21 -06008#include <linux/uidgid.h>
Pavel Emelyanovac18e752008-01-22 06:02:14 -08009#include <net/inet_frag.h>
10
David S. Miller51c5d0c2012-07-10 00:49:14 -070011struct tcpm_hash_bucket;
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080012struct ctl_table_header;
13struct ipv4_devconf;
Denis V. Luneve4e49712008-01-10 03:27:51 -080014struct fib_rules_ops;
Denis V. Luneve4aef8a2008-01-10 03:28:24 -080015struct hlist_head;
David S. Millerf4530fa2012-07-05 22:13:13 -070016struct fib_table;
Denis V. Lunev6bd48fc2008-01-10 03:28:55 -080017struct sock;
Eric W. Biederman0bbf87d2013-09-28 14:10:59 -070018struct local_ports {
19 seqlock_t lock;
20 int range[2];
21};
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080022
Pavel Emelyanov8afd3512007-12-16 13:29:36 -080023struct netns_ipv4 {
Eric Dumazet2a75de02008-01-05 23:08:49 -080024#ifdef CONFIG_SYSCTL
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080025 struct ctl_table_header *forw_hdr;
Pavel Emelyanove4a2d5c2008-01-22 06:08:36 -080026 struct ctl_table_header *frags_hdr;
Pavel Emelyanov68528f02008-03-26 01:56:24 -070027 struct ctl_table_header *ipv4_hdr;
Denis V. Lunev39a23e72008-07-05 19:02:33 -070028 struct ctl_table_header *route_hdr;
Michal Kubecek8d068872013-02-06 10:46:33 +010029 struct ctl_table_header *xfrm4_hdr;
Eric Dumazet2a75de02008-01-05 23:08:49 -080030#endif
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080031 struct ipv4_devconf *devconf_all;
32 struct ipv4_devconf *devconf_dflt;
Denis V. Luneve4e49712008-01-10 03:27:51 -080033#ifdef CONFIG_IP_MULTIPLE_TABLES
34 struct fib_rules_ops *rules_ops;
David S. Millerf4530fa2012-07-05 22:13:13 -070035 bool fib_has_custom_rules;
36 struct fib_table *fib_local;
37 struct fib_table *fib_main;
38 struct fib_table *fib_default;
39#endif
40#ifdef CONFIG_IP_ROUTE_CLASSID
41 int fib_num_tclassid_users;
Denis V. Luneve4e49712008-01-10 03:27:51 -080042#endif
Denis V. Luneve4aef8a2008-01-10 03:28:24 -080043 struct hlist_head *fib_table_hash;
Denis V. Lunev6bd48fc2008-01-10 03:28:55 -080044 struct sock *fibnl;
Pavel Emelyanovac18e752008-01-22 06:02:14 -080045
Denis V. Lunev4a6ad7a2008-02-29 11:19:58 -080046 struct sock **icmp_sk;
Gao fengc8a627e2012-06-08 01:20:41 +000047 struct inet_peer_base *peers;
David S. Miller51c5d0c2012-07-10 00:49:14 -070048 struct tcpm_hash_bucket *tcp_metrics_hash;
Eric Dumazet5815d5e2012-07-19 23:02:34 +000049 unsigned int tcp_metrics_hash_log;
Pavel Emelyanovac18e752008-01-22 06:02:14 -080050 struct netns_frags frags;
Alexey Dobriyan9335f042008-01-31 04:03:23 -080051#ifdef CONFIG_NETFILTER
52 struct xt_table *iptable_filter;
53 struct xt_table *iptable_mangle;
54 struct xt_table *iptable_raw;
Alexey Dobriyan9ea0cb22008-01-31 04:05:09 -080055 struct xt_table *arptable_filter;
Alexey Dobriyane9d38972010-01-18 08:08:37 +010056#ifdef CONFIG_SECURITY
James Morris560ee652008-06-09 15:57:24 -070057 struct xt_table *iptable_security;
Alexey Dobriyane9d38972010-01-18 08:08:37 +010058#endif
Alexey Dobriyane099a172008-10-08 11:35:10 +020059 struct xt_table *nat_table;
Alexey Dobriyan9335f042008-01-31 04:03:23 -080060#endif
Pavel Emelyanova24022e2008-03-26 01:55:37 -070061
62 int sysctl_icmp_echo_ignore_all;
63 int sysctl_icmp_echo_ignore_broadcasts;
64 int sysctl_icmp_ignore_bogus_error_responses;
65 int sysctl_icmp_ratelimit;
66 int sysctl_icmp_ratemask;
67 int sysctl_icmp_errors_use_inbound_ifaddr;
Denis V. Lunev9f5e97e2008-07-05 19:02:59 -070068
Eric W. Biederman0bbf87d2013-09-28 14:10:59 -070069 struct local_ports sysctl_local_ports;
70
Hannes Frederic Sowa5d134f12013-01-05 16:10:48 +000071 int sysctl_tcp_ecn;
Hannes Frederic Sowa974eda12013-12-14 05:13:38 +010072 int sysctl_ip_no_pmtu_disc;
Hannes Frederic Sowaf87c10a2014-01-09 10:01:15 +010073 int sysctl_ip_fwd_use_pmtu;
Hannes Frederic Sowa5d134f12013-01-05 16:10:48 +000074
Eric W. Biederman7064d162012-05-24 10:34:21 -060075 kgid_t sysctl_ping_group_range[2];
Vasiliy Kulikovc319b4d2011-05-13 10:01:00 +000076
David S. Miller436c3b62011-03-24 17:42:21 -070077 atomic_t dev_addr_genid;
Benjamin Thery70a269e2009-01-22 04:56:15 +000078
79#ifdef CONFIG_IP_MROUTE
Patrick McHardyf0ad0862010-04-13 05:03:23 +000080#ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
Patrick McHardy0c122952010-04-13 05:03:22 +000081 struct mr_table *mrt;
Patrick McHardyf0ad0862010-04-13 05:03:23 +000082#else
83 struct list_head mr_tables;
84 struct fib_rules_ops *mr_rules_ops;
85#endif
Benjamin Thery70a269e2009-01-22 04:56:15 +000086#endif
fan.duca4c3fc2013-07-30 08:33:53 +080087 atomic_t rt_genid;
Pavel Emelyanov8afd3512007-12-16 13:29:36 -080088};
89#endif