diff options
author | dg <dg@FreeBSD.org> | 1998-05-19 14:04:36 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1998-05-19 14:04:36 +0000 |
commit | 5f8a4130d8dd1d4441beb5fba01ab53b331a9111 (patch) | |
tree | aaed0538d112feb998dd062f62a7e8e220668f46 /sys/netinet/in_var.h | |
parent | c3415a2524903047d0a79dad7753c33f98e0f235 (diff) | |
download | FreeBSD-src-5f8a4130d8dd1d4441beb5fba01ab53b331a9111.zip FreeBSD-src-5f8a4130d8dd1d4441beb5fba01ab53b331a9111.tar.gz |
Added fast IP forwarding code by Matt Thomas <matt@3am-software.com> via
NetBSD, ported to FreeBSD by Pierre Beyssac <pb@fasterix.freenix.org> and
minorly tweaked by me.
This is a standard part of FreeBSD, but must be enabled with:
"sysctl -w net.inet.ip.fastforwarding=1" ...and of course forwarding must
also be enabled. This should probably be modified to use the zone
allocator for speed and space efficiency. The current algorithm also
appears to lose if the number of active paths exceeds IPFLOW_MAX (256),
in which case it wastes lots of time trying to figure out which cache
entry to drop.
Diffstat (limited to 'sys/netinet/in_var.h')
-rw-r--r-- | sys/netinet/in_var.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 83f5baa..9254904 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)in_var.h 8.2 (Berkeley) 1/9/95 - * $Id: in_var.h,v 1.26 1997/04/27 20:01:06 wollman Exp $ + * $Id: in_var.h,v 1.27 1997/09/07 05:26:43 bde Exp $ */ #ifndef _NETINET_IN_VAR_H_ @@ -211,6 +211,7 @@ do { \ IN_NEXT_MULTI((step), (inm)); \ } while(0) +struct route; struct in_multi *in_addmulti __P((struct in_addr *, struct ifnet *)); void in_delmulti __P((struct in_multi *)); int in_control __P((struct socket *, int, caddr_t, struct ifnet *, @@ -219,6 +220,9 @@ void in_rtqdrain __P((void)); void ip_input __P((struct mbuf *)); int in_ifadown __P((struct ifaddr *ifa)); void in_ifscrub __P((struct ifnet *, struct in_ifaddr *)); +int ipflow_fastforward __P((struct mbuf *)); +void ipflow_create __P((const struct route *, struct mbuf *)); +void ipflow_slowtimo __P((void)); #endif /* KERNEL */ |