diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2006-06-01 05:21:07 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2006-06-01 05:21:07 +0000 |
commit | 5bb57997ba63ec1e323ccd016a62a823fcc37a85 (patch) | |
tree | ec9f2f4c5470556c2722c85ca767b347790e895a /sys/net/route.h | |
parent | 155557ab018401b6e1c377b443afd2dfc2f324db (diff) |
use the table ID as array index directly, faster in the forwarding path
we trade higher memory consumption if the user doesn't use continous table
IDs, but in the worst case (table IDs 0 and 255, 64bit machine) that is 2KB
ok claudio ryan
Diffstat (limited to 'sys/net/route.h')
-rw-r--r-- | sys/net/route.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/route.h b/sys/net/route.h index c2622e94ac8..add43964d08 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -1,4 +1,4 @@ -/* $OpenBSD: route.h,v 1.40 2006/05/31 01:35:11 henning Exp $ */ +/* $OpenBSD: route.h,v 1.41 2006/06/01 05:21:06 henning Exp $ */ /* $NetBSD: route.h,v 1.9 1996/02/13 22:00:49 christos Exp $ */ /* @@ -304,6 +304,8 @@ void rtlabel_unref(u_int16_t); #define ONNET_CLONING 1 #define NO_CLONING 2 +#define RT_TABLEID_MAX 255 + extern struct route_cb route_cb; extern struct rtstat rtstat; extern const struct sockaddr_rtin rt_defmask4; |