Skip to content

Commit 0bdfab9

Browse files
committed
Fix build issues
1 parent 718cef8 commit 0bdfab9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

main.go

+8-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@ import (
77
"encoding/hex"
88
"flag"
99
"fmt"
10-
"github.com/mdlayher/raw"
11-
"github.com/miekg/pcap"
1210
"io"
1311
"log"
1412
"net"
1513
"os"
1614
"os/exec"
1715
"syscall"
1816
"time"
17+
18+
"github.com/ljfranklin/pcap"
19+
"github.com/mdlayher/raw"
1920
)
2021

2122
type Frame struct {
@@ -255,7 +256,7 @@ func BroadcastWakeups(ifname string, sendermac string) {
255256
packet = append(macbytes[:6], packet[6:]...)
256257

257258
for {
258-
conn, err := raw.ListenPacket(ifc, raw.ProtocolARP)
259+
conn, err := raw.ListenPacket(ifc, protocolARP, nil)
259260
if err != nil {
260261
log.Fatalf("Unable to keep broadcasting the keepalives, %s", err.Error())
261262
}
@@ -264,3 +265,7 @@ func BroadcastWakeups(ifname string, sendermac string) {
264265
time.Sleep(time.Second)
265266
}
266267
}
268+
269+
const (
270+
protocolARP = uint16(0x0806)
271+
)

0 commit comments

Comments
 (0)