WinDump is the porting to the Windows platform of TCPDump. WinDump is fully compatible with tcpdump but introduces some extensions to work better in the Win32 environments. The WinDump.exe executable file is linked with libpcap for Win32, therefore can run both under Windows 95/98 and under Windows NT/2000. To run WinDump, the correct version of the BPF packet capture driver and of the PACKET.DLL library must be installed in the system.
Since the differences from WinDump and tcpdump are very few, we provide the HTML version of the manpage of tcpdump, modified to include our additions.
Our WinDump project tries to make a clean and complete porting of tcpdump, therefore the use of the two programs is nearly identical. All functions offered by tcpdump are implemented in WinDump, so every operation that can be done by tcpdump can be done in Windows as well, using WinDump. In addition, WinDump offers some characteristics that are not present in tcpdump:
The problems encountered during the porting of WinDump are more or less the same that we had during the porting of the libpcap library. We had to import some include files from BSD, and we put them in the Win32-Include directory. Moreover, we wrote some Windows specific code to handle things like Winsock and the Windows NTx UNICODE format. This code is in the file Win32-Src\w32_fzs.c. Finally we had to modify tcpdump.c, the file containing the main() function, to add the new switches of the command line.
However, the porting of tcpdump was easier than the porting of the pcap library. In fact tcpdump, using the functions exported by libpcap, does not interact directly with the system and with the network adapter. This makes it quite easy to port.
We isolated all our changes to the original sources through the use of #ifdef and #ifndef like in the following example
#ifdef WIN32 /* source code for Windows */ #endif |
Therefore the code of WinDump is compatible with the code of tcpdump and can be compiled under UNIX generating the normal tcpdump executable.