diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-10-11 11:41:09 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2010-10-11 11:41:09 +0000 |
commit | fa7d763dca81101fef4d9041f72d9cb4c3d4e120 (patch) | |
tree | 1b006a368d07ece83e8cb84d34413fa22712e3d8 /sys/net/route.h | |
parent | cf755931cdd73183d6abfd2c4af6ace6e369507e (diff) |
Implement an rtsocket filter for rtableids. A process will initially
only get messages that are for the rtable the process is bound to.
Depending on the rtm_type the rdomain or rtable id are used for
comparison. It is possible to change the filter with a setsockopt(s,
AF_ROUTE, ROUTE_TABLEFILTER,...) and if set to RTABLE_ANY the filter
is deactivated. Additionally set the tableid in struct if_msghdr
to the rdomain id and use the process rtableid in the sysctl if no
table was specified.
OK henning@
Diffstat (limited to 'sys/net/route.h')
-rw-r--r-- | sys/net/route.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/route.h b/sys/net/route.h index 8ab5284bc3e..9fcc922b71f 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -1,4 +1,4 @@ -/* $OpenBSD: route.h,v 1.73 2010/08/25 14:07:24 claudio Exp $ */ +/* $OpenBSD: route.h,v 1.74 2010/10/11 11:41:08 claudio Exp $ */ /* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */ /* @@ -277,8 +277,11 @@ struct rt_msghdr { */ #define ROUTE_MSGFILTER 1 /* bitmask to specifiy which types should be sent to the client. */ +#define ROUTE_TABLEFILTER 2 /* change routing table the socket is listening + on, RTABLE_ANY listens on all tables. */ #define ROUTE_FILTER(m) (1 << (m)) +#define RTABLE_ANY 0xffffffff struct rt_addrinfo { int rti_addrs; |