linux-stable/include
Patrick McHardy f0ad0860d0 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 14:49:34 -07:00
..
acpi acpi: Support IBM SMBus CMI devices 2010-03-24 14:38:37 +01:00
asm-generic dma-mapping: pci: move pci_set_dma_mask and pci_set_consistent_dma_mask to pci-dma-compat.h 2010-03-12 15:52:42 -08:00
crypto
drm Merge branch 'master' into export-slabh 2010-04-05 11:37:28 +09:00
keys
linux ipv4: ipmr: support multiple tables 2010-04-13 14:49:34 -07:00
math-emu
media Merge branch 'for-next' into for-linus 2010-03-08 16:55:37 +01:00
mtd
net ipv4: ipmr: support multiple tables 2010-04-13 14:49:34 -07:00
pcmcia pcmcia: use dev_pm_ops for class pcmcia_socket_class 2010-03-24 11:00:11 +01:00
rdma Merge branch 'misc' into for-next 2010-03-01 23:52:31 -08:00
rxrpc
scsi include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sound Merge branch 'fix/asoc' into for-linus 2010-04-07 09:54:41 +02:00
trace Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2010-04-09 11:50:29 -07:00
video broadsheetfb: support storing waveform 2010-03-12 15:52:34 -08:00
xen include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kbuild