summaryrefslogtreecommitdiffstats
path: root/sys/netinet/in.h
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1998-05-19 14:04:36 +0000
committerdg <dg@FreeBSD.org>1998-05-19 14:04:36 +0000
commit5f8a4130d8dd1d4441beb5fba01ab53b331a9111 (patch)
treeaaed0538d112feb998dd062f62a7e8e220668f46 /sys/netinet/in.h
parentc3415a2524903047d0a79dad7753c33f98e0f235 (diff)
downloadFreeBSD-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.h')
-rw-r--r--sys/netinet/in.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index d36bb74..e5c68af 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)in.h 8.3 (Berkeley) 1/3/94
- * $Id: in.h,v 1.31 1998/04/19 17:22:27 phk Exp $
+ * $Id: in.h,v 1.32 1998/05/10 20:51:46 jb Exp $
*/
#ifndef _NETINET_IN_H_
@@ -398,7 +398,8 @@ struct ip_mreq {
#define IPCTL_INTRQDROPS 11 /* number of netisr q drops */
#define IPCTL_STATS 12 /* ipstat structure */
#define IPCTL_ACCEPTSOURCEROUTE 13 /* may accept source routed packets */
-#define IPCTL_MAXID 14
+#define IPCTL_FASTFORWARDING 14 /* use fast IP forwarding code */
+#define IPCTL_MAXID 15
#define IPCTL_NAMES { \
{ 0, 0 }, \
@@ -415,6 +416,7 @@ struct ip_mreq {
{ "intr-queue-drops", CTLTYPE_INT }, \
{ "stats", CTLTYPE_STRUCT }, \
{ "accept_sourceroute", CTLTYPE_INT }, \
+ { "fastforwarding", CTLTYPE_INT }, \
}
OpenPOWER on IntegriCloud