gopcap icon indicating copy to clipboard operation
gopcap copied to clipboard

Added C.pcap_set_rfmon in pcap.go

Open pressure679 opened this issue 10 years ago • 0 comments

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.

pressure679 avatar Jul 07 '14 16:07 pressure679