tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: interface name optional in wake(8)

Am 03.01.2010 um 23:43 schrieb David Young:

> On Sun, Jan 03, 2010 at 09:03:24PM +0100, Marc Balmer wrote:
>> Am 03.01.2010 um 21:00 schrieb David Young:
>>> On Sun, Jan 03, 2010 at 11:19:53AM +0100, Marc Balmer wrote:
>>>> Make the interface name argument to wake(8) optional. If the first argument
>>>> given to wake(8) is not the name of a local ethernet interface, wake(8)
>>>> determines the first ethernet device in the system and uses it instead.
>>> Why not send WoL packets to every active ethernet, instead?
>> the target will only be reachable by one.
> Maybe there is something about your scenario that you have not
> described.  Is "every ethernet" somehow not inclusive of the one
> ethernet the target is on, or is the target always connected to
> whichever arbitrary ethernet getifaddrs(3) returns first? :-)

The goal is that in the common case where a machine has only one NIC, the 
interface specifier on the command line can be left out.

Using the first interface that getifaddrs() returns was not the best idea.  
Rather if there is only one NIC use it, else the interface name has to be 
specified.  That way the package will not be sent over an arbitrary interface.

Whether we want an option to send a Wake on LAN package on all NICs is a 
different question, I tend to say no.

I will change the behaviour of wake(8) accordingly.

- mb

Home | Main Index | Thread Index | Old Index