Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func detector(device string, devices *[]Blahs, quit chan bool) {
- filter := "not important"
- h, err := pcap.Openlive(device, 1500, true, 0)
- if err != "" { log.Fatalln("Error opening ", err) }
- h.Setfilter(filter)
- for {
- select {
- case <-quit:
- l.Println("detector bailing")
- return
- default:
- // packet := h.Next()
- time.Sleep(1e9*1)
- }
- }
- }
Add Comment
Please, Sign In to add comment