Date: Sat, 3 Nov 2001 13:17:24 -0500 From: Jim McGrath <jmcgrath@sitaranetworks.com> To: "'Luigi Rizzo'" <rizzo@aciri.org>, net@FreeBSD.ORG, mjacob@feral.com Subject: RE: softc, ifnet and arpcom overlay Message-ID: <31269226357BD211979E00A0C9866DAB01BE79AC@rios.sitaranetworks.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31269226357BD211979E00A0C9866DAB01BE79AC>
