[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r16969: {torvm} Fix tap-win32 and winpcap driver build issues related to ide (in torvm/trunk/build/win32: files patches)
Author: coderman
Date: 2008-09-26 04:16:33 -0400 (Fri, 26 Sep 2008)
New Revision: 16969
Modified:
torvm/trunk/build/win32/files/buildall.sh
torvm/trunk/build/win32/patches/openvpn-tor-tap-win32-driver.patch
torvm/trunk/build/win32/patches/qemu-winpcap-0.9.1.patch
torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch
Log:
Fix tap-win32 and winpcap driver build issues related to identifiers and device INF properties.
Modified: torvm/trunk/build/win32/files/buildall.sh
===================================================================
--- torvm/trunk/build/win32/files/buildall.sh 2008-09-25 21:06:32 UTC (rev 16968)
+++ torvm/trunk/build/win32/files/buildall.sh 2008-09-26 08:16:33 UTC (rev 16969)
@@ -193,7 +193,7 @@
BPATH="${MSYSROOT}${PCAPDIR}"
echo "call $DDKENV $DDKDIR w2k f" > dobuild.bat
echo "cd \"$BPATH\"" >> dobuild.bat
-echo "./CompileDriver" >> dobuild.bat
+echo "call CompileDriver" >> dobuild.bat
echo "exit" >> dobuild.bat
cmd.exe /k dobuild.bat
if [ ! -f driver/bin/2k/i386/npf.sys ]; then
Modified: torvm/trunk/build/win32/patches/openvpn-tor-tap-win32-driver.patch
===================================================================
--- torvm/trunk/build/win32/patches/openvpn-tor-tap-win32-driver.patch 2008-09-25 21:06:32 UTC (rev 16968)
+++ torvm/trunk/build/win32/patches/openvpn-tor-tap-win32-driver.patch 2008-09-26 08:16:33 UTC (rev 16969)
@@ -1,157 +1,227 @@
-diff -Naur orig-openvpn-2.1_rc10/config-win32.h.in mod-openvpn-2.1_rc10/config-win32.h.in
---- orig-openvpn-2.1_rc10/config-win32.h.in 2008-08-10 18:35:25.000000000 +0000
-+++ mod-openvpn-2.1_rc10/config-win32.h.in 2008-09-24 02:04:01.653884827 +0000
-@@ -35,7 +35,6 @@
-
- #include <windows.h>
- #include <winsock2.h>
--#include "autodefs/defs.h"
-
- #define sleep(x) Sleep((x)*1000)
-
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-24 01:09:44.574210076 +0000
-@@ -838,9 +838,9 @@
++++ mod-openvpn-2.1_rc10/configure.ac 2008-09-23 11:02:18.986773240 +0000
+@@ -838,12 +838,45 @@
TAP_ID="PRODUCT_TAP_ID"
TAP_WIN32_MIN_MAJOR="PRODUCT_TAP_WIN32_MIN_MAJOR"
TAP_WIN32_MIN_MINOR="PRODUCT_TAP_WIN32_MIN_MINOR"
--AC_DEFINE_UNQUOTED(TAP_ID, "${TAP_ID}", [The TAP-Win32 id defined in tap-win32/SOURCES])
--AC_DEFINE_UNQUOTED(TAP_WIN32_MIN_MAJOR, ${TAP_WIN32_MIN_MAJOR}, [The TAP-Win32 version number is defined in tap-win32/SOURCES])
--AC_DEFINE_UNQUOTED(TAP_WIN32_MIN_MINOR, ${TAP_WIN32_MIN_MINOR}, [The TAP-Win32 version number is defined in tap-win32/SOURCES])
-+AC_DEFINE_UNQUOTED(TAP_ID, "${TAP_ID}", [The TAP-Win32 device ID])
-+AC_DEFINE_UNQUOTED(TAP_WIN32_MIN_MAJOR, "${TAP_WIN32_MIN_MAJOR}", [The TAP-Win32 major version number])
-+AC_DEFINE_UNQUOTED(TAP_WIN32_MIN_MINOR, "${TAP_WIN32_MIN_MINOR}", [The TAP-Win32 minor version number])
++PRODUCT_NAME="PRODUCT_NAME"
++PRODUCT_VERSION="PRODUCT_VERSION"
++PRODUCT_TAP_ID="PRODUCT_TAP_ID"
++PRODUCT_TAP_WIN32_MIN_MAJOR="PRODUCT_TAP_WIN32_MIN_MAJOR"
++PRODUCT_TAP_WIN32_MIN_MINOR="PRODUCT_TAP_WIN32_MIN_MINOR"
++PRODUCT_TAP_MAJOR_VER="PRODUCT_TAP_WIN32_MIN_MAJOR"
++PRODUCT_TAP_MINOR_VER="PRODUCT_TAP_WIN32_MIN_MINOR"
++PRODUCT_TAP_DEVICE_DESCRIPTION="PRODUCT_TAP_DEVICE_DESCRIPTION"
++PRODUCT_TAP_RELDATE="PRODUCT_TAP_RELDATE"
++PRODUCT_TAP_PROVIDER="PRODUCT_TAP_PROVIDER"
++PRODUCT_TAP_CHARACTERISTICS="PRODUCT_TAP_CHARACTERISTICS"
+ AC_DEFINE_UNQUOTED(TAP_ID, "${TAP_ID}", [The TAP-Win32 id defined in tap-win32/SOURCES])
+ AC_DEFINE_UNQUOTED(TAP_WIN32_MIN_MAJOR, ${TAP_WIN32_MIN_MAJOR}, [The TAP-Win32 version number is defined in tap-win32/SOURCES])
+ AC_DEFINE_UNQUOTED(TAP_WIN32_MIN_MINOR, ${TAP_WIN32_MIN_MINOR}, [The TAP-Win32 version number is defined in tap-win32/SOURCES])
++AC_DEFINE(PRODUCT_NAME, ${PRODUCT_NAME}, [description goes here])
++AC_DEFINE_UNQUOTED(PRODUCT_VERSION, ${PRODUCT_VERSION}, [description goes here])
++AC_DEFINE_UNQUOTED(PRODUCT_TAP_ID, ${PRODUCT_TAP_ID}, [description goes here])
++AC_DEFINE_UNQUOTED(PRODUCT_TAP_WIN32_MIN_MAJOR, ${PRODUCT_TAP_WIN32_MIN_MAJOR}, [description goes here])
++AC_DEFINE_UNQUOTED(PRODUCT_TAP_WIN32_MIN_MINOR, ${PRODUCT_TAP_WIN32_MIN_MINOR}, [description goes here])
++AC_DEFINE_UNQUOTED(PRODUCT_TAP_MAJOR_VER, ${PRODUCT_TAP_MAJOR_VER}, [description goes here])
++AC_DEFINE_UNQUOTED(PRODUCT_TAP_MINOR_VER, ${PRODUCT_TAP_MINOR_VER}, [description goes here])
++AC_DEFINE(PRODUCT_TAP_DEVICE_DESCRIPTION, ${PRODUCT_TAP_DEVICE_DESCRIPTION}, [description goes here])
++AC_DEFINE(PRODUCT_TAP_RELDATE, ${PRODUCT_TAP_RELDATE}, [description goes here])
++AC_DEFINE(PRODUCT_TAP_PROVIDER, ${PRODUCT_TAP_PROVIDER}, [description goes here])
++AC_DEFINE_UNQUOTED(PRODUCT_TAP_CHARACTERISTICS, ${PRODUCT_TAP_CHARACTERISTICS}, [description goes here])
AC_SUBST(TAP_ID)
AC_SUBST(TAP_WIN32_MIN_MAJOR)
AC_SUBST(TAP_WIN32_MIN_MINOR)
-diff -Naur orig-openvpn-2.1_rc10/install-win32/maketap mod-openvpn-2.1_rc10/install-win32/maketap
---- orig-openvpn-2.1_rc10/install-win32/maketap 2008-08-10 18:35:23.000000000 +0000
-+++ mod-openvpn-2.1_rc10/install-win32/maketap 2008-09-24 01:20:25.104878926 +0000
-@@ -4,22 +4,27 @@
- # Requires the Windows DDK
++AC_SUBST(PRODUCT_NAME)
++AC_SUBST(PRODUCT_VERSION)
++AC_SUBST(PRODUCT_TAP_ID)
++AC_SUBST(PRODUCT_TAP_WIN32_MIN_MAJOR)
++AC_SUBST(PRODUCT_TAP_WIN32_MIN_MINOR)
++AC_SUBST(PRODUCT_TAP_MAJOR_VER)
++AC_SUBST(PRODUCT_TAP_MINOR_VER)
++AC_SUBST(PRODUCT_TAP_DEVICE_DESCRIPTION)
++AC_SUBST(PRODUCT_TAP_RELDATE)
++AC_SUBST(PRODUCT_TAP_PROVIDER)
++AC_SUBST(PRODUCT_TAP_CHARACTERISTICS)
- # get version.nsi definitions
--. autodefs/defs.sh
-+#. autodefs/defs.sh
+ win32datadir="\${datadir}/${PACKAGE}-win32"
+ AC_SUBST(win32datadir)
+@@ -865,6 +898,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/i386/OemWin2k.inf.in mod-openvpn-2.1_rc10/tap-win32/i386/OemWin2k.inf.in
+--- orig-openvpn-2.1_rc10/tap-win32/i386/OemWin2k.inf.in 2008-08-10 18:35:25.000000000 +0000
++++ mod-openvpn-2.1_rc10/tap-win32/i386/OemWin2k.inf.in 2008-09-26 08:05:21.851805064 +0000
+@@ -6,9 +6,9 @@
+ ; ****************************************************************************
--if [ -d "/c/WINDDK/$DDKVER" ] ; then
-+if [ -d "$DDKDIR" ] ; then
+ ; SYNTAX CHECKER
+-; cd \WINDDK\3790\tools\chkinf
++; cd \WINDDK\{VER}\tools\chkinf
+ ; chkinf c:\src\openvpn\tap-win32\i386\oemwin2k.inf
+-; OUTPUT -> file:///c:/WINDDK/3790/tools/chkinf/htm/c%23+src+openvpn+tap-win32+i386+__OemWin2k.htm
++; OUTPUT -> file:///c:/WINDDK/{VER}/tools/chkinf/htm/c%23+src+openvpn+tap-win32+i386+__OemWin2k.htm
- # common declarations for all DDK build targets
- . install-win32/ddk-common
+ ; INSTALL/REMOVE DRIVER
+ ; tapinstall install OemWin2k.inf TAP0901
+@@ -48,35 +48,34 @@
- # configure tap driver sources
--MACRO="perl install-win32/macro.pl autodefs/defs.in"
-+MACRO="perl install-win32/macro.pl install-win32/settings.in"
- IFDEF="perl install-win32/ifdef.pl"
--rm -rf tap-win32/amd64
-+if [ -d tap-win32/amd64 ]; then
-+ rm -rf tap-win32/amd64
-+fi
- mkdir tap-win32/amd64
- $MACRO <tap-win32/SOURCES.in >tap-win32/SOURCES
- $MACRO <tap-win32/i386/OemWin2k.inf.in | $IFDEF >tap-win32/i386/OemWin2k.inf
- $MACRO <tap-win32/i386/OemWin2k.inf.in | $IFDEF -DAMD64 >tap-win32/amd64/OemWin2k.inf
+ [Version]
+ Signature = "$Windows NT$"
+- CatalogFile = @@PRODUCT_TAP_ID@@.cat
+ ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
+ Provider = %Provider%
+ Class = Net
-+# all we need is the inf files, build the driver ourselves...
-+exit 0
-+
- if [ -n "$PRODUCT_TAP_DEBUG" ] ; then
- w2ktarget="w2k c"
- amdtarget="chk $x64_tag WNET"
-@@ -96,5 +101,5 @@
- fi
+ ; This version number should match the version
+ ; number given in SOURCES.
+- DriverVer=@@PRODUCT_TAP_RELDATE@@,@@PRODUCT_TAP_MAJOR_VER@@.00.00.@@PRODUCT_TAP_MINOR_VER@@
++ DriverVer=09/26/2009,9.00.00.1
- else
-- echo Not building TAP driver -- DDK version $DDKVER NOT FOUND
-+ echo Not building TAP driver -- DDK NOT FOUND AT \"$DDKDIR\"
- fi
-diff -Naur orig-openvpn-2.1_rc10/install-win32/settings.in mod-openvpn-2.1_rc10/install-win32/settings.in
---- orig-openvpn-2.1_rc10/install-win32/settings.in 2008-08-10 18:35:23.000000000 +0000
-+++ mod-openvpn-2.1_rc10/install-win32/settings.in 2008-09-24 01:12:19.574403029 +0000
-@@ -38,11 +38,11 @@
+ [Strings]
+- DeviceDescription = "@@PRODUCT_TAP_DEVICE_DESCRIPTION@@"
+- Provider = "@@PRODUCT_TAP_PROVIDER@@"
++ DeviceDescription = "Tor VM TAP-Win32 Adapter V9"
++ Provider = "Tor TAP-Win32 Provider"
- # TAP Adapter parameters. Note that PRODUCT_TAP_ID is
- # defined in version.m4.
--!define PRODUCT_TAP_DEVICE_DESCRIPTION "TAP-Win32 Adapter V9"
--!define PRODUCT_TAP_PROVIDER "TAP-Win32 Provider V9"
-+!define PRODUCT_TAP_DEVICE_DESCRIPTION "Tor VM TAP-Win32 Adapter V9"
-+!define PRODUCT_TAP_PROVIDER "Tor VM TAP-Win32 Provider V9"
- !define PRODUCT_TAP_MAJOR_VER 9
- !define PRODUCT_TAP_MINOR_VER 4
--!define PRODUCT_TAP_RELDATE "01/22/2008"
-+!define PRODUCT_TAP_RELDATE "09/23/2008"
+ ;----------------------------------------------------------------
+ ; Manufacturer + Product Section (Done)
+ ;----------------------------------------------------------------
+ [Manufacturer]
+ !ifdef AMD64
+- %Provider% = @@PRODUCT_TAP_ID@@, NTamd64
++ %Provider% = tortap91, NTamd64
+ !else
+- %Provider% = @@PRODUCT_TAP_ID@@
++ %Provider% = tortap91
+ !endif
- ; visible=0x81 hidden=0x89
- !define PRODUCT_TAP_CHARACTERISTICS 0x81
-@@ -52,16 +52,16 @@
+ !ifdef AMD64
+-[@@PRODUCT_TAP_ID@@.NTamd64]
++[tortap91.NTamd64]
+ !else
+-[@@PRODUCT_TAP_ID@@]
++[tortap91]
+ !endif
+- %DeviceDescription% = @@PRODUCT_TAP_ID@@.ndi, @@PRODUCT_TAP_ID@@
++ %DeviceDescription% = tortap91.ndi, tortap91
- # DDK Version.
- # DDK distribution is assumed to be in C:\WINDDK\${DDKVER}
--!define DDKVER 6001.17121
--!define DDKVER_MAJOR 6001
-+;!define DDKVER 6001.17121
-+;!define DDKVER_MAJOR 6001
+ ;---------------------------------------------------------------
+ ; Driver Section (Done)
+@@ -91,23 +90,23 @@
+ ; NCF_HAS_UI = 0x80
+ ;----------------- Characteristics ------------
- # Code Signing.
- # If undefined, don't sign any files.
--!define SIGNTOOL "../signtool"
--!define PRODUCT_SIGN_CN "openvpn"
-+;!define SIGNTOOL "../signtool"
-+;!define PRODUCT_SIGN_CN "openvpn"
+-[@@PRODUCT_TAP_ID@@.ndi]
+- CopyFiles = @@PRODUCT_TAP_ID@@.driver, @@PRODUCT_TAP_ID@@.files
+- AddReg = @@PRODUCT_TAP_ID@@.reg
+- AddReg = @@PRODUCT_TAP_ID@@.params.reg
+- Characteristics = @@PRODUCT_TAP_CHARACTERISTICS@@
++[tortap91.ndi]
++ CopyFiles = tortap91.driver
++ AddReg = tortap91.reg
++ AddReg = tortap91.params.reg
++ Characteristics = 0x01
- # -j parameter passed to make
--!define MAKE_JOBS 2
-+;!define MAKE_JOBS 2
+-[@@PRODUCT_TAP_ID@@.ndi.Services]
+- AddService = @@PRODUCT_TAP_ID@@, 2, @@PRODUCT_TAP_ID@@.service
++[tortap91.ndi.Services]
++ AddService = tortap91, 2, tortap91.service
- # output directory for built binaries
- # and other generated files
-diff -Naur orig-openvpn-2.1_rc10/tap-win32/SOURCES.in mod-openvpn-2.1_rc10/tap-win32/SOURCES.in
---- orig-openvpn-2.1_rc10/tap-win32/SOURCES.in 2008-08-10 18:35:25.000000000 +0000
-+++ mod-openvpn-2.1_rc10/tap-win32/SOURCES.in 2008-09-24 03:05:43.833514551 +0000
-@@ -4,7 +4,7 @@
- MAJORCOMP=ntos
- MINORCOMP=ndis
+-[@@PRODUCT_TAP_ID@@.reg]
+- HKR, Ndi, Service, 0, "@@PRODUCT_TAP_ID@@"
++[tortap91.reg]
++ HKR, Ndi, Service, 0, "tortap91"
+ HKR, Ndi\Interfaces, UpperRange, 0, "ndis5"
+ HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"
+ HKR, , Manufacturer, 0, "%Provider%"
+ HKR, , ProductName, 0, "%DeviceDescription%"
--TARGETNAME=@@PRODUCT_TAP_ID@@
-+TARGETNAME=tortap91
- TARGETTYPE=DRIVER
- TARGETPATH=.
- TARGETLIBS=$(DDK_LIB_PATH)\ndis.lib $(DDK_LIB_PATH)\ntstrsafe.lib
-@@ -16,6 +16,7 @@
- C_DEFINES=
- C_DEFINES=$(C_DEFINES) -DTAP_DRIVER_MAJOR_VERSION=@@PRODUCT_TAP_MAJOR_VER@@
- C_DEFINES=$(C_DEFINES) -DTAP_DRIVER_MINOR_VERSION=@@PRODUCT_TAP_MINOR_VER@@
-+C_DEFINES=$(C_DEFINES) -DDDKVER_MAJOR=3790
+-[@@PRODUCT_TAP_ID@@.params.reg]
++[tortap91.params.reg]
+ HKR, Ndi\params\MTU, ParamDesc, 0, "MTU"
+ HKR, Ndi\params\MTU, Type, 0, "int"
+ HKR, Ndi\params\MTU, Default, 0, "1500"
+@@ -148,13 +147,13 @@
+ ; SERVICE_DISABLED = 0x4
+ ;---------- Start Mode ---------------
- # Produce the same symbolic information for both free & checked builds.
- # This will allow us to perform full source-level debugging on both
-diff -Naur orig-openvpn-2.1_rc10/tap-win32/common.h mod-openvpn-2.1_rc10/tap-win32/common.h
---- orig-openvpn-2.1_rc10/tap-win32/common.h 2008-08-10 18:35:25.000000000 +0000
-+++ mod-openvpn-2.1_rc10/tap-win32/common.h 2008-09-24 05:05:38.596128150 +0000
-@@ -90,3 +90,4 @@
- //=========================================================
+-[@@PRODUCT_TAP_ID@@.service]
++[tortap91.service]
+ DisplayName = %DeviceDescription%
+ ServiceType = 1
+ StartType = 3
+ ErrorControl = 1
+ LoadOrderGroup = NDIS
+- ServiceBinary = %12%\@@PRODUCT_TAP_ID@@.sys
++ ServiceBinary = %01%\tortap91.sys
- #define TAP_COMPONENT_ID TAP_ID
-+#define PRODUCT_TAP_DEVICE_DESCRIPTION "Tor VM TAP-Win32 Network Device Driver"
+ ;-----------------------------------------------------------------
+ ; File Installation
+@@ -165,30 +164,17 @@
+ ; COPYFLG_NOVERSIONCHECK = 0x04
+ ;----------------- Copy Flags ------------
+
+-; SourceDisksNames
+-; diskid = description[, [tagfile] [, <unused>, subdir]]
+-; 1 = "Intel Driver Disk 1",e100bex.sys,,
+-
+ [SourceDisksNames]
+- 1 = %DeviceDescription%, @@PRODUCT_TAP_ID@@.sys
+-
+-; SourceDisksFiles
+-; filename_on_source = diskID[, [subdir][, size]]
+-; e100bex.sys = 1,, ; on distribution disk 1
++ 1 = %DeviceDescription%, tortap91.sys
+
+ [SourceDisksFiles]
+-@@PRODUCT_TAP_ID@@.sys = 1
++ tortap91.sys = 1
+
+ [DestinationDirs]
+- @@PRODUCT_TAP_ID@@.files = 11
+- @@PRODUCT_TAP_ID@@.driver = 12
+-
+-[@@PRODUCT_TAP_ID@@.files]
+-; TapPanel.cpl,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK
+-; cipsrvr.exe,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK
++ tortap91.driver = 01
+
+-[@@PRODUCT_TAP_ID@@.driver]
+- @@PRODUCT_TAP_ID@@.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK
++[tortap91.driver]
++ tortap91.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK
+
+ ;---------------------------------------------------------------
+ ; End
diff -Naur orig-openvpn-2.1_rc10/tap-win32/resource.rc mod-openvpn-2.1_rc10/tap-win32/resource.rc
--- orig-openvpn-2.1_rc10/tap-win32/resource.rc 2008-08-10 18:35:25.000000000 +0000
-+++ mod-openvpn-2.1_rc10/tap-win32/resource.rc 2008-09-24 03:00:42.600211095 +0000
-@@ -34,8 +34,8 @@
++++ mod-openvpn-2.1_rc10/tap-win32/resource.rc 2008-09-26 07:44:36.540121216 +0000
+@@ -33,11 +33,11 @@
+ VFT2_DRV_COMM
*/
- #define VER_COMPANYNAME_STR "The OpenVPN Project"
--#define VER_FILEDESCRIPTION_STR "TAP-Win32 Virtual Network Driver"
--#define VER_ORIGINALFILENAME_STR TAP_COMPONENT_ID ".sys"
-+#define VER_FILEDESCRIPTION_STR "Tor VM TAP-Win32 Network Driver"
-+#define VER_ORIGINALFILENAME_STR "tortap91.sys"
- #define VER_LEGALCOPYRIGHT_YEARS "2003-2006"
- #define VER_LEGALCOPYRIGHT_STR "Telethra, Inc."
+-#define VER_COMPANYNAME_STR "The OpenVPN Project"
++#define VER_COMPANYNAME_STR "The Tor Project, Inc."
+ #define VER_FILEDESCRIPTION_STR "TAP-Win32 Virtual Network Driver"
+ #define VER_ORIGINALFILENAME_STR TAP_COMPONENT_ID ".sys"
+-#define VER_LEGALCOPYRIGHT_YEARS "2003-2006"
+-#define VER_LEGALCOPYRIGHT_STR "Telethra, Inc."
++#define VER_LEGALCOPYRIGHT_YEARS "2003-2008"
++#define VER_LEGALCOPYRIGHT_STR "Telethra, Inc. & TPI"
+
+ #define VER_PRODUCTNAME_STR VER_FILEDESCRIPTION_STR
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-24 02:56:19.103779332 +0000
++++ mod-openvpn-2.1_rc10/tap-win32/tapdrvr.c 2008-09-23 09:48:10.733010600 +0000
@@ -39,7 +39,6 @@
// TAP_IOCTL_CONFIG_TUN ioctl.
//======================================================
@@ -160,19 +230,10 @@
#ifndef DDKVER_MAJOR
#error DDKVER_MAJOR must be defined as the major number of the DDK Version
#endif
-@@ -52,7 +51,7 @@
- #define NTSTRSAFE_LIB
-
- // Debug info output
--#define ALSO_DBGPRINT 1
-+#define ALSO_DBGPRINT 0
- #define DEBUGP_AT_DISPATCH 0
-
- //========================================================
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-24 01:08:38.192342317 +0000
-@@ -1,6 +1,11 @@
++++ mod-openvpn-2.1_rc10/version.m4 2008-09-23 10:11:57.426120280 +0000
+@@ -1,6 +1,12 @@
-dnl define the OpenVPN version
+define(PRODUCT_NAME,[TorTap32])
define(PRODUCT_VERSION,[2.1_rc10])
@@ -188,3 +249,4 @@
+define(PRODUCT_TAP_DEVICE_DESCRIPTION,[Tor TAP-Win32 Adapter V9 for Qemu])
+define(PRODUCT_TAP_PROVIDER,[Tor TAP-Win32 Provider V9])
+define(PRODUCT_TAP_CHARACTERISTICS,[0x81])
++
Modified: torvm/trunk/build/win32/patches/qemu-winpcap-0.9.1.patch
===================================================================
--- torvm/trunk/build/win32/patches/qemu-winpcap-0.9.1.patch 2008-09-25 21:06:32 UTC (rev 16968)
+++ torvm/trunk/build/win32/patches/qemu-winpcap-0.9.1.patch 2008-09-26 08:16:33 UTC (rev 16969)
@@ -1,6 +1,6 @@
-diff -Naur qemu-0.9.1-orig/Makefile.target qemu-0.9.1-mod/Makefile.target
---- qemu-0.9.1-orig/Makefile.target 2008-01-06 19:38:41.000000000 +0000
-+++ qemu-0.9.1-mod/Makefile.target 2008-07-23 05:03:59.572327704 +0000
+diff -Naur orig-qemu-0.9.1/Makefile.target mod-qemu-0.9.1/Makefile.target
+--- orig-qemu-0.9.1/Makefile.target 2008-01-06 19:38:41.000000000 +0000
++++ mod-qemu-0.9.1/Makefile.target 2008-09-26 07:33:17.304380744 +0000
@@ -237,7 +237,7 @@
LIBS+=-lz
endif
@@ -10,9 +10,9 @@
endif
ifdef CONFIG_SOLARIS
LIBS+=-lsocket -lnsl -lresolv
-diff -Naur qemu-0.9.1-orig/configure qemu-0.9.1-mod/configure
---- qemu-0.9.1-orig/configure 2008-01-06 19:38:42.000000000 +0000
-+++ qemu-0.9.1-mod/configure 2008-07-22 01:29:15.000000000 +0000
+diff -Naur orig-qemu-0.9.1/configure mod-qemu-0.9.1/configure
+--- orig-qemu-0.9.1/configure 2008-01-06 19:38:42.000000000 +0000
++++ mod-qemu-0.9.1/configure 2008-09-26 07:33:17.468355816 +0000
@@ -600,7 +600,7 @@
#undef main /* We don't want SDL to override our main() */
int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
@@ -33,9 +33,9 @@
fi
if test "$adlib" = "yes" ; then
echo "CONFIG_ADLIB=yes" >> $config_mak
-diff -Naur qemu-0.9.1-orig/dyngen-exec.h qemu-0.9.1-mod/dyngen-exec.h
---- qemu-0.9.1-orig/dyngen-exec.h 2008-01-06 19:38:42.000000000 +0000
-+++ qemu-0.9.1-mod/dyngen-exec.h 2008-07-23 04:22:31.743310528 +0000
+diff -Naur orig-qemu-0.9.1/dyngen-exec.h mod-qemu-0.9.1/dyngen-exec.h
+--- orig-qemu-0.9.1/dyngen-exec.h 2008-01-06 19:38:42.000000000 +0000
++++ mod-qemu-0.9.1/dyngen-exec.h 2008-09-26 07:33:18.468203816 +0000
@@ -32,6 +32,7 @@
host headers do not allow that. */
#include <stddef.h>
@@ -66,10 +66,10 @@
#ifdef _BSD
typedef struct __sFILE FILE;
#else
-diff -Naur qemu-0.9.1-orig/vl.c qemu-0.9.1-mod/vl.c
---- qemu-0.9.1-orig/vl.c 2008-01-06 19:38:42.000000000 +0000
-+++ qemu-0.9.1-mod/vl.c 2008-07-22 06:44:51.077588952 +0000
-@@ -3858,6 +3858,326 @@
+diff -Naur orig-qemu-0.9.1/vl.c mod-qemu-0.9.1/vl.c
+--- orig-qemu-0.9.1/vl.c 2008-01-06 19:38:42.000000000 +0000
++++ mod-qemu-0.9.1/vl.c 2008-09-26 07:42:09.476478288 +0000
+@@ -3858,6 +3858,317 @@
#endif /* CONFIG_SLIRP */
@@ -100,7 +100,7 @@
+
+#define ADAPTER_KEY "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
+#define NETWORK_CONNECTIONS_KEY "SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
-+#define DEVICE_PREFIX "\\Device\\NPF_"
++#define DEVICE_PREFIX "\\Device\\TORNPF_"
+
+static int get_net_device_guid(
+ char *name,
@@ -225,22 +225,9 @@
+ return 0;
+}
+
-+int wtf=0;
-+unsigned char mymac[8];
-+
+static void pcap_receive(void *opaque, const uint8_t *buf, int size)
+{
-+ // XXX use wtf to drop the 1st packet.
-+ //cheesy hack to not 'read' my own packets. we gobble the 1st packet
-+ if(wtf==0)
-+ {
-+ memset(mymac,0x0,8);
-+ memcpy(mymac,(u_char*)buf+6,6);
-+ wtf++;
-+ }
-+ else{
-+ pcap_sendpacket((pcap_t*)pcaphandle, (u_char*)buf, size);
-+ }
++ pcap_sendpacket((pcap_t*)pcaphandle, (u_char*)buf, size);
+}
+
+void *pcap_send(void *threadid)
@@ -263,14 +250,10 @@
+{
+ if(phdr->len<1501)
+ {
-+ // XXX omit recieving own packets. need to improve this patch
-+ if(memcmp(mymac,(u_char*)pdata+6,6)) {
-+ qemu_send_packet(pcap_vc, pdata, phdr->len);
-+ }
++ qemu_send_packet(pcap_vc, pdata, phdr->len);
+ }
+}
+
-+#define ETH_PROMISC 1
+#define PCAP_READ_TIMEOUT 15
+
+int eth_open(char* name)
@@ -297,9 +280,17 @@
+
+ /* attempt to connect device */
+ memset(errbuf, 0, sizeof(errbuf));
-+ pcaphandle = (void*) pcap_open_live(savname, bufsz, ETH_PROMISC, PCAP_READ_TIMEOUT, errbuf);
++ pcaphandle = (void*) pcap_open_live(savname,
++ bufsz,
++ PCAP_OPENFLAG_PROMISCUOUS | PCAP_OPENFLAG_NOCAPTURE_LOCAL,
++ PCAP_READ_TIMEOUT,
++ errbuf);
+ if (!pcaphandle) { /* try non-promisc open device */
-+ pcaphandle = (void*) pcap_open_live(savname, bufsz, 0, PCAP_READ_TIMEOUT, errbuf);
++ pcaphandle = (void*) pcap_open_live(savname,
++ bufsz,
++ PCAP_OPENFLAG_NOCAPTURE_LOCAL,
++ PCAP_READ_TIMEOUT,
++ errbuf);
+ if (!pcaphandle) { /* cannot open device */
+ msg = "Eth: pcap_open_live error - %s\r\n";
+ fprintf (stderr, msg, errbuf);
@@ -396,7 +387,7 @@
#if !defined(_WIN32)
typedef struct TAPState {
-@@ -4733,6 +5053,14 @@
+@@ -4733,6 +5044,14 @@
ret = net_slirp_init(vlan);
} else
#endif
@@ -411,7 +402,7 @@
#ifdef _WIN32
if (!strcmp(device, "tap")) {
char ifname[64];
-@@ -7551,6 +7879,9 @@
+@@ -7551,6 +7870,9 @@
" connect the user mode network stack to VLAN 'n' and send\n"
" hostname 'host' to DHCP clients\n"
#endif
@@ -421,7 +412,7 @@
#ifdef _WIN32
"-net tap[,vlan=n],ifname=name\n"
" connect the host TAP network interface to VLAN 'n'\n"
-@@ -7656,9 +7987,6 @@
+@@ -7656,9 +7978,6 @@
QEMU_OPTION_pflash,
QEMU_OPTION_boot,
QEMU_OPTION_snapshot,
@@ -431,7 +422,7 @@
QEMU_OPTION_m,
QEMU_OPTION_nographic,
QEMU_OPTION_portrait,
-@@ -7746,9 +8074,6 @@
+@@ -7746,9 +8065,6 @@
{ "pflash", HAS_ARG, QEMU_OPTION_pflash },
{ "boot", HAS_ARG, QEMU_OPTION_boot },
{ "snapshot", 0, QEMU_OPTION_snapshot },
@@ -441,7 +432,7 @@
{ "m", HAS_ARG, QEMU_OPTION_m },
{ "nographic", 0, QEMU_OPTION_nographic },
{ "portrait", 0, QEMU_OPTION_portrait },
-@@ -8355,11 +8680,6 @@
+@@ -8355,11 +8671,6 @@
drive_add("file=\"%s\"," FD_ALIAS, optarg,
popt->index - QEMU_OPTION_fda);
break;
Modified: torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch
===================================================================
--- torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch 2008-09-25 21:06:32 UTC (rev 16968)
+++ torvm/trunk/build/win32/patches/winpcap-tor-device-mods.patch 2008-09-26 08:16:33 UTC (rev 16969)
@@ -1,6 +1,6 @@
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
++++ mod-winpcap/Common/WpcapNames.h 2008-09-26 07:13:21.959100848 +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]_-',"
@@ -72,7 +72,7 @@
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
++++ mod-winpcap/packetNtx/Dll/AdInfo.c 2008-09-26 07:13:21.960100696 +0000
@@ -96,7 +96,7 @@
#endif /* HAVE_DAG_API */
@@ -84,7 +84,7 @@
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
++++ mod-winpcap/packetNtx/Dll/Packet.def 2008-09-26 07:13:21.961100544 +0000
@@ -1,4 +1,4 @@
-LIBRARY packet
+LIBRARY tpacket
@@ -93,10 +93,13 @@
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 @@
++++ mod-winpcap/packetNtx/Dll/version.rc2 2008-09-26 08:13:33.693033832 +0000
+@@ -26,19 +26,19 @@
+ BEGIN
+ BLOCK "000004b0"
BEGIN
- VALUE "CompanyName", WINPCAP_COMPANY_NAME
+- VALUE "CompanyName", WINPCAP_COMPANY_NAME
++ VALUE "CompanyName", "The Tor Project, Inc."
#ifdef _WINNT4
- VALUE "FileDescription", "packet.dll (NT4) Dynamic Link Library"
+ VALUE "FileDescription", "tpacket.dll (NT4) Dynamic Link Library"
@@ -119,10 +122,13 @@
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 @@
++++ mod-winpcap/packetNtx/driver/NPF.RC 2008-09-26 07:18:26.893743736 +0000
+@@ -22,22 +22,22 @@
+ BEGIN
+ BLOCK "000004b0"
BEGIN
- VALUE "CompanyName", WINPCAP_COMPANY_NAME
+- VALUE "CompanyName", WINPCAP_COMPANY_NAME
++ VALUE "CompanyName", "The Tor Project, Inc."
#ifdef __NPF_NT4__
- VALUE "FileDescription", "npf.sys (NT4) Kernel Driver"
+ VALUE "FileDescription", "tornpf.sys (NT4) Kernel Driver"
@@ -135,17 +141,21 @@
#endif
VALUE "FileVersion", WINPCAP_VER_STRING
- VALUE "InternalName", "NPF + TME"
-+ VALUE "InternalName", "TorNPF"
++ 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
+- VALUE "Build Description", WINPCAP_BUILD_DESCRIPTION
++ VALUE "Build Description", WINPCAP_BUILD_DESCRIPTION
+ END
+ END
+ BLOCK "VarFileInfo"
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
++++ mod-winpcap/packetNtx/driver/dump.c 2008-09-26 07:13:21.962100392 +0000
@@ -247,6 +247,7 @@
return ntStatus;
}
@@ -165,7 +175,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-23 06:00:16.861107002 +0000
++++ mod-winpcap/version.h 2008-09-26 07:13:21.963100240 +0000
@@ -15,23 +15,23 @@
// 4.1.0.1124 --> WinPcap 4.1 beta3
// 4.1.0.1237 --> WinPcap 4.1 beta4
@@ -197,7 +207,7 @@
#define WINPCAP_LIBPCAP_VERSION "1.0 - branch"
diff -Naur orig-winpcap/wpcap/PRJ/GNUmakefile mod-winpcap/wpcap/PRJ/GNUmakefile
--- orig-winpcap/wpcap/PRJ/GNUmakefile 2008-05-20 17:30:46.000000000 +0000
-+++ mod-winpcap/wpcap/PRJ/GNUmakefile 2008-09-24 03:30:16.696908481 +0000
++++ mod-winpcap/wpcap/PRJ/GNUmakefile 2008-09-26 07:13:21.963100240 +0000
@@ -23,15 +23,14 @@
CFLAGS = -I ../libpcap -I ../libpcap/bpf -I ../libpcap/lbl \
-I ../libpcap/Win32/Include -I../libpcap/Win32/Include/ipv6kit \