From owner-freebsd-hackers Tue Dec 5 08:01:04 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id IAA11892 for hackers-outgoing; Tue, 5 Dec 1995 08:01:04 -0800 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id IAA11845 ; Tue, 5 Dec 1995 08:00:39 -0800 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id IAA01834; Tue, 5 Dec 1995 08:57:54 -0700 From: Terry Lambert Message-Id: <199512051557.IAA01834@phaeton.artisoft.com> Subject: Re: ipx on 802.3 To: jhay@mikom.csir.co.za (John Hay) Date: Tue, 5 Dec 1995 08:57:54 -0700 (MST) Cc: terry@lambert.org, wollman@freebsd.org, hackers@freebsd.org In-Reply-To: <199512050704.JAA09818@zibbi.mikom.csir.co.za> from "John Hay" at Dec 5, 95 09:04:52 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2397 Sender: owner-hackers@freebsd.org Precedence: bulk > 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.