NetBSD/sys/net
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
..
agr Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
bpf_filter.c Use be16dec() and be32dec() instead of reimplementing them. 2007-01-27 07:16:01 +00:00
bpf.c Replace a simple lock with a mutex and make it static (as it's only used 2007-07-11 21:26:53 +00:00
bpf.h
bpfdesc.h Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
bridgestp.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
bsd-comp.c
dlt.h
ethertypes.h
files.pf
if_arc.h
if_arcsubr.c Remove unused #define SIN(). From he@. 2007-02-19 21:18:23 +00:00
if_arp.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_atm.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
if_atmsubr.c Add IPv6 Fast Forward - the IPv4 counterpart: 2007-03-07 22:20:04 +00:00
if_bridge.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
if_bridgevar.h Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
if_dl.h
if_eco.h
if_ecosubr.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
if_ether.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_etherip.c Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_etherip.h Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_ethersubr.c Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_faith.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_faith.h
if_fddi.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_fddisubr.c Add IPv6 Fast Forward - the IPv4 counterpart: 2007-03-07 22:20:04 +00:00
if_gif.c Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_gif.h Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_gre.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
if_gre.h Switch from spl(9) to mutex(9) and condvar(9). 2007-05-06 02:47:52 +00:00
if_hippi.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_hippisubr.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_ieee1394.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_ieee1394subr.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_llc.h
if_loop.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_media.c Add a sockaddr_storage member to "struct ifreq" maintaining backwards 2007-05-29 21:32:27 +00:00
if_media.h
if_ppp.c Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_ppp.h
if_pppoe.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
if_pppoe.h Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_pppvar.h Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_sl.c Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_slvar.h Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_sppp.h
if_spppsubr.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
if_spppvar.h
if_srt.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_srt.h
if_stf.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
if_stf.h
if_strip.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
if_stripvar.h Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
if_tap.c Move the nasty ifdefs in one place. Requested by ad and dyoung. 2007-05-30 21:02:02 +00:00
if_tap.h
if_token.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_tokensubr.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_tun.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_tun.h
if_types.h
if_vlan.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
if_vlanvar.h
if.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
if.h Add a sockaddr_storage member to "struct ifreq" maintaining backwards 2007-05-29 21:32:27 +00:00
link_proto.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
Makefile Install <net/if_pflog.h>. 2007-01-13 14:13:53 +00:00
net_osdep.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
netisr_dispatch.h Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
netisr.h Generic soft interrupts are mandatory. 2007-07-14 21:02:36 +00:00
pfil.c
pfil.h
pfkeyv2.h
ppp_defs.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
ppp_tty.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
ppp-comp.h
ppp-deflate.c
radix.c Cosmetic: KNF. Shorten a staircase. 2007-07-12 04:28:59 +00:00
radix.h Get rid of radix_node_head.rnh_walktree, because it is only ever 2007-06-09 03:07:21 +00:00
raw_cb.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
raw_cb.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
raw_usrreq.c Cosmetic: make the macro 'equal' into an inline subroutine, bcmp 2007-05-06 06:21:26 +00:00
route.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
route.h Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
rtsock.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
slcompress.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
slcompress.h
slip.h
zlib.c
zlib.h