From owner-freebsd-hackers Mon Dec 4 23:09:06 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id XAA14718 for hackers-outgoing; Mon, 4 Dec 1995 23:09:06 -0800 Received: from zibbi.mikom.csir.co.za (zibbi.mikom.csir.co.za [146.64.24.58]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id XAA14694 ; Mon, 4 Dec 1995 23:07:48 -0800 Received: (from jhay@localhost) by zibbi.mikom.csir.co.za (8.6.12/8.6.9) id JAA09818; Tue, 5 Dec 1995 09:04:52 +0200 From: John Hay Message-Id: <199512050704.JAA09818@zibbi.mikom.csir.co.za> Subject: Re: ipx on 802.3 To: terry@lambert.org (Terry Lambert) Date: Tue, 5 Dec 1995 09:04:52 +0200 (SAT) Cc: wollman@freebsd.org, hackers@freebsd.org (FreeBSD-hackers) In-Reply-To: <199512042332.QAA00450@phaeton.artisoft.com> from "Terry Lambert" at Dec 4, 95 04:32:23 pm X-Mailer: ELM [version 2.4 PL24 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2051 Sender: owner-hackers@freebsd.org Precedence: bulk >> I am thinking about implementing it. The biggest problem to me seems to >> be selecting between ETHERNET_II and 802.3 form the userlevel. I thought >> of using IFF_LINK(0,1,2) so that it would be easy to specify with ifconfig. >> But then I went to look in /sys/i386/isa and all of them are used by the >> network device drivers. :-( Garrett's suggestion: > > So, do everyone a favor and re-write them to use the if_phys entry in > the ifnet struct I added for specifically this purpose. Then you can > use the IFF_LINK flags for this purpose. (Given that they were called > IFF_LLC* in Net/2, well, you guess why they were originally added.) 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. 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? And here are my thoughts to Garrett's suggestion: This sounds like the cleanest option, but I would first like to figure out how much work this will be. I can think of at least one user-level program ifconfig that will have to be changed. Are there others? And what should the option for ifconfig be called? John -- John Hay -- John.Hay@csir.co.za