Nmap Development mailing list archives

Re: Call for test: WinPcap 4.1.4 (NPcap 1.0.0)


From: "veotax" <hsluoyz () qq com>
Date: Tue, 13 Aug 2013 11:19:46 +0800

Hi David,
Sorry for the trouble about compiling. Here're some guidelines may be helpful:


The original WinPcap mainly has three parts: wpcap.dll, packet.dll and npf.sys. I didn't change the original wpcap.dll, 
so no compile here. I renamed npf to npf6x in order to differenciate them. Moreover, because the installation method 
got to be more complex after porting, I made an exe driver loader for npf6x.sys called NPF6xInstall.exe,  put 
NPF6xInstall.exe in the same dir with npf6x.inf and npf6x.sys. Its instructions are 1) "NPF6xInstall.exe -i" to install 
the npf6x driver 2) "NPF6xInstall.exe -u" to uninstall the npf6x driver. In a word, there're three parts in the 
present: npf6x solution, packet solution and NPF6xInstall solution. 


It is not a must to use the NSIS installer. To test WinPcap 4.1.4, you can just put NPF6xInstall.exe, npf6x.inf and 
npf6x.sys together, run the "NPF6xInstall.exe -i" command to finish the driver installation. Put packet.dll to the 
system32 dir. Put the original wpcap.dll to the system32 dir if you have no orginal WinPcap installed.


The compiling instructions for the three parts are as belows:


1) npf6x.sys (packetWin7\npf6x\npf6x.sln)
i. Install VS2012 and update 3.


VS2012 download link:
http://www.microsoft.com/visualstudio/eng/downloads


VS2012 update 3 download link:
http://www.microsoft.com/en-us/download/details.aspx?id=39305


ii. Install WDK8.0.


WDK8.0 download link:
http://msdn.microsoft.com/en-us/library/windows/hardware/hh852365.aspx


iii. Open the npf6x.sln file in VS2012 and compile.




2) packet.dll (packetWin7\Dll\Project\Packet.sln)
i. Install VS2005 and sp1 (maybe VS2008, VS2010 and VS2012 are OK here too, I just remained the original WinPcap VS 
version).


VS2005 download link:
http://msdn.microsoft.com/zh-cn/express/aa975050.aspx


VS2005 sp1 download link:
http://www.microsoft.com/en-us/download/details.aspx?id=5553


ii. Install WDK7.1.0.


WDK7.1.0 download link:
http://www.microsoft.com/en-hk/download/details.aspx?id=11800


iii. Open the Packet.sln file in VS2005.
iv. Open the "VC++ Directories" tab in Tools, Options dialog, make sure to add the WDK7.1.0 include and lib path to 
your VS. Mine is like this (substitute "D:\WinDDK\" to your own):


Include files:
D:\WinDDK\7600.16385.1\inc\api
D:\WinDDK\7600.16385.1\inc\ddk
$(VCInstallDir)include
$(VCInstallDir)atlmfc\include
$(VCInstallDir)PlatformSDK\include
$(VCInstallDir)PlatformSDK\common\include


Library files:
$(VCInstallDir)lib
$(VCInstallDir)atlmfc\lib
$(VCInstallDir)atlmfc\lib\i386
$(VCInstallDir)PlatformSDK\lib
$(VCInstallDir)PlatformSDK\common\lib
$(VSInstallDir)
$(VSInstallDir)lib
D:\WinDDK\7600.16385.1\lib\win7\i386


v. Compile.


3) NPF6xInstall.exe (packetWin7\NPF6xInstall\NPF6xInstall.sln)
The same with 2).




Cheers,
Yang


------------------ Original ------------------
From:  "David Fifield"<david () bamsoftware com>;
Date:  Tue, Aug 13, 2013 06:53 AM
To:  "veotax"<hsluoyz () qq com>; 

Subject:  Re: Call for test: WinPcap 4.1.4 (NPcap 1.0.0)



On Tue, Aug 06, 2013 at 02:06:18AM +0800, veotax wrote:
Just now, I had released WinPcap 4.1.4 (a non-official name, also
called NPcap 1.0.0) for testing. I have spent nearly one month to port
it from NDIS5.0 to NDIS6.x. It can gain better performance than the
official WinPcap (currently 4.1.3 version) under Win7 and Win8
(behaves the same as the old one under XP and Vista). I have rewritten
the original NSIS installation script and packed the new WinPcap 4.1.4
into an EXE package, so you can test it easily. The installation
package is given below:
revision:31636
The installer only:
https://svn.nmap.org/nmap-exp/yang/NPcap-20130806/installer/winpcap-nmap-4.1.4.exe
The entire code base:
https://svn.nmap.org/nmap-exp/yang/NPcap-20130806

I have checked out this code and I tried to build it.

I tried opening packetWin7/npf6x/npf6x.sln in Visual C++ 2010, but got
the error, "The selected file is a solution file, but was created by a
newer version of this application and cannot be opened." The top of the
file says "Microsoft Visual Studio Solution File, Format Version 12.00",
so I suppose I must get a newer Visual C++.

I also tried packetWin7/npf6x\ Package/npf6x\ Package.vcxproj. This gave
me the error 'The Visual C++ project "npf6x Package" is targeting
".NETFramework,Version=v4.5", which is not installed on this machine.
You must download this framework...'. The download page doesn't offer
v4.5 for Visual C++ 2010 (only up to v4.0.3), so I suppose in this case
too I must upgrade my Visual C++.

I also tried packetWin7/NPF6xInstall/NPF6xInstall.sln. This one was a
version 9.00 file, so I was prompted to upgrade its format. The
automatic conversion failed and I could not build the solution, though I
couldn't find any obvious error message.

Are these the right steps to take to build the driver from source? What
do you do when you build?

David Fifield
.
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: