[Winpcap-users] Sharing tcp/ip stacks.

Ramiro Polla ramiro86 at hotmail.com
Wed Jul 26 14:17:10 GMT 2006


Hello,

After taking a deeper look at libnids, with the intention of hacking it a 
little to make it work nicely with multiple interfaces in win32, I gave up 
=) Libnids is a giant hack, with rather odd coding conventions. The old 
win32 port (for MSVC) is even hackier (but at least it's cleaner).

So I decided to write my own tcp/ip stack reassembly library, also based on 
the linux kernel (and libnids). I just have a question though:

Libnids opened the "any" device and everything used the same TCP/IP stack. 
Since there's no such interface on Windows, I was thinking of doing what I 
currently do, which is make a list of all devices, and pcap_next_ex on each 
one, round and round. For computers with multiple Interfaces, is it safe to 
have one stack for each interface? It would be faster (altough costing more 
memory) than having everything in a single stack. So then, I would make a 
thread of pcap_loop for each interface. Am I correct to assume no data that 
should belong to the same TCP/IP stack will ever go through 2 different 
NICs?

Thanks,
Ramiro Polla




More information about the Winpcap-users mailing list