Wake On Lan (WOL) infrastructure
Submitted by: Stefan Sperling <stsp@stsp.name> Reviewed by: brooks
This commit is contained in:
parent
226004be05
commit
de0abf19ba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174505
@ -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,
|
||||
|
@ -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),
|
||||
|
@ -209,9 +209,13 @@ struct if_data {
|
||||
#define IFCAP_TSO4 0x0100 /* can do TCP Segmentation Offload */
|
||||
#define IFCAP_TSO6 0x0200 /* can do TCP6 Segmentation Offload */
|
||||
#define IFCAP_LRO 0x0400 /* can do Large Receive Offload */
|
||||
#define IFCAP_WOL_UCAST 0x0800 /* wake on any unicast frame */
|
||||
#define IFCAP_WOL_MCAST 0x1000 /* wake on any multicast frame */
|
||||
#define IFCAP_WOL_MAGIC 0x2000 /* wake on any Magic Packet */
|
||||
|
||||
#define IFCAP_HWCSUM (IFCAP_RXCSUM | IFCAP_TXCSUM)
|
||||
#define IFCAP_TSO (IFCAP_TSO4 | IFCAP_TSO6)
|
||||
#define IFCAP_WOL (IFCAP_WOL_UCAST | IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC)
|
||||
|
||||
#define IFQ_MAXLEN 50
|
||||
#define IFNET_SLOWHZ 1 /* granularity is 1 second */
|
||||
|
Loading…
Reference in New Issue
Block a user