File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,16 @@ import (
7
7
"encoding/hex"
8
8
"flag"
9
9
"fmt"
10
- "github.com/mdlayher/raw"
11
- "github.com/miekg/pcap"
12
10
"io"
13
11
"log"
14
12
"net"
15
13
"os"
16
14
"os/exec"
17
15
"syscall"
18
16
"time"
17
+
18
+ "github.com/ljfranklin/pcap"
19
+ "github.com/mdlayher/raw"
19
20
)
20
21
21
22
type Frame struct {
@@ -255,7 +256,7 @@ func BroadcastWakeups(ifname string, sendermac string) {
255
256
packet = append (macbytes [:6 ], packet [6 :]... )
256
257
257
258
for {
258
- conn , err := raw .ListenPacket (ifc , raw . ProtocolARP )
259
+ conn , err := raw .ListenPacket (ifc , protocolARP , nil )
259
260
if err != nil {
260
261
log .Fatalf ("Unable to keep broadcasting the keepalives, %s" , err .Error ())
261
262
}
@@ -264,3 +265,7 @@ func BroadcastWakeups(ifname string, sendermac string) {
264
265
time .Sleep (time .Second )
265
266
}
266
267
}
268
+
269
+ const (
270
+ protocolARP = uint16 (0x0806 )
271
+ )
You can’t perform that action at this time.
0 commit comments