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

Stefan Sperling stsp at stsp.name
Thu Nov 29 02:12:11 PST 2007


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=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
        inet 10.42.42.2 netmask 0xffffff00 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=XXXX<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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20071129/a9a81fde/attachment.pgp


More information about the freebsd-hackers mailing list