blob: 9a4b8b7140794f3aab802d4a5d8264b53da169bc [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;
Denis V. Lunev6bd48fc2008-01-10 03:28:55 -080014struct sock;
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080015
Pavel Emelyanov8afd3512007-12-16 13:29:36 -080016struct netns_ipv4 {
Eric Dumazet2a75de02008-01-05 23:08:49 -080017#ifdef CONFIG_SYSCTL
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080018 struct ctl_table_header *forw_hdr;
Pavel Emelyanove4a2d5c2008-01-22 06:08:36 -080019 struct ctl_table_header *frags_hdr;
Pavel Emelyanov68528f02008-03-26 01:56:24 -070020 struct ctl_table_header *ipv4_hdr;
Denis V. Lunev39a23e72008-07-05 19:02:33 -070021 struct ctl_table_header *route_hdr;
Eric Dumazet2a75de02008-01-05 23:08:49 -080022#endif
Pavel Emelyanov752d14d2007-12-16 13:31:47 -080023 struct ipv4_devconf *devconf_all;
24 struct ipv4_devconf *devconf_dflt;
Denis V. Luneve4e49712008-01-10 03:27:51 -080025#ifdef CONFIG_IP_MULTIPLE_TABLES
26 struct fib_rules_ops *rules_ops;
27#endif
Denis V. Luneve4aef8a2008-01-10 03:28:24 -080028 struct hlist_head *fib_table_hash;
Denis V. Lunev6bd48fc2008-01-10 03:28:55 -080029 struct sock *fibnl;
Pavel Emelyanovac18e752008-01-22 06:02:14 -080030
Denis V. Lunev4a6ad7a2008-02-29 11:19:58 -080031 struct sock **icmp_sk;
Denis V. Lunev046ee902008-04-03 14:31:33 -070032 struct sock *tcp_sock;
Denis V. Lunev4a6ad7a2008-02-29 11:19:58 -080033
Pavel Emelyanovac18e752008-01-22 06:02:14 -080034 struct netns_frags frags;
Alexey Dobriyan9335f042008-01-31 04:03:23 -080035#ifdef CONFIG_NETFILTER
36 struct xt_table *iptable_filter;
37 struct xt_table *iptable_mangle;
38 struct xt_table *iptable_raw;
Alexey Dobriyan9ea0cb22008-01-31 04:05:09 -080039 struct xt_table *arptable_filter;
James Morris560ee652008-06-09 15:57:24 -070040 struct xt_table *iptable_security;
Alexey Dobriyane099a172008-10-08 11:35:10 +020041 struct xt_table *nat_table;
Alexey Dobriyan0c4c9282008-10-08 11:35:11 +020042 struct hlist_head *nat_bysource;
Patrick McHardyd696c7b2010-02-08 11:18:07 -080043 unsigned int nat_htable_size;
Alexey Dobriyan0c4c9282008-10-08 11:35:11 +020044 int nat_vmalloced;
Alexey Dobriyan9335f042008-01-31 04:03:23 -080045#endif
Pavel Emelyanova24022e2008-03-26 01:55:37 -070046
47 int sysctl_icmp_echo_ignore_all;
48 int sysctl_icmp_echo_ignore_broadcasts;
49 int sysctl_icmp_ignore_bogus_error_responses;
50 int sysctl_icmp_ratelimit;
51 int sysctl_icmp_ratemask;
52 int sysctl_icmp_errors_use_inbound_ifaddr;
Neil Horman1080d702008-10-27 12:28:25 -070053 int sysctl_rt_cache_rebuild_count;
54 int current_rt_cache_rebuild_count;
Denis V. Lunev9f5e97e2008-07-05 19:02:59 -070055
56 struct timer_list rt_secret_timer;
Denis V. Luneve84f84f2008-07-05 19:04:32 -070057 atomic_t rt_genid;
Benjamin Thery70a269e2009-01-22 04:56:15 +000058
59#ifdef CONFIG_IP_MROUTE
60 struct sock *mroute_sk;
Benjamin Thery2bb8b262009-01-22 04:56:18 +000061 struct mfc_cache **mfc_cache_array;
Benjamin Therycf958ae32009-01-22 04:56:16 +000062 struct vif_device *vif_table;
63 int maxvif;
Benjamin Thery1e8fb3b2009-01-22 04:56:19 +000064 atomic_t cache_resolve_queue_len;
Benjamin Thery6f9374a2009-01-22 04:56:20 +000065 int mroute_do_assert;
66 int mroute_do_pim;
Benjamin Thery6c5143d2009-01-22 04:56:21 +000067#if defined(CONFIG_IP_PIMSM_V1) || defined(CONFIG_IP_PIMSM_V2)
68 int mroute_reg_vif_num;
69#endif
Benjamin Thery70a269e2009-01-22 04:56:15 +000070#endif
Pavel Emelyanov8afd3512007-12-16 13:29:36 -080071};
72#endif