NetBSD/sys/netiso
dyoung 08e6f22226 Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.
2007-07-19 20:48:52 +00:00
..
xebec TRUE -> true, FALSE -> false 2007-02-22 06:16:03 +00:00
Makefile
README
argo_debug.h
clnl.h
clnp.h Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
clnp_debug.c KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
clnp_er.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
clnp_frag.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
clnp_input.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
clnp_options.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
clnp_output.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
clnp_raw.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
clnp_stat.h
clnp_subr.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
clnp_timer.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
cltp_usrreq.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
cltp_var.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
cons.h
cons_pcb.h
eonvar.h Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
esis.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
esis.h Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
files.netiso Remove netiso/if_cons.c. It depends on x25 stuff that was removed a while 2007-01-11 00:00:41 +00:00
idrp_usrreq.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
idrp_var.h merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
if_eon.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
iso.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
iso.h Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
iso_chksum.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
iso_errno.h
iso_pcb.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
iso_pcb.h Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
iso_proto.c In AppleTalk, IPv4, and IPv6 routing domains, help sockaddr_cmp() 2007-05-06 02:56:37 +00:00
iso_snpac.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
iso_snpac.h
iso_var.h Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
tp.trans merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
tp_astring.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
tp_clnp.h
tp_cons.c Move #include <sys/param.h> that's included in both parts of an #if/#else 2007-03-26 22:49:22 +00:00
tp_driver.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
tp_emit.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_events.h
tp_inet.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_input.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_ip.h
tp_iso.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
tp_meas.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_meas.h
tp_output.c fix typos 2007-04-29 20:23:34 +00:00
tp_param.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_pcb.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_pcb.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_seq.h
tp_stat.h
tp_states.h
tp_states.init
tp_subr.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_subr2.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_timer.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_timer.h
tp_tpdu.h
tp_trace.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_trace.h
tp_user.h
tp_usrreq.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tp_var.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00

README

In case you were wondering why this code is still present:

The ISO (or OSI) stack is still in use by many router vendors (e.g., using
IS-IS the OSI equivalent of OSPF, to carry IP routes).

Chris.
chopps@NetBSD.org