// SetPromisc sets the handle to either be promiscuous (capture packets// unrelated to this host) or not.func(p *InactiveHandle)SetPromisc(promiscbool)error{varpro C.intifpromisc { pro =1}ifstatus := C.pcap_set_promisc(p.cptr, pro); status <0{returnstatusError(status) }returnnil} 开...
If promisc is non-zero, promiscuous mode will be set, otherwise it will not be set. RETURN VALUE pcap_set_promisc() returns 0 on success or PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated. SEE ALSO pcap(3PCAP), pcap_create(3PCAP), pcap_activate(3PCAP) ...
If promisc is non-zero, promiscuous mode will be set, otherwise it will not be set. RETURN VALUE pcap_set_promisc() returns 0 on success or PCAP_ERROR_ACTIVATED if called on a capture handle that has been activated. SEE ALSO pcap(3), pcap_create(3), pcap_activate(3) ...