Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 1995 09:04:52 +0200 (SAT)
From:      John Hay <jhay@mikom.csir.co.za>
To:        terry@lambert.org (Terry Lambert)
Cc:        wollman@freebsd.org, hackers@freebsd.org (FreeBSD-hackers)
Subject:   Re: ipx on 802.3
Message-ID:  <199512050704.JAA09818@zibbi.mikom.csir.co.za>
In-Reply-To: <199512042332.QAA00450@phaeton.artisoft.com> from "Terry Lambert" at Dec 4, 95 04:32:23 pm

next in thread | previous in thread | raw e-mail | index | archive | help
>> 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



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