NetBSD/sys/netinet
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 Remove obsolete files netinet/in_route.[ch]. 2007-05-02 22:39:03 +00:00
files.ipfilter
files.netinet Remove obsolete files netinet/in_route.[ch]. 2007-05-02 22:39:03 +00:00
icmp6.h
icmp_var.h
if_arp.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
if_atm.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
if_atm.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
if_ether.h
if_inarp.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
igmp.c Get rid of some gratuitous casts and join some lines. 2007-04-25 00:11:18 +00:00
igmp.h
igmp_var.h
in.c Cosmetic: shorten a staircase. bzero -> memset. KNF. 2007-04-15 06:15:58 +00:00
in.h Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
in4_cksum.c Pass (char *) to mtod(9) on address calculation. 2007-03-04 10:53:32 +00:00
in_cksum.c
in_gif.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
in_gif.h New EtherIP driver based on tap(4) and gif(4) by Hans Rosenfeld. 2006-11-23 04:07:07 +00:00
in_ifattach.h Add a source-address selection policy mechanism to the kernel. 2006-11-13 05:13:38 +00:00
in_offload.c Constify. 2007-04-24 23:43:50 +00:00
in_offload.h Constify. 2007-04-24 23:43:50 +00:00
in_pcb.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
in_pcb.h
in_pcb_hdr.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
in_proto.c Use __arraycount(). 2007-06-13 21:08:29 +00:00
in_proto.h
in_selsrc.c Reverse sense of preference numbers: prefer source addresses with 2007-02-22 08:08:40 +00:00
in_selsrc.h Add a source-address selection policy mechanism to the kernel. 2006-11-13 05:13:38 +00:00
in_systm.h
in_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
ip.h According to ANSI c the only portably defined bitfields are unsigned int ones. 2006-12-17 20:07:36 +00:00
ip6.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
ip_carp.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
ip_carp.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
ip_ecn.c
ip_ecn.h
ip_encap.c Use LIST_FOREACH(). 2007-06-13 04:55:25 +00:00
ip_encap.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
ip_etherip.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
ip_etherip.h New EtherIP driver based on tap(4) and gif(4) by Hans Rosenfeld. 2006-11-23 04:07:07 +00:00
ip_flow.c Remove obsolete files netinet/in_route.[ch]. 2007-05-02 22:39:03 +00:00
ip_gre.c Oops, commit this straggler from the last change to net/if_gre.[ch]. 2007-05-06 02:48:38 +00:00
ip_gre.h
ip_icmp.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
ip_icmp.h
ip_id.c
ip_input.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
ip_mroute.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
ip_mroute.h Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
ip_output.c Eliminate address family-specific route caches (struct route, struct 2007-05-02 20:40:22 +00:00
ip_var.h Add net.inet.ip.hashsize to control the IPv4 fast forward hash table size. 2007-03-25 20:12:20 +00:00
pim.h
pim_var.h
raw_ip.c KNF. Use sockaddr_in_init(). Shorten staircases. No functional 2007-05-12 02:10:25 +00:00
tcp.h - per socket keepalive settings 2007-06-20 15:29:17 +00:00
tcp_congctl.c Replace a simple lock with a mutex and make it static. 2007-07-11 21:34:16 +00:00
tcp_congctl.h constify. 2006-10-21 10:24:47 +00:00
tcp_debug.c Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tcp_debug.h Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tcp_fsm.h
tcp_input.c Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
tcp_output.c Fix compilation in the TCP_SIGNATURE case: 2007-05-18 21:48:43 +00:00
tcp_sack.c Pass an ipl argument to pool_init/POOL_INIT to be used when initializing 2007-03-12 18:18:22 +00:00
tcp_seq.h
tcp_subr.c Take steps to hide the radix_node implementation of the forwarding table 2007-07-19 20:48:52 +00:00
tcp_timer.c - per socket keepalive settings 2007-06-20 15:29:17 +00:00
tcp_timer.h - per socket keepalive settings 2007-06-20 15:29:17 +00:00
tcp_usrreq.c Handle mapped and scoped ipv6 addresses. From Anon Ymous. 2007-06-28 21:11:12 +00:00
tcp_var.h Merge some of the less invasive changes from the vmlocking branch: 2007-07-09 20:51:58 +00:00
tcpip.h
udp.h
udp_usrreq.c Add support for options IPSEC_NAT_T (RFC 3947 and 3948) for fast_ipsec(4). 2007-06-27 20:38:32 +00:00
udp_var.h KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00