Date: Sat, 3 Nov 2001 09:11:43 -0800 From: Luigi Rizzo <rizzo@aciri.org> To: net@freebsd.org, mjacob@feral.com Subject: softc, ifnet and arpcom overlay Message-ID: <20011103091143.B47299@iguana.aciri.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011103091143.B47299>
