Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 1995 08:57:54 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        jhay@mikom.csir.co.za (John Hay)
Cc:        terry@lambert.org, wollman@freebsd.org, hackers@freebsd.org
Subject:   Re: ipx on 802.3
Message-ID:  <199512051557.IAA01834@phaeton.artisoft.com>
In-Reply-To: <199512050704.JAA09818@zibbi.mikom.csir.co.za> from "John Hay" at Dec 5, 95 09:04:52 am

next in thread | previous in thread | raw e-mail | index | archive | help
> Terry's suggestion:
> > 
> > I believe it is possible to compare the address family in the file
> > /sys/net/if.c in the function ifioctl() for "case SIOCSIFFLAGS"
> > (at about line 531) to determin if AF_IPX is being used, and if so,
> > interpret the values of IFF_LINK[0-2] differently.
> > 
> > This would be a simple hack compared to fixing all the code to
> > do the right thing for the interface flags.
> 
> Having read both Terry's and Garrett's sugestions, here are my thoughts
> for Terry's suggestion:
> 
> This does mean that if you want to use the IFF_LINK in a device driver,
> you will have to do two ifconfig's, one "ifconfig xxx ipx xxxxx linkx"
> to set 802.3 mode and one without the ipx to set a link option inside
> the device driver.

That's exactly right.  It saves you by putting off the inevitable rewrite
a bit longer.  Garrett's soloution is the cannonically correct one, the
one I suggested is the expedient one.

I think having the LLC stuff for 802.3 is important enough in general for
things like NetBEUI, IPX, Token Ring, etc. that I will forego my normal
Emily Post routine and say that it would be a mistake to force a rewrite
of the other code -- it's just a barrier to entry for you, really, and
cannonically correct handling of link options is nothing in comparison
to real 802.3 support.

> At the moment the only device drivers that use all three IFF_LINK options
> are /sys/i386/isa/if_ep.c and /sys/pci/if_vx.c. The rest are only using
> one and in some cases two of the IFF_LINK options. So maybe we can change
> those that only use one, to use IFF_LINK2 which allready have an alias
> IFF_ALTPHYS in /sys/net/if.c?

The reason this is there is because there are three modes:

(1)	Card setting
(2)	Override setting for link 1
(3)	Override setting for link 2

Typically, the AUI shares a transciever on a card with twisted pair,
BNC, and AUI connectors.  For cards that can auto-detect connections
on the twisted pair and the AUI, it's important to have option (1),
since it means that the cards "just work".  It's also important for
a connection to two nets that you want to switch between to have
explicit selection, if the card will let you do it.

So I'd say the ones that don't support 3 are actually broken.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512051557.IAA01834>