initial working version

This commit is contained in:
Abel Luck 2026-05-05 13:43:02 +02:00
parent 4d8b83cbb6
commit 8318f9fe70
15 changed files with 917 additions and 4 deletions

View file

@ -0,0 +1,20 @@
//go:build !linux
package dnstt
import "fmt"
// OpenRawSocket is only implemented on Linux.
func OpenRawSocket() (int, error) {
return -1, fmt.Errorf("raw packet capture is only supported on Linux")
}
// CaptureLoop is only implemented on Linux.
func CaptureLoop(fd int, port int, collector *Collector, stop <-chan struct{}) {
<-stop
}
// CloseRawSocket is only implemented on Linux.
func CloseRawSocket(fd int) error {
return nil
}