NetBSD/sys/dist/pf/net
dyoung 5493f188c7 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.
2007-02-17 22:34:07 +00:00
..
if_pflog.c KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous 2007-02-17 22:34:07 +00:00
if_pflog.h merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
pf_if.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
pf_ioctl.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
pf_norm.c __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
pf_osfp.c merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
pf_table.c Make code concise by removing uninformative #ifdef's. 2006-12-04 03:02:48 +00:00
pf.c In pf_rtlabel_match, use rtcache_free()/rtcache_init(). This is 2007-02-17 21:08:52 +00:00
pfvar.h Lightly constify. Helps compile-time checking that we are not 2006-12-04 02:58:06 +00:00