func (p *packetConn) SetPromiscuous(b bool) error {
	mreq := unix.PacketMreq{
		Ifindex: int32(p.ifi.Index),
		Type:    unix.PACKET_MR_PROMISC,
	}

	membership := unix.PACKET_ADD_MEMBERSHIP
	if !b {
		membership = unix.PACKET_DROP_MEMBERSHIP
	}

	return p.s.SetSockoptPacketMreq(unix.SOL_PACKET, membership, &mreq)
}
// SetPromiscuous enables or disables promiscuous mode on the interface, allowing it
// to receive traffic that is not addressed to the interface.
SetPromiscuous enables or disables promiscuous mode on the interface, allowing it
to receive traffic that is not addressed to the interface.
// SetPromiscuous enables or disables promiscuous mode on the interface allowing it // to receive traffic that is not addressed to the interface .
func (p *packetConn) SetPromiscuous(b bool) error {
	mreq := unix.PacketMreq{
		Ifindex: int32(p.ifi.Index),
		Type:    unix.PACKET_MR_PROMISC,
	}
	membership := unix.PACKET_ADD_MEMBERSHIP
	if !b {
		membership = unix.PACKET_DROP_MEMBERSHIP
	}
	return p.s.SetSockoptPacketMreq(unix.SOL_PACKET, membership, &mreq)
}
func ( p * packetConn ) SetPromiscuous ( b bool ) error { mreq := unix . PacketMreq { Ifindex : int32 ( p . ifi . Index ) , Type : unix . PACKET_MR_PROMISC , } membership := unix . PACKET_ADD_MEMBERSHIP if ! b { membership = unix . PACKET_DROP_MEMBERSHIP } return p . s . SetSockoptPacketMreq ( unix . SOL_PACKET , membership , & mreq ) }
SetPromiscuous enables or disables promiscuous mode on the interface, allowing it
to receive traffic that is not addressed to the interface.
SetPromiscuous enables or disables promiscuous mode on the interface allowing it to receive traffic that is not addressed to the interface .