From owner-freebsd-net Sat Nov 3 10:17:40 2001 Delivered-To: freebsd-net@freebsd.org Received: from apollo.sitaranetworks.com (apollo.sitaranetworks.com [199.103.141.105]) by hub.freebsd.org (Postfix) with ESMTP id DDFE537B416 for ; Sat, 3 Nov 2001 10:17:37 -0800 (PST) Received: from rios.sitaranetworks.com (rios.sitaranetworks.com [199.103.141.78]) by apollo.sitaranetworks.com (8.10.2+Sun/8.9.3) with ESMTP id fA3IHBp14913; Sat, 3 Nov 2001 13:17:11 -0500 (EST) Received: by rios.sitaranetworks.com with Internet Mail Service (5.5.2653.19) id ; Sat, 3 Nov 2001 13:17:25 -0500 Message-ID: <31269226357BD211979E00A0C9866DAB01BE79AC@rios.sitaranetworks.com> From: Jim McGrath To: "'Luigi Rizzo'" , net@FreeBSD.ORG, mjacob@feral.com Subject: RE: softc, ifnet and arpcom overlay Date: Sat, 3 Nov 2001 13:17:24 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Check mii.c, miibus_attach() Jim -----Original Message----- From: Luigi Rizzo [mailto:rizzo@aciri.org] Sent: Saturday, November 03, 2001 12:12 PM To: net@FreeBSD.ORG; mjacob@feral.com Subject: softc, ifnet and arpcom overlay Hi, i remember early in october this topic came out, but while i can easily find out where the arpcom/ifnet overlay is used, i am not totally certain about the softc/ifnet overlay. For first, there is a reference from ifnet to the corresponding softc, so in principle the overlay is totally unnecessary. Secondly, the only two places where I could find this assumption being actually used seem to be easily fixable: net/if_iso88025subr.c - line 139 @iso88025_ioctl() bcopy(((struct arpcom *)ifp->if_softc)->ac_enaddr, (caddr_t) sa->sa_data, ISO88025_ADDR_LEN); here, the "->if_softc" should be just omitted because ifp can be already cast to a (struct arpcom *) net/if_vlan.c - lnie 528 @vlan_ioctl() bcopy(((struct arpcom *)ifp->if_softc)->ac_enaddr, (caddr_t) sa->sa_data, ETHER_ADDR_LEN); same as above (these two sections seem to be copied one from the other) Is there any other place to look at ? cheers luigi ----------------------------------+----------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . ACIRI/ICSI (on leave from Univ. di Pisa) http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 Phone: (510) 666 2927 ----------------------------------+----------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message