How does Winpcap capture packets from multiple NICs!

Source: Internet
Author: User

In the past, when using Winpcap to capture packets from the NIC, only one Nic was captured. Now you have to capture multiple NICs as needed, because our previous device is a computer that connects to a device through a network card, there are now two user requirements, one is to attach two network cards on the computer, each network card is connected to a device, another requirement is to connect multiple devices through a network adapter on the PC through a switch. There is a many-to-many relationship in the future, that is, a device sends data to different PCs through a switch, all of these considerations! Welcome to discuss ideas!

 

1) when a computer has two NICs and each Nic is connected to a device, my method is as follows:

Enable two NICs, enable one thread for each Nic to capture data separately, and perform parallel operations on the two NICs.

 

2) connect multiple devices through one Nic of a PC on the switch. This is the same as that of a single device. Winpcap captures packets sent from different devices and then parses the packets at the application layer, in this way, the user can know which data is sent by the device.

 

3) when multiple PCs are connected to multiple devices, consider 1) and 2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.