2007-12-16 16:29:36 -05:00
|
|
|
/*
|
|
|
|
* ipv4 in net namespaces
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __NETNS_IPV4_H__
|
|
|
|
#define __NETNS_IPV4_H__
|
2008-01-10 06:27:51 -05:00
|
|
|
|
2008-01-22 09:02:14 -05:00
|
|
|
#include <net/inet_frag.h>
|
|
|
|
|
2007-12-16 16:31:47 -05:00
|
|
|
struct ctl_table_header;
|
|
|
|
struct ipv4_devconf;
|
2008-01-10 06:27:51 -05:00
|
|
|
struct fib_rules_ops;
|
2008-01-10 06:28:24 -05:00
|
|
|
struct hlist_head;
|
2008-01-10 06:28:55 -05:00
|
|
|
struct sock;
|
2007-12-16 16:31:47 -05:00
|
|
|
|
2007-12-16 16:29:36 -05:00
|
|
|
struct netns_ipv4 {
|
2008-01-06 02:08:49 -05:00
|
|
|
#ifdef CONFIG_SYSCTL
|
2007-12-16 16:31:47 -05:00
|
|
|
struct ctl_table_header *forw_hdr;
|
2008-01-22 09:08:36 -05:00
|
|
|
struct ctl_table_header *frags_hdr;
|
2008-03-26 04:56:24 -04:00
|
|
|
struct ctl_table_header *ipv4_hdr;
|
2008-07-05 22:02:33 -04:00
|
|
|
struct ctl_table_header *route_hdr;
|
2008-01-06 02:08:49 -05:00
|
|
|
#endif
|
2007-12-16 16:31:47 -05:00
|
|
|
struct ipv4_devconf *devconf_all;
|
|
|
|
struct ipv4_devconf *devconf_dflt;
|
2008-01-10 06:27:51 -05:00
|
|
|
#ifdef CONFIG_IP_MULTIPLE_TABLES
|
|
|
|
struct fib_rules_ops *rules_ops;
|
|
|
|
#endif
|
2008-01-10 06:28:24 -05:00
|
|
|
struct hlist_head *fib_table_hash;
|
2008-01-10 06:28:55 -05:00
|
|
|
struct sock *fibnl;
|
2008-01-22 09:02:14 -05:00
|
|
|
|
2008-02-29 14:19:58 -05:00
|
|
|
struct sock **icmp_sk;
|
2008-04-03 17:31:33 -04:00
|
|
|
struct sock *tcp_sock;
|
2008-02-29 14:19:58 -05:00
|
|
|
|
2008-01-22 09:02:14 -05:00
|
|
|
struct netns_frags frags;
|
2008-01-31 07:03:23 -05:00
|
|
|
#ifdef CONFIG_NETFILTER
|
|
|
|
struct xt_table *iptable_filter;
|
|
|
|
struct xt_table *iptable_mangle;
|
|
|
|
struct xt_table *iptable_raw;
|
2008-01-31 07:05:09 -05:00
|
|
|
struct xt_table *arptable_filter;
|
2010-01-18 02:08:37 -05:00
|
|
|
#ifdef CONFIG_SECURITY
|
2008-06-09 18:57:24 -04:00
|
|
|
struct xt_table *iptable_security;
|
2010-01-18 02:08:37 -05:00
|
|
|
#endif
|
2008-10-08 05:35:10 -04:00
|
|
|
struct xt_table *nat_table;
|
2008-10-08 05:35:11 -04:00
|
|
|
struct hlist_head *nat_bysource;
|
2010-02-08 14:18:07 -05:00
|
|
|
unsigned int nat_htable_size;
|
2008-10-08 05:35:11 -04:00
|
|
|
int nat_vmalloced;
|
2008-01-31 07:03:23 -05:00
|
|
|
#endif
|
2008-03-26 04:55:37 -04:00
|
|
|
|
|
|
|
int sysctl_icmp_echo_ignore_all;
|
|
|
|
int sysctl_icmp_echo_ignore_broadcasts;
|
|
|
|
int sysctl_icmp_ignore_bogus_error_responses;
|
|
|
|
int sysctl_icmp_ratelimit;
|
|
|
|
int sysctl_icmp_ratemask;
|
|
|
|
int sysctl_icmp_errors_use_inbound_ifaddr;
|
2008-10-27 15:28:25 -04:00
|
|
|
int sysctl_rt_cache_rebuild_count;
|
|
|
|
int current_rt_cache_rebuild_count;
|
2008-07-05 22:02:59 -04:00
|
|
|
|
2008-07-05 22:04:32 -04:00
|
|
|
atomic_t rt_genid;
|
2009-01-21 23:56:15 -05:00
|
|
|
|
|
|
|
#ifdef CONFIG_IP_MROUTE
|
ipv4: ipmr: support multiple tables
This patch adds support for multiple independant multicast routing instances,
named "tables".
Userspace multicast routing daemons can bind to a specific table instance by
issuing a setsockopt call using a new option MRT_TABLE. The table number is
stored in the raw socket data and affects all following ipmr setsockopt(),
getsockopt() and ioctl() calls. By default, a single table (RT_TABLE_DEFAULT)
is created with a default routing rule pointing to it. Newly created pimreg
devices have the table number appended ("pimregX"), with the exception of
devices created in the default table, which are named just "pimreg" for
compatibility reasons.
Packets are directed to a specific table instance using routing rules,
similar to how regular routing rules work. Currently iif, oif and mark
are supported as keys, source and destination addresses could be supported
additionally.
Example usage:
- bind pimd/xorp/... to a specific table:
uint32_t table = 123;
setsockopt(fd, IPPROTO_IP, MRT_TABLE, &table, sizeof(table));
- create routing rules directing packets to the new table:
# ip mrule add iif eth0 lookup 123
# ip mrule add oif eth0 lookup 123
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13 01:03:23 -04:00
|
|
|
#ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
|
2010-04-13 01:03:22 -04:00
|
|
|
struct mr_table *mrt;
|
ipv4: ipmr: support multiple tables
This patch adds support for multiple independant multicast routing instances,
named "tables".
Userspace multicast routing daemons can bind to a specific table instance by
issuing a setsockopt call using a new option MRT_TABLE. The table number is
stored in the raw socket data and affects all following ipmr setsockopt(),
getsockopt() and ioctl() calls. By default, a single table (RT_TABLE_DEFAULT)
is created with a default routing rule pointing to it. Newly created pimreg
devices have the table number appended ("pimregX"), with the exception of
devices created in the default table, which are named just "pimreg" for
compatibility reasons.
Packets are directed to a specific table instance using routing rules,
similar to how regular routing rules work. Currently iif, oif and mark
are supported as keys, source and destination addresses could be supported
additionally.
Example usage:
- bind pimd/xorp/... to a specific table:
uint32_t table = 123;
setsockopt(fd, IPPROTO_IP, MRT_TABLE, &table, sizeof(table));
- create routing rules directing packets to the new table:
# ip mrule add iif eth0 lookup 123
# ip mrule add oif eth0 lookup 123
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-13 01:03:23 -04:00
|
|
|
#else
|
|
|
|
struct list_head mr_tables;
|
|
|
|
struct fib_rules_ops *mr_rules_ops;
|
|
|
|
#endif
|
2009-01-21 23:56:15 -05:00
|
|
|
#endif
|
2007-12-16 16:29:36 -05:00
|
|
|
};
|
|
|
|
#endif
|