-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsendwol.1
122 lines (122 loc) · 2.92 KB
/
sendwol.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
.\"
.\" Copyright (c) 2022 KusaReMKN
.\" Available under the 2-Clause BSD License
.\"
.Dd 30th March 2022
.Dt SENDWOL 1
.Os
.Sh NAME
.Nm sendwol
.Nd send Wake-on-LAN magic packets
.Sh SYNOPSIS
.Nm
.Op Fl 4 | Fl 6
.Op Fl b | Fl a Ar address | Fl h Ar hostname
.Op Fl f Ar file
.Op Fl i Ar interface
.Op Fl p Ar port | Fl s Ar service
.Ar target ...
.Sh DESCRIPTION
The
.Nm
utility wakes up the
.Ar target
by sending Wake-on-LAN magic packets over UDP.
Obviously, the
.Ar target
needs to support Wake-on-LAN technology.
.Pp
The following options are available:
.Bl -tag
.It Fl 4
Force to use IPv4 only.
.It Fl 6
Force to use IPv6 only.
.It Fl b
Use the broadcast address of the interface as destination.
This is the default.
.It Fl a Ar address , Fl h Ar hostname
Specify the destination address or host name.
.It Fl f Ar file
Specify the database file containing the MAC addresses of the network hosts.
The data is stored in the following format:
.Bd -literal -offset indent
.Ar MAC-address host-name
.Ed
.Pp
Each element is separated by any number of blank spaces and/or tab characters.
If there is a hash character
.Pq Ql #
at the beginning of a line, the line is ignored as a comment.
.Pp
By default,
.Pa $HOME/.sendwol
and
.Pa /etc/ethers
are looked up in this order if they exist.
The specified file is looked up before them.
If this option is specified more than once,
those specified later will be looked up first.
.It Fl i Ar interface
Specify the name of the interface from which packets are sent.
This option applies only if the UDP destination is a multicast address
.Pq IPv4/IPv6 ,
or link-local/site-local unicast address
.Pq IPv6 .
.It Fl p Ar port , Fl s Ar service
Specify the destination port number or service name.
The default value is
.Ql 9 .
.El
.Sh ENVIRONMENT
.Bl -tag -compact
.It Ev HOME
Pathname of the user's home directory.
.El
.Sh FILES
.Bl -tag -compact
.It Pa $HOME/.sendwol
User's MAC address database file.
.It Pa /etc/ethers
System Ethernet address database file.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
The following will broadcast Wake-on-LAN magic packets to wake up targets
.Ql 00:00:5e:00:53:34
and
.Ql 00:00:5e:00:53:59 .
.Bd -literal -offset indent
% sendwol '00:00:5e:00:53:34' '00:00:5e:00:53:59'
.Ed
.Pp
The following will send the magic packets to all nodes
on the network link attached to the interface
.Ql eth0 .
The address
.Ql ff02::1
is named the link-local all-nodes multicast address,
and the packets would reach every node on the network link.
.Bd -literal -offset indent
% sendwol -6 -a ff02::1 -i eth0 00-00-5e-00-53-15
.Ed
.Sh SEE ALSO
.Xr getaddrinfo 3 ,
.Xr getifaddrs 3 ,
.Xr inet 4 ,
.Xr inet6 4 ,
.Xr ip 4 ,
.Xr ip6 4 ,
.Xr udp 4 ,
.Xr ethers 5 ,
.Xr ifconfig 8
.Sh COPYRIGHT
Copyright \(co 2022
.An KusaReMKN Aq Lk https://github.com/KusaReMKN .
.br
This document and software are available under
.Sy the 2-Clause BSD License .
.Sh BUGS
To report bugs, please create an issue.
.Aq Lk https://github.com/kusaremkn/sendwol/issue