gopcap
gopcap copied to clipboard
Added C.pcap_set_rfmon in pcap.go
After line 504, func (p *InactiveHandle) SetPromisc(promisc bool) error I added a function from libpcap to set handle in "radio frequency monitor mode". - Here's the code:
// SetRFMon sets handle to be in radio frequency monitor. // (capture packets indepenedently from network) func (p *InactiveHandle) SetRFMon(monitor bool) error { var mon C.int if monitor { mon = 1 } if status := C.pcap_set_rfmon(p.cptr, mon); status < 0 { return statusError(status) } return nil }
This is my first pull request, might be wrong way to do it.