diff options
author | brooks <brooks@FreeBSD.org> | 2005-06-10 16:49:24 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2005-06-10 16:49:24 +0000 |
commit | 567ba9b00a248431e7c1147c4e079fd7a11b9ecf (patch) | |
tree | f65b6d7834b40dfcd48534829a0a1e9529ab87ee /sys/netinet6/in6_gif.c | |
parent | 3eaa67c3ad947d85be5350e0e184cd6ee5b93a52 (diff) | |
download | FreeBSD-src-567ba9b00a248431e7c1147c4e079fd7a11b9ecf.zip FreeBSD-src-567ba9b00a248431e7c1147c4e079fd7a11b9ecf.tar.gz |
Stop embedding struct ifnet at the top of driver softcs. Instead the
struct ifnet or the layer 2 common structure it was embedded in have
been replaced with a struct ifnet pointer to be filled by a call to the
new function, if_alloc(). The layer 2 common structure is also allocated
via if_alloc() based on the interface type. It is hung off the new
struct ifnet member, if_l2com.
This change removes the size of these structures from the kernel ABI and
will allow us to better manage them as interfaces come and go.
Other changes of note:
- Struct arpcom is no longer referenced in normal interface code.
Instead the Ethernet address is accessed via the IFP2ENADDR() macro.
To enforce this ac_enaddr has been renamed to _ac_enaddr.
- The second argument to ether_ifattach is now always the mac address
from driver private storage rather than sometimes being ac_enaddr.
Reviewed by: sobomax, sam
Diffstat (limited to 'sys/netinet6/in6_gif.c')
-rw-r--r-- | sys/netinet6/in6_gif.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 0befec2..c9123d7 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -88,7 +88,7 @@ in6_gif_output(ifp, family, m) int family; /* family of the packet to be encapsulate. */ struct mbuf *m; { - struct gif_softc *sc = (struct gif_softc*)ifp; + struct gif_softc *sc = ifp->if_softc; struct sockaddr_in6 *dst = (struct sockaddr_in6 *)&sc->gif_ro6.ro_dst; struct sockaddr_in6 *sin6_src = (struct sockaddr_in6 *)sc->gif_psrc; struct sockaddr_in6 *sin6_dst = (struct sockaddr_in6 *)sc->gif_pdst; @@ -185,7 +185,7 @@ in6_gif_output(ifp, family, m) sc->gif_ro6.ro_rt = NULL; } #if 0 - sc->gif_if.if_mtu = GIF_MTU; + GIF2IFP(sc)->if_mtu = GIF_MTU; #endif } @@ -218,7 +218,7 @@ in6_gif_output(ifp, family, m) error = ip6_output(m, 0, &sc->gif_ro6, 0, 0, NULL, NULL); #endif - if (!(sc->gif_if.if_flags & IFF_LINK0) && + if (!(GIF2IFP(sc)->if_flags & IFF_LINK0) && sc->gif_ro6.ro_rt != NULL) { RTFREE(sc->gif_ro6.ro_rt); sc->gif_ro6.ro_rt = NULL; @@ -330,7 +330,7 @@ gif_validate6(ip6, sc, ifp) /* martian filters on outer source - done in ip6_input */ /* ingress filters on outer source */ - if ((sc->gif_if.if_flags & IFF_LINK2) == 0 && ifp) { + if ((GIF2IFP(sc)->if_flags & IFF_LINK2) == 0 && ifp) { struct sockaddr_in6 sin6; struct rtentry *rt; @@ -344,7 +344,7 @@ gif_validate6(ip6, sc, ifp) if (!rt || rt->rt_ifp != ifp) { #if 0 log(LOG_WARNING, "%s: packet from %s dropped " - "due to ingress filter\n", if_name(&sc->gif_if), + "due to ingress filter\n", if_name(GIF2IFP(sc)), ip6_sprintf(&sin6.sin6_addr)); #endif if (rt) |