diff options
author | sam <sam@FreeBSD.org> | 2007-12-10 02:31:00 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2007-12-10 02:31:00 +0000 |
commit | 08954540f840d7da2963bbfea3f07480e5b0b7d2 (patch) | |
tree | b8d5c084c22d011d28f55f854b6d93c1ab3a4349 /sbin | |
parent | 3382d2b4e50841b43d672482da6054de38cfac97 (diff) | |
download | FreeBSD-src-08954540f840d7da2963bbfea3f07480e5b0b7d2.zip FreeBSD-src-08954540f840d7da2963bbfea3f07480e5b0b7d2.tar.gz |
Wake On Lan (WOL) infrastructure
Submitted by: Stefan Sperling <stsp@stsp.name>
Reviewed by: brooks
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ifconfig/ifconfig.8 | 17 | ||||
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 10 |
2 files changed, 25 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 05f0dc1..4dfafc1 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd October 31, 2007 +.Dd December 8, 2007 .Dt IFCONFIG 8 .Os .Sh NAME @@ -387,6 +387,21 @@ large receive offloading, enable LRO on the interface. If the driver supports .Xr tcp 4 large receive offloading, disable LRO on the interface. +.It Cm wol , wol_ucast , wol_mcast , wol_magic +Enable Wake On Lan (WOL) support, if available. +WOL is a facility whereby a machine in a low power state may be woken +in response to a received packet. +There are three types of packets that may wake a system: +ucast (directed solely to the machine's mac address), +mcast (directed to a broadcast or multicast address), +or +magic (unicast or multicast frames with a ``magic contents''). +Not all devices support WOL, those that do indicate the mechanisms +they support in their capabilities. +.Cm wol +is a synonym for enabling all available WOL mechanisms. +To disable WOL use +.Fl wol . .It Cm vlanmtu , vlanhwtag If the driver offers user-configurable VLAN support, enable reception of extended frames or tag processing in hardware, diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index 3ea1b31..3676396 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -746,7 +746,7 @@ setifname(const char *val, int dummy __unused, int s, #define IFCAPBITS \ "\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \ -"\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO" +"\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" /* * Print the status of the interface. If an address family was @@ -991,6 +991,14 @@ static struct cmd basic_cmds[] = { DEF_CMD("-tso", -IFCAP_TSO, setifcap), DEF_CMD("lro", IFCAP_LRO, setifcap), DEF_CMD("-lro", -IFCAP_LRO, setifcap), + DEF_CMD("wol", IFCAP_WOL, setifcap), + DEF_CMD("-wol", -IFCAP_WOL, setifcap), + DEF_CMD("wol_ucast", IFCAP_WOL_UCAST, setifcap), + DEF_CMD("-wol_ucast", -IFCAP_WOL_UCAST, setifcap), + DEF_CMD("wol_mcast", IFCAP_WOL_MCAST, setifcap), + DEF_CMD("-wol_mcast", -IFCAP_WOL_MCAST, setifcap), + DEF_CMD("wol_magic", IFCAP_WOL_MAGIC, setifcap), + DEF_CMD("-wol_magic", -IFCAP_WOL_MAGIC, setifcap), DEF_CMD("normal", -IFF_LINK0, setifflags), DEF_CMD("compress", IFF_LINK0, setifflags), DEF_CMD("noicmp", IFF_LINK1, setifflags), |