On Fri, Mar 30, 2001 at 03:51:27PM -0800, David Wolfskill wrote:
> One concern, and this may well affect other NIC flavors, is the list of
> media types is a little annoying to parse.  Hmmm... speaking Perl, I
> suppose it could be characterized as
>       /^\s+supported media:(\s[\S+(\s<adhoc>)?)+$/
> Nevertheless, I believe it would be a little easier to parse (both for
> people & simple scripts) if the separator before "<adhoc>" were
> different from the one between adjacent supported media.
> Or am I just being rather denser than usual?

No, you're entirely correct.  However, this isn't my fault. ;-)  The
problem here is that our ifconfig's if_media support is really crappy.
My proposed solution is to take the -m option from {Net,Open}BSD.
Without the -m flag they don't display the supported media list.  With
it, they display it in a much cleaner manner with one possability per
line.  It's on my todo list though anyone else could deal with it as
well.  I figured this patch was big enough without adding a bunch of
cleanups to it.  As it stands, there is a cleanup of a bug that ment you
could never see some mediaopt's in the supported list.  Instead you'd
see the same media type twice with not differences.  Apparently no one
actually uses mediaopts other then full-duplex. ;-)

-- Brooks

Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

PGP signature

Reply via email to