blob: 599e48fa97cb91898d0e5090b05f22fb2f450e20 [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
Pavel Emelyanovac18e752008-01-22 06:02:14 -08008#include <net/inet_frag.h>
9
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080010struct ctl_table_header;
11struct ipv4_devconf;
Denis V. Luneve4e49712008-01-10 03:27:51 -080012struct fib_rules_ops;
Denis V. Luneve4aef8a2008-01-10 03:28:24 -080013struct hlist_head;
David S. Millerf4530fa2012-07-05 22:13:13 -070014struct fib_table;
Denis V. Lunev6bd48fc2008-01-10 03:28:55 -080015struct sock;
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080016
Pavel Emelyanov8afd3512007-12-16 13:29:36 -080017struct netns_ipv4 {
Eric Dumazet2a75de02008-01-05 23:08:49 -080018#ifdef CONFIG_SYSCTL
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080019 struct ctl_table_header *forw_hdr;
Pavel Emelyanove4a2d5c2008-01-22 06:08:36 -080020 struct ctl_table_header *frags_hdr;
Pavel Emelyanov68528f02008-03-26 01:56:24 -070021 struct ctl_table_header *ipv4_hdr;
Denis V. Lunev39a23e72008-07-05 19:02:33 -070022 struct ctl_table_header *route_hdr;
Eric Dumazet2a75de02008-01-05 23:08:49 -080023#endif
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080024 struct ipv4_devconf *devconf_all;
25 struct ipv4_devconf *devconf_dflt;
Denis V. Luneve4e49712008-01-10 03:27:51 -080026#ifdef CONFIG_IP_MULTIPLE_TABLES
27 struct fib_rules_ops *rules_ops;
David S. Millerf4530fa2012-07-05 22:13:13 -070028 bool fib_has_custom_rules;
29 struct fib_table *fib_local;
30 struct fib_table *fib_main;
31 struct fib_table *fib_default;
32#endif
33#ifdef CONFIG_IP_ROUTE_CLASSID
34 int fib_num_tclassid_users;
Denis V. Luneve4e49712008-01-10 03:27:51 -080035#endif
Denis V. Luneve4aef8a2008-01-10 03:28:24 -080036 struct hlist_head *fib_table_hash;
Denis V. Lunev6bd48fc2008-01-10 03:28:55 -080037 struct sock *fibnl;
Pavel Emelyanovac18e752008-01-22 06:02:14 -080038
Denis V. Lunev4a6ad7a2008-02-29 11:19:58 -080039 struct sock **icmp_sk;
Denis V. Lunev046ee902008-04-03 14:31:33 -070040 struct sock *tcp_sock;
Gao fengc8a627e2012-06-08 01:20:41 +000041 struct inet_peer_base *peers;
Pavel Emelyanovac18e752008-01-22 06:02:14 -080042 struct netns_frags frags;
Alexey Dobriyan9335f042008-01-31 04:03:23 -080043#ifdef CONFIG_NETFILTER
44 struct xt_table *iptable_filter;
45 struct xt_table *iptable_mangle;
46 struct xt_table *iptable_raw;
Alexey Dobriyan9ea0cb22008-01-31 04:05:09 -080047 struct xt_table *arptable_filter;
Alexey Dobriyane9d38972010-01-18 08:08:37 +010048#ifdef CONFIG_SECURITY
James Morris560ee652008-06-09 15:57:24 -070049 struct xt_table *iptable_security;
Alexey Dobriyane9d38972010-01-18 08:08:37 +010050#endif
Alexey Dobriyane099a172008-10-08 11:35:10 +020051 struct xt_table *nat_table;
Alexey Dobriyan0c4c9282008-10-08 11:35:11 +020052 struct hlist_head *nat_bysource;
Patrick McHardyd696c7b2010-02-08 11:18:07 -080053 unsigned int nat_htable_size;
Alexey Dobriyan9335f042008-01-31 04:03:23 -080054#endif
Pavel Emelyanova24022e2008-03-26 01:55:37 -070055
56 int sysctl_icmp_echo_ignore_all;
57 int sysctl_icmp_echo_ignore_broadcasts;
58 int sysctl_icmp_ignore_bogus_error_responses;
59 int sysctl_icmp_ratelimit;
60 int sysctl_icmp_ratemask;
61 int sysctl_icmp_errors_use_inbound_ifaddr;
Neil Horman1080d702008-10-27 12:28:25 -070062 int sysctl_rt_cache_rebuild_count;
63 int current_rt_cache_rebuild_count;
Denis V. Lunev9f5e97e2008-07-05 19:02:59 -070064
Vasiliy Kulikovc319b4d2011-05-13 10:01:00 +000065 unsigned int sysctl_ping_group_range[2];
Glauber Costa3dc43e32011-12-11 21:47:05 +000066 long sysctl_tcp_mem[3];
Vasiliy Kulikovc319b4d2011-05-13 10:01:00 +000067
Denis V. Luneve84f84f2008-07-05 19:04:32 -070068 atomic_t rt_genid;
David S. Miller436c3b62011-03-24 17:42:21 -070069 atomic_t dev_addr_genid;
Benjamin Thery70a269e2009-01-22 04:56:15 +000070
71#ifdef CONFIG_IP_MROUTE
Patrick McHardyf0ad0862010-04-13 05:03:23 +000072#ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
Patrick McHardy0c122952010-04-13 05:03:22 +000073 struct mr_table *mrt;
Patrick McHardyf0ad0862010-04-13 05:03:23 +000074#else
75 struct list_head mr_tables;
76 struct fib_rules_ops *mr_rules_ops;
77#endif
Benjamin Thery70a269e2009-01-22 04:56:15 +000078#endif
Pavel Emelyanov8afd3512007-12-16 13:29:36 -080079};
80#endif