akrennmair/gopcap — pull request #23 by Paoxie (2014-07-07 16:51:44+00:00)
Title: 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 requests, might be wrong way to do it.