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
Makefile
README
argo_debug.h
clnl.h
clnp.h
clnp_debug.c
clnp_er.c
clnp_frag.c
clnp_input.c
clnp_options.c
clnp_output.c
clnp_raw.c
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
cltp_usrreq.c
cltp_var.h
cons.h
cons_pcb.h
eonvar.h
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
idrp_usrreq.c
idrp_var.h
if_eon.c
iso.c
iso.h
iso_chksum.c
iso_errno.h
iso_pcb.c
iso_pcb.h
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
tp.trans
tp_astring.c
tp_clnp.h
tp_cons.c
tp_driver.c
tp_emit.c
tp_events.h
tp_inet.c
tp_input.c
tp_ip.h
tp_iso.c
tp_meas.c
tp_meas.h
tp_output.c
tp_param.h
tp_pcb.c
tp_pcb.h
tp_seq.h
tp_stat.h
tp_states.h
tp_states.init
tp_subr.c
tp_subr2.c
tp_timer.c
tp_timer.h
tp_tpdu.h
tp_trace.c
tp_trace.h
tp_user.h
tp_usrreq.c
tp_var.h

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