Date: Mon, 6 May 1996 10:42:15 -0700 (PDT) From: Garrett Wollman <wollman> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/netinet in_rmx.c ip_output.c src/sys/net route.h Message-ID: <199605061742.KAA27207@freefall.freebsd.org>
index | next in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605061742.KAA27207>
