From owner-cvs-sys Mon May 6 10:43:44 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA27242 for cvs-sys-outgoing; Mon, 6 May 1996 10:43:44 -0700 (PDT) Received: (from wollman@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA27207 Mon, 6 May 1996 10:42:15 -0700 (PDT) Date: Mon, 6 May 1996 10:42:15 -0700 (PDT) From: Garrett Wollman Message-Id: <199605061742.KAA27207@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/netinet in_rmx.c ip_output.c src/sys/net route.h Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wollman 96/05/06 10:42:15 Modified: sys/net route.h sys/netinet in_rmx.c ip_output.c Log: Add three new route flags to help determine what sort of address the destination represents. For IP: - Iff it is a host route, RTF_LOCAL and RTF_BROADCAST indicate local (belongs to this host) and broadcast addresses, respectively. - For all routes, RTF_MULTICAST is set if the destination is multicast. The RTF_BROADCAST flag is used by ip_output() to eliminate a call to in_broadcast() in a common case; this gives about 1% in our packet-generation experiments. All three flags might be used (although they aren't now) to determine whether a packet can be forwarded; a given host route can represent a forwardable address if: (rt->rt_flags & (RTF_HOST | RTF_LOCAL | RTF_BROADCAST | RTF_MULTICAST)) == RTF_HOST Obviously, one still has to do all the work if a host route is not present, but this code allows one to cache the results of such a lookup if rtalloc1() is called without masking RTF_PRCLONING. Revision Changes Path 1.21 +5 -2 src/sys/net/route.h 1.25 +33 -4 src/sys/netinet/in_rmx.c 1.37 +10 -5 src/sys/netinet/ip_output.c