From owner-cvs-all@FreeBSD.ORG Sun Apr 25 02:24:52 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF21516A4CE; Sun, 25 Apr 2004 02:24:52 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B274B43D53; Sun, 25 Apr 2004 02:24:52 -0700 (PDT) (envelope-from luigi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i3P9OqGe094110; Sun, 25 Apr 2004 02:24:52 -0700 (PDT) (envelope-from luigi@repoman.freebsd.org) Received: (from luigi@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i3P9OqSJ094109; Sun, 25 Apr 2004 02:24:52 -0700 (PDT) (envelope-from luigi) Message-Id: <200404250924.i3P9OqSJ094109@repoman.freebsd.org> From: Luigi Rizzo Date: Sun, 25 Apr 2004 02:24:52 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/net if_arcsubr.c if_atmsubr.c if_ethersubr.c if_fddisubr.c if_iso88025subr.c src/sys/netatalk aarp.c at_extern.h src/sys/netinet if_ether.c src/sys/netinet6 nd6.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2004 09:24:53 -0000 luigi 2004/04/25 02:24:52 PDT FreeBSD src repository Modified files: sys/net if_arcsubr.c if_atmsubr.c if_ethersubr.c if_fddisubr.c if_iso88025subr.c sys/netatalk aarp.c at_extern.h sys/netinet if_ether.c sys/netinet6 nd6.c Log: This commit does two things: 1. rt_check() cleanup: rt_check() is only necessary for some address families to gain access to the corresponding arp entry, so call it only in/near the *resolve() routines where it is actually used -- at the moment this is arpresolve(), nd6_storelladdr() (the call is embedded here), and atmresolve() (the call is just before atmresolve to reduce the number of changes). This change will make it a lot easier to decouple the arp table from the routing table. There is an extra call to rt_check() in if_iso88025subr.c to determine the routing info length. I have left it alone for the time being. The interface of arpresolve() and nd6_storelladdr() now changes slightly: + the 'rtentry' parameter (really a hint from the upper level layer) is now passed unchanged from *_output(), so it becomes the route to the final destination and not to the gateway. + the routines will return 0 if resolution is possible, non-zero otherwise. + arpresolve() returns EWOULDBLOCK in case the mbuf is being held waiting for an arp reply -- in this case the error code is masked in the caller so the upper layer protocol will not see a failure. 2. arpcom untangling Where possible, use 'struct ifnet' instead of 'struct arpcom' variables, and use the IFP2AC macro to access arpcom fields. This mostly affects the netatalk code. === Detailed changes: === net/if_arcsubr.c rt_check() cleanup, remove a useless variable net/if_atmsubr.c rt_check() cleanup net/if_ethersubr.c rt_check() cleanup, arpcom untangling net/if_fddisubr.c rt_check() cleanup, arpcom untangling net/if_iso88025subr.c rt_check() cleanup netatalk/aarp.c arpcom untangling, remove a block of duplicated code netatalk/at_extern.h arpcom untangling netinet/if_ether.c rt_check() cleanup (change arpresolve) netinet6/nd6.c rt_check() cleanup (change nd6_storelladdr) Revision Changes Path 1.20 +8 -16 src/sys/net/if_arcsubr.c 1.35 +10 -8 src/sys/net/if_atmsubr.c 1.169 +10 -18 src/sys/net/if_ethersubr.c 1.94 +7 -12 src/sys/net/if_fddisubr.c 1.64 +8 -7 src/sys/net/if_iso88025subr.c 1.31 +33 -36 src/sys/netatalk/aarp.c 1.14 +1 -1 src/sys/netatalk/at_extern.h 1.124 +28 -7 src/sys/netinet/if_ether.c 1.42 +13 -6 src/sys/netinet6/nd6.c