How do we get the packets that are not sent to local device from the application layer through the promiscuous mode?

jason2
Posts: 44
Joined: Thu Oct 26, 2017 11:02 am

How do we get the packets that are not sent to local device from the application layer through the promiscuous mode?

Postby jason2 » Thu Apr 19, 2018 1:39 am

I have read:
The promiscuous model, also known as sniffer, is also called the sniffer model. It is to receive all packets that pass through the NIC, including the packets that are not sent to the local device. By default, the network card only transfers the packets sent to the local device(including broadcast packets) to the upper program, and the other packets are discarded. To put it simply, promiscuous mode means that NIC can accept all data flows through it, no matter what format and address. In fact, when the device receives a packet, it is judged by the network layer, determining whether to submit the upper (transport layer) or discarding or forwarding the lower layer (the data link layer, the MAC sublayer). ESP32 can provide a promiscuous mode to sniff the air message and process it.
Can application layer get packets that are not sent to the local deviece? If application layer can,how to achive?

jason2
Posts: 44
Joined: Thu Oct 26, 2017 11:02 am

Re: How do we get the packets that are not sent to local device from the application layer through the promiscuous mode?

Postby jason2 » Thu Apr 19, 2018 6:47 am

Please reply if you have seen it ! Thank you!

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: How do we get the packets that are not sent to local device from the application layer through the promiscuous mode?

Postby ESP_Angus » Thu Apr 19, 2018 6:51 am

jason2 wrote: Can application layer get packets that are not sent to the local deviece? If application layer can,how to achive?
Only via the promiscuous mode. To push these to the application layer (ie via the TCP/IP stack) would break the TCP/IP model.

If you need to send data to multiple devices on the network simultaneously, you may want to consider using UDP broadcast or multicast packets. These will be sent to the local device, so can be received via normal means.

Please note also that promiscuous mode can only see packets which are received by the WiFi interface of the ESP32 (NIC, in the documentation). For WPA/WPA2 protected networks, this is only unicast traffic which is sent to the device or broadcast traffic. This is because in WPA/WAP2 mode each client of the AP has a unique session key for security.

Who is online

Users browsing this forum: No registered users and 115 guests