Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   dyoung
Date:           Sat Feb 17 22:34:17 UTC 2007

Modified Files:
        src/sys/dev/ic: hd64570.c
        src/sys/dev/pci: if_lmc.c if_lmc.h
        src/sys/dev/usb: if_upl.c
        src/sys/dist/pf/net: if_pflog.c
        src/sys/kern: uipc_domain.c
        src/sys/net: if.c if.h if_arcsubr.c if_atm.h if_atmsubr.c if_bridge.c
            if_bridgevar.h if_ether.h if_ethersubr.c if_faith.c if_fddisubr.c
            if_gif.c if_gif.h if_gre.c if_hippisubr.c if_ieee1394subr.c
            if_loop.c if_ppp.c if_pppvar.h if_sl.c if_spppsubr.c if_srt.c
            if_stf.c if_strip.c if_tokensubr.c if_tun.c ppp_defs.h raw_cb.h
            raw_usrreq.c route.c route.h
        src/sys/netatalk: aarp.c at_control.c at_extern.h at_var.h ddp_input.c
            ddp_output.c ddp_usrreq.c
        src/sys/netinet: if_arp.c if_atm.c if_atm.h if_inarp.h in.h in_pcb.c
            in_route.c ip_carp.c ip_carp.h ip_encap.c ip_encap.h ip_etherip.c
            ip_flow.c ip_icmp.c ip_input.c ip_output.c ip_var.h raw_ip.c
            tcp_subr.c tcp_var.h udp_usrreq.c udp_var.h
        src/sys/netinet6: ah.h ah_input.c esp.h esp_input.c frag6.c icmp6.c
            in6.c in6.h in6_gif.c in6_gif.h in6_pcb.c in6_pcb.h in6_src.c
            in6_var.h ip6_etherip.c ip6_forward.c ip6_input.c ip6_mroute.c
            ip6_output.c ip6_var.h ip6protosw.h nd6.c nd6.h nd6_nbr.c raw_ip6.c
            udp6_output.c udp6_usrreq.c udp6_var.h
        src/sys/netipsec: ipsec.h ipsec6.h key.c
        src/sys/netiso: clnp.h clnp_debug.c cltp_usrreq.c cltp_var.h eonvar.h
            esis.c esis.h if_eon.c iso.c iso.h iso_pcb.c iso_pcb.h iso_snpac.c
            iso_var.h tp_inet.c tp_iso.c tp_pcb.c tp_var.h
        src/sys/netkey: key.c key.h
        src/sys/sys: protosw.h

Log Message:
KNF: de-__P, bzero -> memset, bcmp -> memcmp.  Remove extraneous
   parentheses in return statements.

Cosmetic: don't open-code TAILQ_FOREACH().

Cosmetic: change types of variables to avoid oodles of casts: in
   in6_src.c, avoid casts by changing several route_in6 pointers
   to struct route pointers.  Remove unnecessary casts to caddr_t
   elsewhere.

Pave the way for eliminating address family-specific route caches:
   soon, struct route will not embed a sockaddr, but it will hold
   a reference to an external sockaddr, instead.  We will set the
   destination sockaddr using rtcache_setdst().  (I created a stub
   for it, but it isn't used anywhere, yet.)  rtcache_free() will
   free the sockaddr.  I have extracted from rtcache_free() a helper
   subroutine, rtcache_clear().  rtcache_clear() will "forget" a
   cached route, but it will not forget the destination by releasing
   the sockaddr.  I use rtcache_clear() instead of rtcache_free()
   in rtcache_update(), because rtcache_update() is not supposed
   to forget the destination.

Constify:

   1 Introduce const accessor for route->ro_dst, rtcache_getdst().

   2 Constify the 'dst' argument to ifnet->if_output().  This
     led me to constify a lot of code called by output routines.

   3 Constify the sockaddr argument to protosw->pr_ctlinput.  This
     led me to constify a lot of code called by ctlinput routines.

   4 Introduce const macros for converting from a generic sockaddr
     to family-specific sockaddrs, e.g., sockaddr_in: satocsin6,
     satocsin, et cetera.


To generate a diff of this commit:
cvs rdiff -r1.34 -r1.35 src/sys/dev/ic/hd64570.c
cvs rdiff -r1.32 -r1.33 src/sys/dev/pci/if_lmc.c
cvs rdiff -r1.7 -r1.8 src/sys/dev/pci/if_lmc.h
cvs rdiff -r1.26 -r1.27 src/sys/dev/usb/if_upl.c
cvs rdiff -r1.8 -r1.9 src/sys/dist/pf/net/if_pflog.c
cvs rdiff -r1.62 -r1.63 src/sys/kern/uipc_domain.c
cvs rdiff -r1.180 -r1.181 src/sys/net/if.c
cvs rdiff -r1.121 -r1.122 src/sys/net/if.h
cvs rdiff -r1.52 -r1.53 src/sys/net/if_arcsubr.c
cvs rdiff -r1.15 -r1.16 src/sys/net/if_atm.h
cvs rdiff -r1.37 -r1.38 src/sys/net/if_atmsubr.c src/sys/net/if_faith.c
cvs rdiff -r1.47 -r1.48 src/sys/net/if_bridge.c
cvs rdiff -r1.8 -r1.9 src/sys/net/if_bridgevar.h
cvs rdiff -r1.43 -r1.44 src/sys/net/if_ether.h
cvs rdiff -r1.144 -r1.145 src/sys/net/if_ethersubr.c
cvs rdiff -r1.65 -r1.66 src/sys/net/if_fddisubr.c
cvs rdiff -r1.64 -r1.65 src/sys/net/if_gif.c
cvs rdiff -r1.14 -r1.15 src/sys/net/if_gif.h
cvs rdiff -r1.83 -r1.84 src/sys/net/if_gre.c
cvs rdiff -r1.25 -r1.26 src/sys/net/if_hippisubr.c
cvs rdiff -r1.32 -r1.33 src/sys/net/if_ieee1394subr.c
cvs rdiff -r1.62 -r1.63 src/sys/net/if_loop.c
cvs rdiff -r1.111 -r1.112 src/sys/net/if_ppp.c
cvs rdiff -r1.23 -r1.24 src/sys/net/if_pppvar.h
cvs rdiff -r1.103 -r1.104 src/sys/net/if_sl.c
cvs rdiff -r1.102 -r1.103 src/sys/net/if_spppsubr.c
cvs rdiff -r1.3 -r1.4 src/sys/net/if_srt.c
cvs rdiff -r1.56 -r1.57 src/sys/net/if_stf.c
cvs rdiff -r1.70 -r1.71 src/sys/net/if_strip.c
cvs rdiff -r1.44 -r1.45 src/sys/net/if_tokensubr.c
cvs rdiff -r1.95 -r1.96 src/sys/net/if_tun.c
cvs rdiff -r1.11 -r1.12 src/sys/net/ppp_defs.h
cvs rdiff -r1.19 -r1.20 src/sys/net/raw_cb.h
cvs rdiff -r1.30 -r1.31 src/sys/net/raw_usrreq.c
cvs rdiff -r1.85 -r1.86 src/sys/net/route.c
cvs rdiff -r1.50 -r1.51 src/sys/net/route.h
cvs rdiff -r1.21 -r1.22 src/sys/netatalk/aarp.c
cvs rdiff -r1.16 -r1.17 src/sys/netatalk/at_control.c
cvs rdiff -r1.13 -r1.14 src/sys/netatalk/at_extern.h
cvs rdiff -r1.4 -r1.5 src/sys/netatalk/at_var.h
cvs rdiff -r1.12 -r1.13 src/sys/netatalk/ddp_input.c
cvs rdiff -r1.10 -r1.11 src/sys/netatalk/ddp_output.c
cvs rdiff -r1.22 -r1.23 src/sys/netatalk/ddp_usrreq.c
cvs rdiff -r1.118 -r1.119 src/sys/netinet/if_arp.c
cvs rdiff -r1.21 -r1.22 src/sys/netinet/if_atm.c
cvs rdiff -r1.9 -r1.10 src/sys/netinet/if_atm.h
cvs rdiff -r1.37 -r1.38 src/sys/netinet/if_inarp.h
cvs rdiff -r1.77 -r1.78 src/sys/netinet/in.h src/sys/netinet/ip_var.h
cvs rdiff -r1.113 -r1.114 src/sys/netinet/in_pcb.c
cvs rdiff -r1.3 -r1.4 src/sys/netinet/in_route.c src/sys/netinet/ip_etherip.c
cvs rdiff -r1.10 -r1.11 src/sys/netinet/ip_carp.c src/sys/netinet/ip_encap.h
cvs rdiff -r1.2 -r1.3 src/sys/netinet/ip_carp.h
cvs rdiff -r1.28 -r1.29 src/sys/netinet/ip_encap.c
cvs rdiff -r1.39 -r1.40 src/sys/netinet/ip_flow.c
cvs rdiff -r1.108 -r1.109 src/sys/netinet/ip_icmp.c
cvs rdiff -r1.242 -r1.243 src/sys/netinet/ip_input.c
cvs rdiff -r1.177 -r1.178 src/sys/netinet/ip_output.c
cvs rdiff -r1.94 -r1.95 src/sys/netinet/raw_ip.c
cvs rdiff -r1.210 -r1.211 src/sys/netinet/tcp_subr.c
cvs rdiff -r1.143 -r1.144 src/sys/netinet/tcp_var.h
cvs rdiff -r1.156 -r1.157 src/sys/netinet/udp_usrreq.c
cvs rdiff -r1.31 -r1.32 src/sys/netinet/udp_var.h
cvs rdiff -r1.22 -r1.23 src/sys/netinet6/ah.h src/sys/netinet6/esp.h
cvs rdiff -r1.51 -r1.52 src/sys/netinet6/ah_input.c
cvs rdiff -r1.41 -r1.42 src/sys/netinet6/esp_input.c
cvs rdiff -r1.34 -r1.35 src/sys/netinet6/frag6.c src/sys/netinet6/in6_src.c
cvs rdiff -r1.129 -r1.130 src/sys/netinet6/icmp6.c
cvs rdiff -r1.122 -r1.123 src/sys/netinet6/in6.c
cvs rdiff -r1.58 -r1.59 src/sys/netinet6/in6.h
cvs rdiff -r1.48 -r1.49 src/sys/netinet6/in6_gif.c src/sys/netinet6/in6_var.h
cvs rdiff -r1.11 -r1.12 src/sys/netinet6/in6_gif.h
cvs rdiff -r1.82 -r1.83 src/sys/netinet6/in6_pcb.c
cvs rdiff -r1.30 -r1.31 src/sys/netinet6/in6_pcb.h
cvs rdiff -r1.3 -r1.4 src/sys/netinet6/ip6_etherip.c
cvs rdiff -r1.54 -r1.55 src/sys/netinet6/ip6_forward.c
cvs rdiff -r1.94 -r1.95 src/sys/netinet6/ip6_input.c
cvs rdiff -r1.77 -r1.78 src/sys/netinet6/ip6_mroute.c
cvs rdiff -r1.114 -r1.115 src/sys/netinet6/ip6_output.c
cvs rdiff -r1.37 -r1.38 src/sys/netinet6/ip6_var.h
cvs rdiff -r1.17 -r1.18 src/sys/netinet6/ip6protosw.h
cvs rdiff -r1.109 -r1.110 src/sys/netinet6/nd6.c
cvs rdiff -r1.42 -r1.43 src/sys/netinet6/nd6.h
cvs rdiff -r1.69 -r1.70 src/sys/netinet6/nd6_nbr.c
cvs rdiff -r1.81 -r1.82 src/sys/netinet6/raw_ip6.c
cvs rdiff -r1.27 -r1.28 src/sys/netinet6/udp6_output.c
cvs rdiff -r1.75 -r1.76 src/sys/netinet6/udp6_usrreq.c
cvs rdiff -r1.20 -r1.21 src/sys/netinet6/udp6_var.h
cvs rdiff -r1.17 -r1.18 src/sys/netipsec/ipsec.h
cvs rdiff -r1.5 -r1.6 src/sys/netipsec/ipsec6.h
cvs rdiff -r1.35 -r1.36 src/sys/netipsec/key.c
cvs rdiff -r1.21 -r1.22 src/sys/netiso/clnp.h
cvs rdiff -r1.17 -r1.18 src/sys/netiso/clnp_debug.c src/sys/netiso/iso.h
cvs rdiff -r1.30 -r1.31 src/sys/netiso/cltp_usrreq.c
cvs rdiff -r1.15 -r1.16 src/sys/netiso/cltp_var.h
cvs rdiff -r1.14 -r1.15 src/sys/netiso/eonvar.h src/sys/netiso/iso_pcb.h
cvs rdiff -r1.43 -r1.44 src/sys/netiso/esis.c
cvs rdiff -r1.19 -r1.20 src/sys/netiso/esis.h
cvs rdiff -r1.55 -r1.56 src/sys/netiso/if_eon.c
cvs rdiff -r1.39 -r1.40 src/sys/netiso/iso.c
cvs rdiff -r1.36 -r1.37 src/sys/netiso/iso_pcb.c
cvs rdiff -r1.41 -r1.42 src/sys/netiso/iso_snpac.c
cvs rdiff -r1.23 -r1.24 src/sys/netiso/iso_var.h
cvs rdiff -r1.33 -r1.34 src/sys/netiso/tp_inet.c
cvs rdiff -r1.28 -r1.29 src/sys/netiso/tp_iso.c
cvs rdiff -r1.32 -r1.33 src/sys/netiso/tp_pcb.c
cvs rdiff -r1.13 -r1.14 src/sys/netiso/tp_var.h
cvs rdiff -r1.151 -r1.152 src/sys/netkey/key.c
cvs rdiff -r1.20 -r1.21 src/sys/netkey/key.h
cvs rdiff -r1.39 -r1.40 src/sys/sys/protosw.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index