diff --git a/examples/tcprtt/main.go b/examples/tcprtt/main.go index 3c55cc625..7a2296923 100644 --- a/examples/tcprtt/main.go +++ b/examples/tcprtt/main.go @@ -24,7 +24,6 @@ import ( "os/signal" "syscall" - "github.com/cilium/ebpf/internal" "github.com/cilium/ebpf/link" "github.com/cilium/ebpf/ringbuf" "github.com/cilium/ebpf/rlimit" @@ -90,7 +89,7 @@ func readLoop(rd *ringbuf.Reader) { } // Parse the ringbuf event entry into a bpfEvent structure. - if err := binary.Read(bytes.NewBuffer(record.RawSample), internal.NativeEndian, &event); err != nil { + if err := binary.Read(bytes.NewBuffer(record.RawSample), binary.NativeEndian, &event); err != nil { log.Printf("parsing ringbuf event: %s", err) continue } @@ -108,6 +107,6 @@ func readLoop(rd *ringbuf.Reader) { // intToIP converts IPv4 number to net.IP func intToIP(ipNum uint32) net.IP { ip := make(net.IP, 4) - internal.NativeEndian.PutUint32(ip, ipNum) + binary.NativeEndian.PutUint32(ip, ipNum) return ip } diff --git a/examples/tcprtt_sockops/main.go b/examples/tcprtt_sockops/main.go index 7360d9b28..15a224d5d 100644 --- a/examples/tcprtt_sockops/main.go +++ b/examples/tcprtt_sockops/main.go @@ -32,7 +32,6 @@ import ( "syscall" "github.com/cilium/ebpf" - "github.com/cilium/ebpf/internal" "github.com/cilium/ebpf/link" "github.com/cilium/ebpf/ringbuf" "github.com/cilium/ebpf/rlimit" @@ -126,7 +125,7 @@ func readLoop(rd *ringbuf.Reader) { } // Parse the ringbuf event entry into a bpfRttEvent structure. - if err := binary.Read(bytes.NewBuffer(record.RawSample), internal.NativeEndian, &event); err != nil { + if err := binary.Read(bytes.NewBuffer(record.RawSample), binary.NativeEndian, &event); err != nil { log.Printf("parsing ringbuf event: %s", err) continue }