[or-cvs] r16935: {} Some patches for said parts would be useful. (torvm/trunk/build/win32/patches)

coderman at seul.org coderman at seul.org
Tue Sep 23 06:29:03 UTC 2008


Author: coderman
Date: 2008-09-23 02:29:03 -0400 (Tue, 23 Sep 2008)
New Revision: 16935

Added:
   torvm/trunk/build/win32/patches/openvpn-tor-tap-win32-driver.patch
   torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch
Log:
Some patches for said parts would be useful.

Added: torvm/trunk/build/win32/patches/openvpn-tor-tap-win32-driver.patch
===================================================================
--- torvm/trunk/build/win32/patches/openvpn-tor-tap-win32-driver.patch	                        (rev 0)
+++ torvm/trunk/build/win32/patches/openvpn-tor-tap-win32-driver.patch	2008-09-23 06:29:03 UTC (rev 16935)
@@ -0,0 +1,34 @@
+diff -Naur orig-openvpn-2.1_rc10/configure.ac mod-openvpn-2.1_rc10/configure.ac
+--- orig-openvpn-2.1_rc10/configure.ac	2008-08-10 18:35:25.000000000 +0000
++++ mod-openvpn-2.1_rc10/configure.ac	2008-09-22 20:37:09.741152353 +0000
+@@ -865,6 +865,8 @@
+ 	openvpn.spec
+ 	config-win32.h
+ 	images/Makefile
++	tap-win32/SOURCES
++	tap-win32/i386/OemWin2k.inf
+ 	service-win32/Makefile
+ 	install-win32/Makefile
+ 	install-win32/settings
+diff -Naur orig-openvpn-2.1_rc10/tap-win32/tapdrvr.c mod-openvpn-2.1_rc10/tap-win32/tapdrvr.c
+--- orig-openvpn-2.1_rc10/tap-win32/tapdrvr.c	2008-08-10 18:35:25.000000000 +0000
++++ mod-openvpn-2.1_rc10/tap-win32/tapdrvr.c	2008-09-22 20:37:30.144483854 +0000
+@@ -39,7 +39,6 @@
+ // TAP_IOCTL_CONFIG_TUN ioctl.
+ //======================================================
+ 
+-#include "../../autodefs/defs.h"
+ #ifndef DDKVER_MAJOR
+ #error DDKVER_MAJOR must be defined as the major number of the DDK Version
+ #endif
+diff -Naur orig-openvpn-2.1_rc10/version.m4 mod-openvpn-2.1_rc10/version.m4
+--- orig-openvpn-2.1_rc10/version.m4	2008-09-10 06:55:52.000000000 +0000
++++ mod-openvpn-2.1_rc10/version.m4	2008-09-22 20:35:28.208245859 +0000
+@@ -1,6 +1,6 @@
+ dnl define the OpenVPN version
+ define(PRODUCT_VERSION,[2.1_rc10])
+ dnl define the TAP version
+-define(PRODUCT_TAP_ID,[tap0901])
++define(PRODUCT_TAP_ID,[tortap91])
+ define(PRODUCT_TAP_WIN32_MIN_MAJOR,[9])
+ define(PRODUCT_TAP_WIN32_MIN_MINOR,[1])

Added: torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch
===================================================================
--- torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch	                        (rev 0)
+++ torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch	2008-09-23 06:29:03 UTC (rev 16935)
@@ -0,0 +1,197 @@
+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-23 05:54:12.667810334 +0000
+@@ -39,28 +39,28 @@
+ //  - 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"
+ 
+ //
+ // Derived strings
+ //
+-#define NPF_DEVICE_NAMES_PREFIX				NPF_DRIVER_NAME "_"     								///< (AAA) packet.dll
+-#define NPF_DEVICE_NAMES_PREFIX_WIDECHAR	NPF_DRIVER_NAME_WIDECHAR L"_"     						///< (AAA) used by the NPF driver, that does not accept the TEXT(a) macro correctly.
+-#define NPF_EVENTS_NAMES					NPF_DRIVER_NAME											///< (BBB) 
+-#define NPF_EVENTS_NAMES_WIDECHAR			NPF_DRIVER_NAME_WIDECHAR								///< (BBB) used by the NPF driver, that does not accept the TEXT(a) macro correctly.
+-#define FAKE_NDISWAN_ADAPTER_NAME			"\\Device\\" NPF_DRIVER_NAME "_GenericDialupAdapter"	///< (CCC) Name of a fake ndiswan adapter that is always available on 2000/XP/2003, used to capture NCP/LCP packets
+-#define FAKE_NDISWAN_ADAPTER_DESCRIPTION	"Adapter for generic dialup and VPN capture"			///< (DDD) Description of a fake ndiswan adapter that is always available on 2000/XP/2003, used to capture NCP/LCP packets
+-#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_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 FAKE_NDISWAN_ADAPTER_DESCRIPTION	"Adapter for generic dialup and VPN capture"
++#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"
+ 
+ 
+ //
+ // WinPcap Global Registry Key
+ //
+-#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_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 @@
+ //
+ // Subkeys names
+ //
+-#define NPF_DEVICES_PREFIX_REG_KEY				"NpfDeviceNamesPrefix"		///< (AAA) 
+-#define NPF_DEVICES_PREFIX_REG_KEY_WC			L"NpfDeviceNamesPrefix"		///< (AAA) used by the NPF driver, that does not accept the TEXT(a) macro correctly.
+-#define NPF_EVENTS_NAMES_REG_KEY				"NpfEventsNames"			///< (BBB) 
+-#define NPF_EVENTS_NAMES_REG_KEY_WC				L"NpfEventsNames"			///< (BBB) used by the NPF driver, that does not accept the TEXT(a) macro correctly.	
+-#define NPF_FAKE_NDISWAN_ADAPTER_NAME_REG_KEY	"NdiswanAdapterName"		///< (CCC) packet.dll
+-#define NPF_FAKE_NDISWAN_ADAPTER_DESC_REG_KEY	"NdiswanAdapterDescription"	///< (DDD) packet.dll
+-#define NPF_SERVICE_DESC_REG_KEY				"NpfServiceDescription"		///< (FFF) packet.dll
+-#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_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_DRIVER_COMPLETE_DEVICE_PREFIX_REG_KEY "NpfCompleteDriverPrefix"
++#define NPF_DRIVER_COMPLETE_PATH_REG_KEY		"NpfDriverCompletePath"
+ 
+ #endif //__WPCAPNAMES_H_EED6D131C6DB4dd696757D219977A7E5
+ 
+diff -Naur orig-winpcap/packetNtx/Dll/AdInfo.c mod-winpcap/packetNtx/Dll/AdInfo.c
+--- orig-winpcap/packetNtx/Dll/AdInfo.c	2007-11-13 22:59:14.000000000 +0000
++++ mod-winpcap/packetNtx/Dll/AdInfo.c	2008-09-23 05:47:28.791184113 +0000
+@@ -96,7 +96,7 @@
+ #endif /* HAVE_DAG_API */
+ 
+ /// Title of error windows
+-TCHAR   szWindowTitle[] = TEXT("PACKET.DLL");
++TCHAR   szWindowTitle[] = TEXT("TPACKET.DLL");
+ 
+ ULONG inet_addrU(const WCHAR *cp);
+ 
+diff -Naur orig-winpcap/packetNtx/Dll/Packet.def mod-winpcap/packetNtx/Dll/Packet.def
+--- orig-winpcap/packetNtx/Dll/Packet.def	2006-08-09 00:11:04.000000000 +0000
++++ mod-winpcap/packetNtx/Dll/Packet.def	2008-09-23 05:35:11.231258033 +0000
+@@ -1,4 +1,4 @@
+-LIBRARY packet
++LIBRARY tpacket
+ 
+ EXPORTS
+ 		PacketLibraryVersion
+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-23 05:32:34.131273334 +0000
+@@ -28,17 +28,17 @@
+         BEGIN
+ 			VALUE "CompanyName",       WINPCAP_COMPANY_NAME
+ #ifdef _WINNT4
+-			VALUE "FileDescription",   "packet.dll (NT4) Dynamic Link Library"
++			VALUE "FileDescription",   "tpacket.dll (NT4) Dynamic Link Library"
+ #elif defined(_WINVISTA)
+-			VALUE "FileDescription",   "packet.dll (Vista) Dynamic Link Library"
++			VALUE "FileDescription",   "tpacket.dll (Vista) Dynamic Link Library"
+ #else
+-			VALUE "FileDescription",   "packet.dll (NT5) Dynamic Link Library"
++			VALUE "FileDescription",   "tpacket.dll (NT5) Dynamic Link Library"
+ #endif
+ 			VALUE "FileVersion",       WINPCAP_VER_STRING
+-			VALUE "InternalName",      "packet.dll"
++			VALUE "InternalName",      "tpacket.dll"
+ 			VALUE "LegalCopyright",    WINPCAP_COPYRIGHT_STRING
+ 			VALUE "LegalTrademarks",   ""
+-			VALUE "OriginalFilename",  "packet.dll"
++			VALUE "OriginalFilename",  "tpacket.dll"
+ 			VALUE "ProductName",       WINPCAP_PRODUCT_NAME
+ 			VALUE "ProductVersion",    WINPCAP_VER_STRING
+             VALUE "Build Description", WINPCAP_BUILD_DESCRIPTION
+diff -Naur orig-winpcap/packetNtx/driver/NPF.RC mod-winpcap/packetNtx/driver/NPF.RC
+--- orig-winpcap/packetNtx/driver/NPF.RC	2007-11-01 21:34:16.000000000 +0000
++++ mod-winpcap/packetNtx/driver/NPF.RC	2008-09-23 05:27:56.558176002 +0000
+@@ -24,17 +24,17 @@
+         BEGIN
+ 			VALUE "CompanyName",       WINPCAP_COMPANY_NAME
+ #ifdef __NPF_NT4__
+-			VALUE "FileDescription",   "npf.sys (NT4) Kernel Driver"
++			VALUE "FileDescription",   "tornpf.sys (NT4) Kernel Driver"
+ #elif defined(_AMD64_)
+-			VALUE "FileDescription",   "npf.sys (NT5/6 AMD64) Kernel Driver"
++			VALUE "FileDescription",   "tornpf.sys (NT5/6 AMD64) Kernel Driver"
+ #else
+-			VALUE "FileDescription",   "npf.sys (NT5/6 x86) Kernel Driver"
++			VALUE "FileDescription",   "tornpf.sys (NT5/6 x86) Kernel Driver"
+ #endif
+ 			VALUE "FileVersion",       WINPCAP_VER_STRING
+-			VALUE "InternalName",      "NPF + TME"
++			VALUE "InternalName",      "TorNPF"
+ 			VALUE "LegalCopyright",    WINPCAP_COPYRIGHT_STRING
+ 			VALUE "LegalTrademarks",   ""
+-			VALUE "OriginalFilename",  "npf.sys"
++			VALUE "OriginalFilename",  "tornpf.sys"
+ 			VALUE "ProductName",       WINPCAP_PRODUCT_NAME
+ 			VALUE "ProductVersion",    WINPCAP_VER_STRING
+             VALUE "Build Description", WINPCAP_BUILD_DESCRIPTION
+diff -Naur orig-winpcap/packetNtx/driver/dump.c mod-winpcap/packetNtx/driver/dump.c
+--- orig-winpcap/packetNtx/driver/dump.c	2008-05-09 17:37:06.000000000 +0000
++++ mod-winpcap/packetNtx/driver/dump.c	2008-09-23 05:26:27.405684945 +0000
+@@ -247,6 +247,7 @@
+         return ntStatus;
+     }  
+ 
++#ifdef __ENABLE_WDM_BUILD__
+    ntStatus = ObReferenceObjectByHandle(Open->DumpThreadHandle,
+       THREAD_ALL_ACCESS,
+ 	  *PsThreadType,
+@@ -264,7 +265,7 @@
+ 
+         return ntStatus;
+     }  
+-
++#endif /* __ENABLE_WDM_BUILD__ */
+    
+    return ntStatus;
+    
+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-23 06:00:16.861107002 +0000
+@@ -15,23 +15,23 @@
+ // 4.1.0.1124 -->  WinPcap  4.1 beta3
+ // 4.1.0.1237 -->  WinPcap  4.1 beta4
+ 
+-#define WINPCAP_MAJOR	4
++#define WINPCAP_MAJOR	9
+ #define WINPCAP_MINOR	1
+-#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_PACKET9x_STRING_VERSION	"4.1 beta4"
+ #define WINPCAP_WPCAP_STRING_VERSION "4.1 beta4"
+ 
+ #define WINPCAP_COMPANY_NAME 			"CACE Technologies, Inc."
+ 
+-#define WINPCAP_PRODUCT_NAME 			"WinPcap"
++#define WINPCAP_PRODUCT_NAME 			"Tor 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."
+ #define WINPCAP_INSTALLERHELPER_COPYRIGHT_STRING "Copyright © 2007-2008 CACE Technologies."
+ #define WINPCAP_RPCAPD_COPYRIGHT_STRING "Copyright © 2005-2008 CACE Technologies. Copyright © 2003-2005 NetGroup, Politecnico di Torino."
+ 
+-#define WINPCAP_BUILD_DESCRIPTION 		""
++#define WINPCAP_BUILD_DESCRIPTION 		"Modified WinPcap Driver for Tor Qemu VM"
+ #define WINPCAP_PRIVATE_BUILD			""
+ #define WINPCAP_LIBPCAP_VERSION			"1.0 - branch"



More information about the tor-commits mailing list