presenting WOL to the user (was: Re: How to add wake on lan support for your card)

2007-11-29 Thread Stefan Sperling
On Wed, Nov 28, 2007 at 07:45:45PM +0100, Stefan Sperling wrote:
 On Wed, Nov 28, 2007 at 10:28:24AM -0800, Sam Leffler wrote:
  I really want to see the WOL support get into the tree.
 
 Cool.
 
  I looked at it 
  before and had some issues with ifconfig integration which is mostly why 
  it's not already there.
 
 You mean you are hacking on it as well (independently)
 or you were trying my patch?

Sam, nevermind that question of mine.

I thought about this again. I suppose you have issues with
the way I made ifconfig present WOL information to the user?

$ ifconfig vr0
vr0: flags=8943UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST mtu 1500
inet 10.42.42.2 netmask 0xff00 broadcast 10.42.42.255
ether 00:0b:6a:d5:1e:b1
media: Ethernet autoselect (100baseTX full-duplex)
status: active
   --- supported wake events: unicast magic
   --- will wake on: magic

Adding two new lines of output for a minor feature like that
is indeed overkill.

Actually I have been thinking about this for a while.

Maybe the WOL information should somehow be integrated
into interface flags? There would be quite a few wake on lan
options to be squeezed into the flags though: magic packet,
link status, unicast, broadcast, multicast (at least).

This would look somewhat like:

vr0:
flags=UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,WOLMAGIC,WOLLINK,WOLUCAST,WOLBCAST,WOLMCAST
 mtu 1500

Would that be better?

I don't know how crowded the flag bit space already is though,
because I had no time to look at it yet.

How do you think could the available WOL options be presented
to the user? Clearly flags can't be used for this. Maybe we
should simply drop this functionality, and operate like the
ifconfig polling option -- simply return an error if the interface
does not support the requested WOL event, but don't provide other
means of finding out what it does actually support? Or should we
introduce a special ifconfig subcommand to query this information?

Has anyone got better ideas?

Thanks,
-- 
stefan
http://stsp.name PGP Key: 0xF59D25F0


pgpIYcYWMyZfn.pgp
Description: PGP signature


Re: presenting WOL to the user (was: Re: How to add wake on lan support for your card)

2007-11-29 Thread gregoryd . freebsd
Quoting Stefan Sperling [EMAIL PROTECTED]:

flags=UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,WOLMAGIC,WOLLINK,WOLUCAST,WOLBCAST,WOLMCAST
 mtu 1500

 Would that be better?

IMHO, too much info packed in here, making reading difficult.

 Has anyone got better ideas?

What if there was a single line added, right after status for instance:

wol: (magic) unicast link multicast

The line mentions all wol options available, and shows the event triggering the
wake-up between brackets. Or between  (whatever). Or even in upper case:

wol: MAGIC unicast link


gregory

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]