[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r16987: {torvm} Clean up some headers and driver strings for WinPcap device (torvm/trunk/build/win32/patches)



Author: coderman
Date: 2008-09-27 06:18:55 -0400 (Sat, 27 Sep 2008)
New Revision: 16987

Modified:
   torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch
Log:
Clean up some headers and driver strings for WinPcap device build.

Modified: torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch
===================================================================
--- torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch	2008-09-26 20:26:02 UTC (rev 16986)
+++ torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch	2008-09-27 10:18:55 UTC (rev 16987)
@@ -1,14 +1,14 @@
 diff -Naur orig-winpcap/Common/WpcapNames.h mod-winpcap/Common/WpcapNames.h
 --- orig-winpcap/Common/WpcapNames.h	2007-11-14 20:22:04.000000000 +0000
-+++ mod-winpcap/Common/WpcapNames.h	2008-09-26 07:13:21.959100848 +0000
-@@ -39,28 +39,28 @@
++++ mod-winpcap/Common/WpcapNames.h	2008-09-27 09:13:29.564581776 +0000
+@@ -39,45 +39,45 @@
  //  - please do not use prefix names longer than 70 chars. 
  //  - the following characters are surely accepted in the prefixes:  "[A-Z][a-z][0-9]_-',"   
  //
 -#define NPF_DRIVER_NAME							"NPF"					///< (HHH) Packet.dll
 -#define NPF_DRIVER_NAME_WIDECHAR				L"NPF"					///< (HHH) Packet.dll
-+#define NPF_DRIVER_NAME							"TORNPF"
-+#define NPF_DRIVER_NAME_WIDECHAR				L"TORNPF"
++#define NPF_DRIVER_NAME				"TORNPF"
++#define NPF_DRIVER_NAME_WIDECHAR		L"TORNPF"
  
  //
  // Derived strings
@@ -22,15 +22,15 @@
 -#define NPF_SERVICE_DESC					"WinPcap Packet Driver (" NPF_DRIVER_NAME ")"			///< (FFF) packet.dll
 -#define NPF_DRIVER_COMPLETE_DEVICE_PREFIX	"\\Device\\" NPF_DRIVER_NAME "_"						///< (III) packet.dll
 -#define NPF_DRIVER_COMPLETE_PATH			"system32\\drivers\\" NPF_DRIVER_NAME ".sys"			///< (LLL) packet.dll
-+#define NPF_DEVICE_NAMES_PREFIX				NPF_DRIVER_NAME "_"
++#define NPF_DEVICE_NAMES_PREFIX			NPF_DRIVER_NAME "_"
 +#define NPF_DEVICE_NAMES_PREFIX_WIDECHAR	NPF_DRIVER_NAME_WIDECHAR L"_"
-+#define NPF_EVENTS_NAMES					NPF_DRIVER_NAME
-+#define NPF_EVENTS_NAMES_WIDECHAR			NPF_DRIVER_NAME_WIDECHAR
-+#define FAKE_NDISWAN_ADAPTER_NAME			"\\Device\\" NPF_DRIVER_NAME "_GenericDialupAdapter"
++#define NPF_EVENTS_NAMES			NPF_DRIVER_NAME
++#define NPF_EVENTS_NAMES_WIDECHAR		NPF_DRIVER_NAME_WIDECHAR
++#define FAKE_NDISWAN_ADAPTER_NAME		"\\Device\\" NPF_DRIVER_NAME "_GenericDialupAdapter"
 +#define FAKE_NDISWAN_ADAPTER_DESCRIPTION	"Adapter for generic dialup and VPN capture"
-+#define NPF_SERVICE_DESC					"Tor WinPcap Packet Driver (" NPF_DRIVER_NAME ")"
++#define NPF_SERVICE_DESC			"Tor WinPcap Packet Driver (" NPF_DRIVER_NAME ")"
 +#define NPF_DRIVER_COMPLETE_DEVICE_PREFIX	"\\Device\\" NPF_DRIVER_NAME "_"
-+#define NPF_DRIVER_COMPLETE_PATH			NPF_DRIVER_NAME ".sys"
++#define NPF_DRIVER_COMPLETE_PATH		"system32\\drivers\\" NPF_DRIVER_NAME ".sys"
  
  
  //
@@ -38,12 +38,14 @@
  //
 -#define WINPCAP_GLOBAL_KEY				"SOFTWARE\\CaceTech\\WinPcapOem"
 -#define WINPCAP_GLOBAL_KEY_WIDECHAR		L"SOFTWARE\\CaceTech\\WinPcapOem"
-+#define WINPCAP_GLOBAL_KEY				"SOFTWARE\\TorProject\\ModWinPcap"
-+#define WINPCAP_GLOBAL_KEY_WIDECHAR		L"SOFTWARE\\TorProject\\ModWinPcap"
++#define WINPCAP_GLOBAL_KEY			"SOFTWARE\\TorVM\\WinPcap"
++#define WINPCAP_GLOBAL_KEY_WIDECHAR		L"SOFTWARE\\TorVM\\WinPcap"
  #define WINPCAP_INSTANCE_KEY			WINPCAP_GLOBAL_KEY "\\" NPF_DRIVER_NAME
- #define WINPCAP_INSTANCE_KEY_WIDECHAR	WINPCAP_GLOBAL_KEY_WIDECHAR	L"\\" NPF_DRIVER_NAME_WIDECHAR
- #define MAX_WINPCAP_KEY_CHARS 512
-@@ -68,16 +68,16 @@
+-#define WINPCAP_INSTANCE_KEY_WIDECHAR	WINPCAP_GLOBAL_KEY_WIDECHAR	L"\\" NPF_DRIVER_NAME_WIDECHAR
+-#define MAX_WINPCAP_KEY_CHARS 512
++#define WINPCAP_INSTANCE_KEY_WIDECHAR		WINPCAP_GLOBAL_KEY_WIDECHAR L"\\" NPF_DRIVER_NAME_WIDECHAR
++#define MAX_WINPCAP_KEY_CHARS 			512
+ 
  //
  // Subkeys names
  //
@@ -57,16 +59,16 @@
 -#define NPF_DRIVER_NAME_REG_KEY					"NpfDriverName"				///< (HHH) packet.dll
 -#define NPF_DRIVER_COMPLETE_DEVICE_PREFIX_REG_KEY "NpfCompleteDriverPrefix"	///< (III) packet.dll
 -#define NPF_DRIVER_COMPLETE_PATH_REG_KEY		"NpfDriverCompletePath"		///< (LLL) 
-+#define NPF_DEVICES_PREFIX_REG_KEY				"NpfDeviceNamesPrefix"
-+#define NPF_DEVICES_PREFIX_REG_KEY_WC			L"NpfDeviceNamesPrefix"
-+#define NPF_EVENTS_NAMES_REG_KEY				"NpfEventsNames"
-+#define NPF_EVENTS_NAMES_REG_KEY_WC				L"NpfEventsNames"
++#define NPF_DEVICES_PREFIX_REG_KEY		"NpfDeviceNamesPrefix"
++#define NPF_DEVICES_PREFIX_REG_KEY_WC		L"NpfDeviceNamesPrefix"
++#define NPF_EVENTS_NAMES_REG_KEY		"NpfEventsNames"
++#define NPF_EVENTS_NAMES_REG_KEY_WC		L"NpfEventsNames"
 +#define NPF_FAKE_NDISWAN_ADAPTER_NAME_REG_KEY	"NdiswanAdapterName"
 +#define NPF_FAKE_NDISWAN_ADAPTER_DESC_REG_KEY	"NdiswanAdapterDescription"
-+#define NPF_SERVICE_DESC_REG_KEY				"NpfServiceDescription"	
-+#define NPF_DRIVER_NAME_REG_KEY					"NpfDriverName"
++#define NPF_SERVICE_DESC_REG_KEY		"NpfServiceDescription"	
++#define NPF_DRIVER_NAME_REG_KEY			"NpfDriverName"
 +#define NPF_DRIVER_COMPLETE_DEVICE_PREFIX_REG_KEY "NpfCompleteDriverPrefix"
-+#define NPF_DRIVER_COMPLETE_PATH_REG_KEY		"NpfDriverCompletePath"
++#define NPF_DRIVER_COMPLETE_PATH_REG_KEY	"NpfDriverCompletePath"
  
  #endif //__WPCAPNAMES_H_EED6D131C6DB4dd696757D219977A7E5
  
@@ -91,6 +93,28 @@
  
  EXPORTS
  		PacketLibraryVersion
+diff -Naur orig-winpcap/packetNtx/Dll/Packet32.c mod-winpcap/packetNtx/Dll/Packet32.c
+--- orig-winpcap/packetNtx/Dll/Packet32.c	2007-11-13 22:59:30.000000000 +0000
++++ mod-winpcap/packetNtx/Dll/Packet32.c	2008-09-27 09:17:40.512431904 +0000
+@@ -849,16 +849,14 @@
+ 		err = GetLastError();
+ 		if (err == ERROR_SERVICE_EXISTS) 
+ 		{
+-			TRACE_PRINT("Service npf.sys already exists");
+-			//npf.sys already existed
++			TRACE_PRINT("Service tornpf.sys already exists");
+ 			err = 0;
+ 			result = TRUE;
+ 		}
+ 	}
+ 	else 
+ 	{
+-		TRACE_PRINT("Created service for npf.sys");
+-		//Created service for npf.sys
++		TRACE_PRINT("Created service for tornpf.sys");
+ 		result = TRUE;
+ 	}
+ 
 diff -Naur orig-winpcap/packetNtx/Dll/version.rc2 mod-winpcap/packetNtx/Dll/version.rc2
 --- orig-winpcap/packetNtx/Dll/version.rc2	2006-07-25 00:46:54.000000000 +0000
 +++ mod-winpcap/packetNtx/Dll/version.rc2	2008-09-26 08:13:33.693033832 +0000
@@ -175,7 +199,7 @@
     
 diff -Naur orig-winpcap/version.h mod-winpcap/version.h
 --- orig-winpcap/version.h	2008-05-21 22:35:42.000000000 +0000
-+++ mod-winpcap/version.h	2008-09-26 07:13:21.963100240 +0000
++++ mod-winpcap/version.h	2008-09-27 09:19:29.530858584 +0000
 @@ -15,23 +15,23 @@
  // 4.1.0.1124 -->  WinPcap  4.1 beta3
  // 4.1.0.1237 -->  WinPcap  4.1 beta4
@@ -186,15 +210,15 @@
 -#define WINPCAP_REV		0
 +#define WINPCAP_REV	0
  #define WINPCAP_BUILD	1237
--#define WINPCAP_VER_STRING	"4.1.0.1237"
-+#define WINPCAP_VER_STRING	"9.1.0.1237"
+ #define WINPCAP_VER_STRING	"4.1.0.1237"
  #define WINPCAP_PACKET9x_STRING_VERSION	"4.1 beta4"
  #define WINPCAP_WPCAP_STRING_VERSION "4.1 beta4"
  
- #define WINPCAP_COMPANY_NAME 			"CACE Technologies, Inc."
+-#define WINPCAP_COMPANY_NAME 			"CACE Technologies, Inc."
++#define WINPCAP_COMPANY_NAME 			"The Tor Project, Inc."
  
 -#define WINPCAP_PRODUCT_NAME 			"WinPcap"
-+#define WINPCAP_PRODUCT_NAME 			"Tor WinPcap Driver"
++#define WINPCAP_PRODUCT_NAME 			"Tor VM WinPcap Driver"
  
  #define WINPCAP_COPYRIGHT_STRING 		"Copyright � 2005-2008 CACE Technologies. Copyright � 1999-2005 NetGroup, Politecnico di Torino."
  #define WINPCAP_WANPACKET_COPYRIGHT_STRING "Copyright � 2005-2008 CACE Technologies. Copyright � 2003-2005 NetGroup, Politecnico di Torino."