net: rtnetlink: decouple rtnetlink address families from real address families

Decouple rtnetlink address families from real address families in socket.h to
be able to add rtnetlink interfaces to code that is not a real address family
without increasing AF_MAX/NPROTO.

This will be used to add support for multicast route dumping from all tables
as the proc interface can't be extended to support anything but the main table
without breaking compatibility.

This partialy undoes the patch to introduce independant families for routing
rules and converts ipmr routing rules to a new rtnetlink family. Similar to
that patch, values up to 127 are reserved for real address families, values
above that may be used arbitrarily.

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy
2010-04-26 16:02:05 +02:00
parent 3d0c9c4eb2
commit 25239cee7e
7 changed files with 17 additions and 19 deletions

View File

@@ -15,14 +15,6 @@
/* try to find source address in routing lookups */
#define FIB_RULE_FIND_SADDR 0x00010000
/* fib_rules families. values up to 127 are reserved for real address
* families, values above 128 may be used arbitrarily.
*/
#define FIB_RULES_IPV4 AF_INET
#define FIB_RULES_IPV6 AF_INET6
#define FIB_RULES_DECNET AF_DECnet
#define FIB_RULES_IPMR 128
struct fib_rule_hdr {
__u8 family;
__u8 dst_len;