Project

General

Profile

Task #1278

Updated by Junxiao Shi about 10 years ago

Optimize `EthernetFace` so that it does not put NIC into promiscuous mode when possible. 

 When NIC has IPv4, and multicast Ethernet address happens to be in the range for IPv4 multicast 

 1. create libpcap session without promisc 
 2. calculate an IPv4 multicast address whose mapped Ethernet address happens to be the multicast Ethernet address 
 3. create a UDP socket and join IP multicast using the calculated IPv4 multicast address 
 4. process libpcap captured packets normally; there’s no need to process packets on the UDP socket 
 5. close the UDP socket when libpcap session is closing 

 If the conditions are not met, libpcap session should still use promiscuous mode. 

Back