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.
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.
steven
self-assigned this 2024-04-12 00:36:02 +00:00
steven
added this to the dd-wrt/openwrt support project 2024-04-12 00:36:02 +00:00
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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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