OpenCloudOS-Kernel/include/net/netns
Patrick McHardy d1db275dd3 ipv6: ip6mr: 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 MRT6_TABLE. The table number is
stored in the raw socket data and affects all following ip6mr setsockopt(),
getsockopt() and ioctl() calls. By default, a single table (RT6_TABLE_DFLT)
is created with a default routing rule pointing to it. Newly created pim6reg
devices have the table number appended ("pim6regX"), with the exception of
devices created in the default table, which are named just "pim6reg" 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, SOL_IPV6, MRT6_TABLE, &table, sizeof(table));

- create routing rules directing packets to the new table:

# ip -6 mrule add iif eth0 lookup 123
# ip -6 mrule add oif eth0 lookup 123

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-05-11 14:40:55 +02:00
..
conntrack.h percpu: add __percpu sparse annotations to net 2010-02-16 23:05:38 -08:00
core.h percpu: add __percpu sparse annotations to net 2010-02-16 23:05:38 -08:00
dccp.h [NETNS][DCCPV6]: Move the dccp_v6_ctl_sk on the struct net. 2008-04-13 22:32:25 -07:00
generic.h net: disallow to use net_assign_generic externally 2010-04-27 15:49:02 -07:00
hash.h netns: introduce the net_hash_mix "salt" for hashes 2008-06-16 17:14:11 -07:00
ipv4.h ipv4: remove ip_rt_secret timer (v4) 2010-05-08 01:57:52 -07:00
ipv6.h ipv6: ip6mr: support multiple tables 2010-05-11 14:40:55 +02:00
mib.h netns xfrm: per-netns MIBs 2008-11-25 17:59:52 -08:00
packet.h packet: convert socket list to RCU (v3) 2010-02-22 15:45:56 -08:00
unix.h [NETNS]: struct net content re-work (v3) 2008-01-28 14:57:14 -08:00
x_tables.h net, netns_xt: shrink netns_xt members 2009-07-05 19:16:18 -07:00
xfrm.h netns xfrm: deal with dst entries in netns 2010-01-24 22:47:53 -08:00