Eliminate CGO dependency #7
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The gopacket pcap library requires CGO, which won't run on busybox systems. Perhaps we can keep the existing pcap library support for the wide interfacing it supports, such as libpcap, and npcap (required for Windows). This could then be controlled with build directives.
This would require a go-native method to capture and read headers, should preferably re-use the existing gopacket library for layer decoding.
This is essential for dd-wrt support.
Removing libpcap will also remove a lot of network types, so we will likely be contstrained to supporting just ethernet, IPv4/IPv6, and UDP.
This looks interesting: https://pkg.go.dev/golang.org/x/net/bpf
Switched from libpcap to ebpf-go. Can now compile with CGO_ENABLED=0 and no dependency on libpcap.
0ad3e2b0d4