initial working version
This commit is contained in:
parent
4d8b83cbb6
commit
8318f9fe70
15 changed files with 917 additions and 4 deletions
20
internal/dnstt/capture_unsupported.go
Normal file
20
internal/dnstt/capture_unsupported.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue