NetBSD/sys/netinet6
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
..
Makefile
ah.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
ah_aesxcbcmac.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
ah_aesxcbcmac.h
ah_core.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
ah_input.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
ah_output.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
dest6.c
esp.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
esp_aesctr.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
esp_aesctr.h
esp_core.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
esp_input.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
esp_output.c fix typos in previous 2007-05-23 17:32:46 +00:00
esp_rijndael.c
esp_rijndael.h
files.ipsec
files.netinet6 Add IPv6 Fast Forward - the IPv4 counterpart: 2007-03-07 22:20:04 +00:00
frag6.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
icmp6.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
in6.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
in6.h Add functions to do mapped address conversions from FreeBSD. 2007-06-28 21:03:47 +00:00
in6_cksum.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
in6_gif.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
in6_gif.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
in6_ifattach.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
in6_ifattach.h
in6_offload.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
in6_offload.h Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
in6_pcb.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
in6_pcb.h Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
in6_proto.c In AppleTalk, IPv4, and IPv6 routing domains, help sockaddr_cmp() 2007-05-06 02:56:37 +00:00
in6_src.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
in6_var.h Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
ip6_etherip.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
ip6_etherip.h
ip6_flow.c Remove obsolete files netinet/in_route.[ch]. 2007-05-02 22:39:03 +00:00
ip6_forward.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
ip6_id.c
ip6_input.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
ip6_mroute.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
ip6_mroute.h Remove unused member 'm6_route' from struct mif6. 2007-04-25 01:12:46 +00:00
ip6_output.c don't increment `ip6stat.ip6s_noroute' here, it has already been done in 2007-06-02 23:26:26 +00:00
ip6_var.h Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
ip6protosw.h Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
ipcomp.h
ipcomp_core.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
ipcomp_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
ipcomp_output.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
ipsec.c fix printf format. 2007-07-10 18:25:50 +00:00
ipsec.h Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
mld6.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
mld6_var.h
nd6.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
nd6.h Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
nd6_nbr.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
nd6_rtr.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
pim6.h
pim6_var.h
raw_ip6.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
raw_ip6.h
route6.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
scope6.c
scope6_var.h
udp6.h
udp6_output.c Ansify + add a few comments, from Karl Sjödahl 2007-05-23 17:14:59 +00:00
udp6_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
udp6_var.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00