[Winpcap-users] Is it possible to use the wincap as the Tx/Rxdata path of my own TCP/IP protocol stack?

Guy Harris guy at alum.mit.edu
Fri Oct 28 05:55:26 GMT 2005


simonmychen wrote:
> Thanks to guy's response!  I know the winpcap's main application is for 
> network packet capture and analysis. Because I need to find the soultion 
> that can verify my TCP/IP protocol stack in PC simulation,  I just wanna 
> discuss the possibility of  my need by winpcap.  Does anyone have tried 
> this method? If I set the different IP addresses to winsocks and my own 
> TCP/IP protocol stack, does the network run correctly(two IP in one MAC 
> address)?

Probably not.  You might try it, but don't be at all surprised if it 
doesn't work - just because an IP packet goes to WinPcap, that doesn't 
mean that it won't *also* go to the host's IP stack (WinPcap is not 
*supposed* to arrange that packets it receives not go to the host's 
networking stack - it's supposed to arrange that that they *DO* go to 
the host's networking stack, so that WinPcap-based applications can be 
used to watch the traffic to and from the host without disrupting what 
the host is doing with the traffic).

You might try picking a *different* MAC address and having WinPcap run 
in promiscuous mode, and set a capture filter that accepts only 
multicast/broadcast packets and packets being sent to that other MAC 
address (at a previous company we used that technique for running our 
software inside a UN*X process for development and testing, rather than 
on our hardware).


More information about the Winpcap-users mailing list