mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-08 21:43:44 +02:00
Going, going, gone...
This commit is contained in:
parent
7d951783ca
commit
eb703d32b0
152 changed files with 820 additions and 31243 deletions
346
attic/go/CMakeLists.txt
Normal file
346
attic/go/CMakeLists.txt
Normal file
|
@ -0,0 +1,346 @@
|
||||||
|
cmake_minimum_required (VERSION 3.8)
|
||||||
|
|
||||||
|
cmake_policy(SET CMP0048 NEW)
|
||||||
|
|
||||||
|
if(${CMAKE_VERSION} VERSION_LESS 3.15)
|
||||||
|
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
|
||||||
|
else()
|
||||||
|
cmake_policy(VERSION 3.15)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(ZEROTIER_VERSION_MAJOR 1 CACHE INTERNAL "")
|
||||||
|
set(ZEROTIER_VERSION_MINOR 9 CACHE INTERNAL "")
|
||||||
|
set(ZEROTIER_VERSION_REVISION 0 CACHE INTERNAL "")
|
||||||
|
set(ZEROTIER_VERSION_BUILD 0 CACHE INTERNAL "")
|
||||||
|
|
||||||
|
project(zerotier
|
||||||
|
VERSION ${ZEROTIER_VERSION_MAJOR}.${ZEROTIER_VERSION_MINOR}.${ZEROTIER_VERSION_REVISION}.${ZEROTIER_VERSION_BUILD}
|
||||||
|
DESCRIPTION "ZeroTier Network Hypervisor"
|
||||||
|
LANGUAGES CXX C)
|
||||||
|
|
||||||
|
if(NOT PACKAGE_STATIC)
|
||||||
|
|
||||||
|
find_program(
|
||||||
|
GO go
|
||||||
|
HINTS "/usr/local/go/bin" "/usr/bin" "/usr/local/bin" "C:/go/bin"
|
||||||
|
)
|
||||||
|
if(NOT GO)
|
||||||
|
message(FATAL_ERROR "Golang not found")
|
||||||
|
else(NOT GO)
|
||||||
|
message(STATUS "Found Golang at ${GO}")
|
||||||
|
endif(NOT GO)
|
||||||
|
|
||||||
|
set(default_build_type "Release")
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_SYSTEM_VERSION "7" CACHE STRING INTERNAL FORCE)
|
||||||
|
else(WIN32)
|
||||||
|
if(APPLE)
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
else(APPLE)
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
endif(APPLE)
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||||
|
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
|
||||||
|
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the type of build." FORCE)
|
||||||
|
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
option(BUILD_CENTRAL_CONTROLLER "Build ZeroTier Central Controller" OFF)
|
||||||
|
if(BUILD_CENTRAL_CONTROLLER)
|
||||||
|
find_package(PkgConfig REQUIRED)
|
||||||
|
if(APPLE)
|
||||||
|
set(CMAKE_PREFIX_PATH
|
||||||
|
${CMAKE_PREFIX_PATH}
|
||||||
|
/usr/local/opt/libpq
|
||||||
|
/usr/local/lib
|
||||||
|
)
|
||||||
|
endif(APPLE)
|
||||||
|
find_package(PostgreSQL REQUIRED)
|
||||||
|
|
||||||
|
pkg_check_modules(hiredis REQUIRED IMPORTED_TARGET hiredis)
|
||||||
|
|
||||||
|
add_subdirectory(controller/thirdparty/redis-plus-plus-1.1.1)
|
||||||
|
set(redispp_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/controller/thirdparty/redis-plus-plus-1.1.1/src/sw)
|
||||||
|
set(redispp_STATIC_LIB redispp_static)
|
||||||
|
endif(BUILD_CENTRAL_CONTROLLER)
|
||||||
|
|
||||||
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
add_definitions(-DZT_DEBUG)
|
||||||
|
endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
|
||||||
|
message("++ Setting Windows Compiler Flags ${CMAKE_BUILD_TYPE}")
|
||||||
|
|
||||||
|
add_definitions(-DNOMINMAX)
|
||||||
|
add_compile_options(
|
||||||
|
-Wall
|
||||||
|
-Wno-deprecated
|
||||||
|
-Wno-unused-function
|
||||||
|
-Wno-format
|
||||||
|
$<$<CONFIG:DEBUG>:-g>
|
||||||
|
$<$<CONFIG:DEBUG>:-O0>
|
||||||
|
$<$<CONFIG:RELEASE>:-O3>
|
||||||
|
$<$<CONFIG:RELEASE>:-ffast-math>
|
||||||
|
$<$<CONFIG:RELWITHDEBINFO>:-O3>
|
||||||
|
$<$<CONFIG:RELWITHDEBINFO>:-g>
|
||||||
|
)
|
||||||
|
|
||||||
|
set(GOFLAGS
|
||||||
|
-a
|
||||||
|
-trimpath
|
||||||
|
)
|
||||||
|
|
||||||
|
if(BUILD_32BIT)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR "x86" CACHE STRING "system processor")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
|
||||||
|
set(GOARCH "GOARCH=386" CACHE STRING "go architecture")
|
||||||
|
add_compile_options(
|
||||||
|
-m32
|
||||||
|
)
|
||||||
|
add_link_options(
|
||||||
|
-m32
|
||||||
|
)
|
||||||
|
endif(BUILD_32BIT)
|
||||||
|
|
||||||
|
else(WIN32)
|
||||||
|
|
||||||
|
set(GOFLAGS
|
||||||
|
-trimpath
|
||||||
|
-buildmode=pie
|
||||||
|
)
|
||||||
|
|
||||||
|
if(APPLE)
|
||||||
|
|
||||||
|
message("++ Setting MacOS Compiler Flags ${CMAKE_BUILD_TYPE}")
|
||||||
|
|
||||||
|
set(MACOS_VERSION_MIN "10.12")
|
||||||
|
|
||||||
|
add_compile_options(
|
||||||
|
-Wall
|
||||||
|
-Wno-deprecated
|
||||||
|
-Wno-unused-function
|
||||||
|
-mmacosx-version-min=${MACOS_VERSION_MIN}
|
||||||
|
$<$<CONFIG:DEBUG>:-g>
|
||||||
|
$<$<CONFIG:DEBUG>:-O0>
|
||||||
|
$<$<CONFIG:RELEASE>:-Ofast>
|
||||||
|
$<$<CONFIG:RELEASE>:-ffast-math>
|
||||||
|
$<$<CONFIG:RELEASE>:-fPIE>
|
||||||
|
$<$<CONFIG:RELEASE>:-flto>
|
||||||
|
$<$<CONFIG:RELWITHDEBINFO>:-O1>
|
||||||
|
$<$<CONFIG:RELWITHDEBINFO>:-fPIE>
|
||||||
|
$<$<CONFIG:RELWITHDEBINFO>:-g>
|
||||||
|
)
|
||||||
|
|
||||||
|
add_link_options(
|
||||||
|
-mmacosx-version-min=${MACOS_VERSION_MIN}
|
||||||
|
$<$<CONFIG:RELEASE>:-flto>
|
||||||
|
)
|
||||||
|
|
||||||
|
set(GOFLAGS
|
||||||
|
${GOFLAGS}
|
||||||
|
-a
|
||||||
|
-ldflags '-w -extldflags \"-Wl,-undefined -Wl,dynamic_lookup\"'
|
||||||
|
)
|
||||||
|
|
||||||
|
else(APPLE)
|
||||||
|
|
||||||
|
message("++ Setting Linux/BSD/Posix Compiler Flags (${CMAKE_BUILD_TYPE})")
|
||||||
|
|
||||||
|
add_compile_options(
|
||||||
|
-Wall
|
||||||
|
-Wno-deprecated
|
||||||
|
-Wno-unused-function
|
||||||
|
-Wno-format
|
||||||
|
$<$<CONFIG:DEBUG>:-g>
|
||||||
|
$<$<CONFIG:DEBUG>:-O0>
|
||||||
|
$<$<CONFIG:RELEASE>:-O3>
|
||||||
|
$<$<CONFIG:RELEASE>:-ffast-math>
|
||||||
|
$<$<CONFIG:RELEASE>:-fPIE>
|
||||||
|
$<$<CONFIG:RELWITHDEBINFO>:-O3>
|
||||||
|
$<$<CONFIG:RELWITHDEBINFO>:-fPIE>
|
||||||
|
$<$<CONFIG:RELWITHDEBINFO>:-g>
|
||||||
|
)
|
||||||
|
|
||||||
|
option(BUILD_32BIT "Force building as 32-bit binary" OFF)
|
||||||
|
option(BUILD_STATIC "Build statically linked executable" OFF)
|
||||||
|
option(BUILD_ARM_V5 "Build ARMv5" OFF)
|
||||||
|
option(BUILD_ARM_V6 "Build ARMv6" OFF)
|
||||||
|
|
||||||
|
if(BUILD_ARM_V5 AND BUILD_ARM_V6)
|
||||||
|
message(FATAL_ERROR "BUILD_ARM_V5 and BUILD_ARM_V6 are mutually exclusive!")
|
||||||
|
endif(BUILD_ARM_V5 AND BUILD_ARM_V6)
|
||||||
|
|
||||||
|
if(BUILD_32BIT)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR "x86" CACHE STRING "system processor")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
|
||||||
|
set(GOARCH "GOARCH=386" CACHE STRING "go architecture")
|
||||||
|
add_compile_options(
|
||||||
|
-m32
|
||||||
|
)
|
||||||
|
endif(BUILD_32BIT)
|
||||||
|
|
||||||
|
if(BUILD_STATIC)
|
||||||
|
add_link_options(
|
||||||
|
-static
|
||||||
|
)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "-static ${CMAKE_EXE_LINKER_FLAGS}")
|
||||||
|
set(GOFLAGS
|
||||||
|
${GOFLAGS}
|
||||||
|
-a
|
||||||
|
-tags osusergo,netgo
|
||||||
|
-ldflags '-w -extldflags \"-static -Wl,-unresolved-symbols=ignore-all\"'
|
||||||
|
)
|
||||||
|
else(BUILD_STATIC)
|
||||||
|
set(GOFLAGS
|
||||||
|
${GOFLAGS}
|
||||||
|
-a
|
||||||
|
-ldflags '-w -extldflags \"-Wl,-unresolved-symbols=ignore-all\"'
|
||||||
|
)
|
||||||
|
endif(BUILD_STATIC)
|
||||||
|
|
||||||
|
if(BUILD_ARM_V5)
|
||||||
|
set(GOARM "GOARM=5")
|
||||||
|
endif(BUILD_ARM_V5)
|
||||||
|
|
||||||
|
if(BUILD_ARM_V6)
|
||||||
|
set(GOARM "GOARM=6")
|
||||||
|
endif(BUILD_ARM_V6)
|
||||||
|
|
||||||
|
endif(APPLE)
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
|
if (
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "amd64" OR
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64" OR
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "X86_64" OR
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "x64" OR
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "X64"
|
||||||
|
)
|
||||||
|
message("++ Adding flags for processor ${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
add_compile_options(-maes -mrdrnd -mpclmul -msse -msse2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "arm64" OR
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "ARM64" OR
|
||||||
|
CMAKE_SYSTEM_PROCESSOR MATCHES "AARCH64"
|
||||||
|
)
|
||||||
|
message("++ Adding flags for processor ${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
add_compile_options(-march=armv8-a+aes+crypto -mtune=generic -mstrict-align)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(GO_BUILD_TAGS)
|
||||||
|
|
||||||
|
if(BUILD_CENTRAL_CONTROLLER)
|
||||||
|
add_definitions(-DZT_CONTROLLER_USE_LIBPQ=1)
|
||||||
|
set(GO_BUILD_TAGS -tags central)
|
||||||
|
endif(BUILD_CENTRAL_CONTROLLER)
|
||||||
|
|
||||||
|
add_subdirectory(core)
|
||||||
|
add_subdirectory(controller)
|
||||||
|
add_subdirectory(osdep)
|
||||||
|
add_subdirectory(serviceiocore)
|
||||||
|
|
||||||
|
file(GLOB go_src
|
||||||
|
${CMAKE_SOURCE_DIR}/cmd/*.go
|
||||||
|
${CMAKE_SOURCE_DIR}/cmd/cmd/*.go
|
||||||
|
${CMAKE_SOURCE_DIR}/pkg/zerotier/*.go
|
||||||
|
)
|
||||||
|
file(GLOB go_zt_service_tests_cmd_src
|
||||||
|
${CMAKE_SOURCE_DIR}/cmd/zt_service_tests/*.go
|
||||||
|
)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
set(GO_EXE_NAME "zerotier.exe")
|
||||||
|
set(GO_SERVICE_TESTS_EXE_NAME "zt_service_tests.exe")
|
||||||
|
set(GO_EXTRA_LIBRARIES "-lstdc++ -lwsock32 -lws2_32 -liphlpapi -lole32 -loleaut32 -lrpcrt4 -luuid")
|
||||||
|
else(WIN32)
|
||||||
|
set(GO_EXE_NAME "zerotier")
|
||||||
|
set(GO_SERVICE_TESTS_EXE_NAME "zt_service_tests")
|
||||||
|
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
|
set(GO_EXTRA_LIBRARIES "-lstdc++")
|
||||||
|
if(BUILD_ARM_V5)
|
||||||
|
set(GO_EXTRA_LIBRARIES
|
||||||
|
${GO_EXTRA_LIBRARIES}
|
||||||
|
"-latomic"
|
||||||
|
)
|
||||||
|
endif(BUILD_ARM_V5)
|
||||||
|
else()
|
||||||
|
set(GO_EXTRA_LIBRARIES "-lc++" "-lm")
|
||||||
|
endif()
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
zt_service_tests ALL
|
||||||
|
BYPRODUCTS ${CMAKE_BINARY_DIR}/zt_service_tests
|
||||||
|
SOURCES ${go_src} ${go_zt_service_tests_cmd_src}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E env ${GOARCH} ${GOARM} CGO_ENABLED=1 CGO_CFLAGS=\"-O3\" CGO_LDFLAGS=\"$<TARGET_FILE:zt_core> $<TARGET_FILE:zt_controller> $<TARGET_FILE:zt_service_io_core> $<TARGET_FILE:zt_osdep> ${GO_EXTRA_LIBRARIES}\" ${GO} build -mod=vendor ${GOFLAGS} -o ${CMAKE_BINARY_DIR}/${GO_SERVICE_TESTS_EXE_NAME} ${go_zt_service_tests_cmd_src}
|
||||||
|
COMMENT "Compiling zt_service_tests (Go/cgo self-tests)..."
|
||||||
|
)
|
||||||
|
add_dependencies(zt_service_tests zt_osdep zt_core zt_controller zt_service_io_core)
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
zerotier ALL
|
||||||
|
BYPRODUCTS ${CMAKE_BINARY_DIR}/zerotier
|
||||||
|
SOURCES ${go_src}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E env ${GOARCH} ${GOARM} CGO_ENABLED=1 CGO_CFLAGS=\"-O3\" CGO_LDFLAGS=\"$<TARGET_FILE:zt_core> $<TARGET_FILE:zt_controller> $<TARGET_FILE:zt_service_io_core> $<TARGET_FILE:zt_osdep> ${GO_EXTRA_LIBRARIES}\" ${GO} build -mod=vendor ${GOFLAGS} -o ${CMAKE_BINARY_DIR}/${GO_EXE_NAME} ${CMAKE_SOURCE_DIR}/cmd/zerotier/zerotier.go
|
||||||
|
COMMENT "Compiling Go Code..."
|
||||||
|
)
|
||||||
|
add_dependencies(zerotier zt_osdep zt_core zt_controller zt_service_io_core)
|
||||||
|
|
||||||
|
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/zerotier DESTINATION bin)
|
||||||
|
|
||||||
|
else(NOT PACKAGE_STATIC)
|
||||||
|
|
||||||
|
if(BUILD_32BIT)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR "x86" CACHE STRING "system processor")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
|
||||||
|
add_compile_options(
|
||||||
|
-m32
|
||||||
|
)
|
||||||
|
endif(BUILD_32BIT)
|
||||||
|
|
||||||
|
set(STATIC_BINARY ${CMAKE_BINARY_DIR}/zerotier)
|
||||||
|
set(IMPORTED_LOCATION ${CMAKE_BINARY_DIR})
|
||||||
|
add_executable(zerotier IMPORTED GLOBAL)
|
||||||
|
install(PROGRAMS ${STATIC_BINARY} DESTINATION bin)
|
||||||
|
|
||||||
|
endif(NOT PACKAGE_STATIC)
|
||||||
|
|
||||||
|
# Linux packaging
|
||||||
|
|
||||||
|
if("${CMAKE_SYSTEM_NAME}" EQUAL "Linux")
|
||||||
|
if(IS_DIRECTORY /lib/systemd/system)
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/debian/zerotier.service
|
||||||
|
DESTINATION /lib/systemd/system
|
||||||
|
)
|
||||||
|
elseif(IS_DIRECTORY /usr/lib/systemd/system)
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/debian/zerotier.service
|
||||||
|
DESTINATION /usr/lib/systemd/system
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_SOURCE_DIR}/packaging/debian/zerotier.init
|
||||||
|
DESTINATION /etc/init.d
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if("${ZT_PACKAGE_FORMAT}" MATCHES "DEB")
|
||||||
|
include(packaging/debian.cmake)
|
||||||
|
elseif("${ZT_PACKAGE_FORMAT}" MATCHES "RPM")
|
||||||
|
include(packaging/rpm.cmake)
|
||||||
|
else()
|
||||||
|
endif()
|
|
@ -1,8 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<DOCUMENT Type="Advanced Installer" CreateVersion="12.0" version="14.5.2" Modules="enterprise" RootPath="." Language="en" Id="{4070644B-EC9F-4962-B14A-770B9E309DC3}">
|
<DOCUMENT Type="Advanced Installer" CreateVersion="12.0" version="17.6" Modules="enterprise" RootPath="." Language="en" Id="{4070644B-EC9F-4962-B14A-770B9E309DC3}">
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
|
|
||||||
<ROW Name="HiddenItems" Value="UpdaterComponent;SerValComponent;AutorunComponent;MultipleInstancesComponent;MsiJavaComponent;MsiRegsComponent;MsiExtComponent;MsiAssemblyComponent;MsiServInstComponent;AnalyticsComponent;ActSyncAppComponent;MsiMergeModsComponent;MsiThemeComponent;BackgroundImagesComponent;DictionaryComponent;MsiEnvComponent;ScheduledTasksComponent;CPLAppletComponent;GameUxComponent;FirewallExceptionComponent;UserAccountsComponent;MsiClassComponent;WebApplicationsComponent;MsiOdbcDataSrcComponent;SqlConnectionComponent;SharePointSlnComponent;SilverlightSlnComponent;MsiAppSearchComponent;AppXAppDetailsComponent;AppXCapabilitiesComponent;AppXDependenciesComponent;AppXProductDetailsComponent;AppXVisualAssetsComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent"/>
|
|
||||||
</COMPONENT>
|
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
|
||||||
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
|
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
|
||||||
<ROW Property="ALLUSERS" Value="1"/>
|
<ROW Property="ALLUSERS" Value="1"/>
|
||||||
|
@ -15,25 +12,21 @@
|
||||||
<ROW Property="LIMITUI" MultiBuildValue="DefaultBuild:1"/>
|
<ROW Property="LIMITUI" MultiBuildValue="DefaultBuild:1"/>
|
||||||
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
||||||
<ROW Property="Manufacturer" Value="ZeroTier"/>
|
<ROW Property="Manufacturer" Value="ZeroTier"/>
|
||||||
<ROW Property="ProductCode" Value="1033:{4AFE4740-C680-40FE-B6B0-0C15EB0176F1} " Type="16"/>
|
<ROW Property="ProductCode" Value="1033:{272B1192-65BE-4BDE-894B-6D3AD8BF7FD2} " Type="16"/>
|
||||||
<ROW Property="ProductLanguage" Value="1033"/>
|
<ROW Property="ProductLanguage" Value="1033"/>
|
||||||
<ROW Property="ProductName" Value="ZeroTier One Virtual Network Port"/>
|
<ROW Property="ProductName" Value="ZeroTier One Virtual Network Port"/>
|
||||||
<ROW Property="ProductVersion" Value="1.0.0" Type="32"/>
|
<ROW Property="ProductVersion" Value="1.0.1" Type="32"/>
|
||||||
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
||||||
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
|
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
|
||||||
<ROW Property="UpgradeCode" Value="{88AA80DE-14CA-4443-B024-6EC13F3EDDAD}"/>
|
<ROW Property="UpgradeCode" Value="{88AA80DE-14CA-4443-B024-6EC13F3EDDAD}"/>
|
||||||
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT" MultiBuildValue="DefaultBuild:Windows XP SP3 x86, Windows Server 2003 SP2 x86" ValueLocId="-"/>
|
|
||||||
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT64" MultiBuildValue="DefaultBuild:Windows XP SP2 x64, Windows Server 2003 SP2 x64" ValueLocId="-"/>
|
|
||||||
<ROW Property="WindowsTypeNT64Display" MultiBuildValue="DefaultBuild:Windows XP SP2 x64, Windows Server 2003 SP2 x64" ValueLocId="-"/>
|
|
||||||
<ROW Property="WindowsTypeNTDisplay" MultiBuildValue="DefaultBuild:Windows XP SP3 x86, Windows Server 2003 SP2 x86" ValueLocId="-"/>
|
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
|
||||||
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
|
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
|
||||||
|
@ -42,6 +35,7 @@
|
||||||
<ROW Directory="zttap300_Dir" Directory_Parent="APPDIR" DefaultDir="zttap300"/>
|
<ROW Directory="zttap300_Dir" Directory_Parent="APPDIR" DefaultDir="zttap300"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
||||||
|
<ROW Component="APPDIR" ComponentId="{49E24790-69C7-44A5-A881-788C34464D73}" Directory_="APPDIR" Attributes="0"/>
|
||||||
<ROW Component="ProductInformation" ComponentId="{FFBF63D7-E03E-4ACA-966A-824C3DF6DEED}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
<ROW Component="ProductInformation" ComponentId="{FFBF63D7-E03E-4ACA-966A-824C3DF6DEED}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
||||||
<ROW Component="certutil.exe" ComponentId="{675B9939-A983-4E36-A852-54FB122599B1}" Directory_="zttap300_Dir" Attributes="256" KeyPath="certutil.exe"/>
|
<ROW Component="certutil.exe" ComponentId="{675B9939-A983-4E36-A852-54FB122599B1}" Directory_="zttap300_Dir" Attributes="256" KeyPath="certutil.exe"/>
|
||||||
<ROW Component="zttap300.cer" ComponentId="{D72CCDC6-1947-4FE1-9DBA-ECE0A024C1A3}" Directory_="zttap300_Dir" Attributes="0" KeyPath="zttap300.cer" Type="0"/>
|
<ROW Component="zttap300.cer" ComponentId="{D72CCDC6-1947-4FE1-9DBA-ECE0A024C1A3}" Directory_="zttap300_Dir" Attributes="0" KeyPath="zttap300.cer" Type="0"/>
|
||||||
|
@ -49,17 +43,17 @@
|
||||||
<ROW Component="zttap300.inf_2" ComponentId="{CB0C4519-617F-4DB5-9BF5-C6CFC6573F9C}" Directory_="zttap300_Dir" Attributes="256" Condition="VersionNT64" KeyPath="zttap300.inf"/>
|
<ROW Component="zttap300.inf_2" ComponentId="{CB0C4519-617F-4DB5-9BF5-C6CFC6573F9C}" Directory_="zttap300_Dir" Attributes="256" Condition="VersionNT64" KeyPath="zttap300.inf"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="ProductInformation certutil.exe zttap300.cer zttap300.cer_1"/>
|
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0"/>
|
||||||
<ROW Feature="zttap300" Feature_Parent="MainFeature" Title="zttap300" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="zttap300.inf_2"/>
|
<ROW Feature="zttap300" Feature_Parent="MainFeature" Title="zttap300" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0"/>
|
||||||
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||||
<ROW File="certutil.exe" Component_="certutil.exe" FileName="certutil.exe" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\certutil.exe" SelfReg="false" NextFile="zttap300.cer_1" DigSign="true"/>
|
<ROW File="zttap300.inf" Component_="zttap300.inf_2" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.inf" SelfReg="false"/>
|
||||||
<ROW File="zttap300.cat" Component_="zttap300.inf_2" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.cat" SelfReg="false" NextFile="zttap300.cer"/>
|
<ROW File="zttap300.sys" Component_="zttap300.inf_2" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.sys" SelfReg="false"/>
|
||||||
<ROW File="zttap300.cer" Component_="zttap300.cer" FileName="zttap300.cer" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\zttap300.cer" SelfReg="false" NextFile="certutil.exe"/>
|
<ROW File="zttap300.cat" Component_="zttap300.inf_2" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.cat" SelfReg="false"/>
|
||||||
|
<ROW File="zttap300.cer" Component_="zttap300.cer" FileName="zttap300.cer" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\zttap300.cer" SelfReg="false"/>
|
||||||
|
<ROW File="certutil.exe" Component_="certutil.exe" FileName="certutil.exe" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\certutil.exe" SelfReg="false" DigSign="true"/>
|
||||||
<ROW File="zttap300.cer_1" Component_="zttap300.cer_1" FileName="zttap300.cer" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\zttap300.cer" SelfReg="false"/>
|
<ROW File="zttap300.cer_1" Component_="zttap300.cer_1" FileName="zttap300.cer" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\zttap300.cer" SelfReg="false"/>
|
||||||
<ROW File="zttap300.inf" Component_="zttap300.inf_2" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.inf" SelfReg="false" NextFile="zttap300.sys"/>
|
|
||||||
<ROW File="zttap300.sys" Component_="zttap300.inf_2" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.sys" SelfReg="false" NextFile="zttap300.cat"/>
|
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.custcomp.AiInstallExecuteSequenceAliasComponent">
|
<COMPONENT cid="caphyon.advinst.custcomp.AiInstallExecuteSequenceAliasComponent">
|
||||||
<ROW AliasRowId="certutil.exe" AliasRowOperation="2" Sequence="4001"/>
|
<ROW AliasRowId="certutil.exe" AliasRowOperation="2" Sequence="4001"/>
|
||||||
|
@ -75,7 +69,7 @@
|
||||||
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
||||||
<ROW TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="[|ProductName]" SignOptions="7" SignTool="0" UseSha256="1" Thumbprint="7f01c3746df9e6c8235ea2ae38d3cdfeb185728b Subject: ZeroTier, Inc. Issuer: DigiCert EV Code Signing CA (SHA2) Valid from 11/30/2016 to 12/05/2019"/>
|
<ROW TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="[|ProductName]" SignOptions="7" SignTool="5" UseSha256="1" KVTenantId="5300bf3b-0eff-4a5f-a63f-821e22ed1730" KVAppId="5f94d77e-b795-41fd-afe7-ec913b03c1d3" KVName="ZeroTier-CS" KVCertName="ZT-EV-CS" KVCertVersion="442c2d6f77874ff99eed4b36f5cb401c"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
|
||||||
<ROW Fragment="CommonUI.aip" Path="<AI_FRAGS>CommonUI.aip"/>
|
<ROW Fragment="CommonUI.aip" Path="<AI_FRAGS>CommonUI.aip"/>
|
||||||
|
@ -121,6 +115,9 @@
|
||||||
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
|
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
|
||||||
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/>
|
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
|
||||||
|
<ROW Directory_="APPDIR" Component_="APPDIR" ManualDelete="true"/>
|
||||||
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
||||||
<ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH_ORIGINAL" Target="[AI_SETUPEXEPATH]"/>
|
<ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH_ORIGINAL" Target="[AI_SETUPEXEPATH]"/>
|
||||||
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
|
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
|
||||||
|
@ -141,6 +138,14 @@
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiDriverPackagesComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiDriverPackagesComponent">
|
||||||
<ROW InfFileName="zttap300.inf" Flags="15"/>
|
<ROW InfFileName="zttap300.inf" Flags="15"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatCompsComponent">
|
||||||
|
<ROW Feature_="MainFeature" Component_="ProductInformation"/>
|
||||||
|
<ROW Feature_="MainFeature" Component_="certutil.exe"/>
|
||||||
|
<ROW Feature_="MainFeature" Component_="zttap300.cer"/>
|
||||||
|
<ROW Feature_="MainFeature" Component_="zttap300.cer_1"/>
|
||||||
|
<ROW Feature_="zttap300" Component_="zttap300.inf_2"/>
|
||||||
|
<ROW Feature_="MainFeature" Component_="APPDIR"/>
|
||||||
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
||||||
<ROW Name="ZeroTierIcon.exe" SourcePath="..\..\..\artwork\ZeroTierIcon.ico" Index="0"/>
|
<ROW Name="ZeroTierIcon.exe" SourcePath="..\..\..\artwork\ZeroTierIcon.ico" Index="0"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
@ -149,7 +154,7 @@
|
||||||
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
||||||
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/>
|
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/>
|
||||||
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/>
|
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/>
|
||||||
<ROW Action="AI_ResolveKnownFolders" Sequence="53"/>
|
<ROW Action="AI_ResolveKnownFolders" Sequence="54"/>
|
||||||
<ROW Action="AI_EnableDebugLog" Sequence="51"/>
|
<ROW Action="AI_EnableDebugLog" Sequence="51"/>
|
||||||
<ROW Action="certutil.exe" Condition="( NOT Installed )" Sequence="6401"/>
|
<ROW Action="certutil.exe" Condition="( NOT Installed )" Sequence="6401"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
@ -162,11 +167,9 @@
|
||||||
<ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Condition="AI_SETUPEXEPATH_ORIGINAL" Sequence="101"/>
|
<ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Condition="AI_SETUPEXEPATH_ORIGINAL" Sequence="101"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
||||||
<ROW Condition="( Version9X OR ( NOT VersionNT64 ) OR ( VersionNT64 AND ((VersionNT64 <> 502) OR (ServicePackLevel <> 2) OR (MsiNTProductType <> 1)) AND ((VersionNT64 <> 502) OR (ServicePackLevel <> 2) OR (MsiNTProductType = 1)) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT64Display]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT64" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="((VersionNT <> 501) AND (VersionNT <> 502))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="( Version9X OR VersionNT64 OR ( VersionNT AND ((VersionNT <> 501) OR (ServicePackLevel <> 3)) AND ((VersionNT <> 502) OR (ServicePackLevel <> 2)) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNTDisplay]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT" IsPredefined="true" Builds="DefaultBuild"/>
|
|
||||||
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT40Display]" DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT40Display]" DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="(VersionNT <> 500)" Description="[ProductName] cannot be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="(VersionNT <> 500)" Description="[ProductName] cannot be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="(VersionNT64 OR ((VersionNT <> 501) OR (ServicePackLevel = 3))) AND ((VersionNT <> 502) OR (ServicePackLevel = 2))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild"/>
|
|
||||||
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]." DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]." DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<DOCUMENT Type="Advanced Installer" CreateVersion="12.0" version="14.5.2" Modules="enterprise" RootPath="." Language="en" Id="{4070644B-EC9F-4962-B14A-770B9E309DC3}">
|
<DOCUMENT Type="Advanced Installer" CreateVersion="12.0" version="17.6" Modules="enterprise" RootPath="." Language="en" Id="{4070644B-EC9F-4962-B14A-770B9E309DC3}">
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
|
|
||||||
<ROW Name="HiddenItems" Value="UpdaterComponent;SerValComponent;AutorunComponent;MultipleInstancesComponent;MsiJavaComponent;MsiRegsComponent;MsiExtComponent;MsiAssemblyComponent;MsiServInstComponent;AnalyticsComponent;ActSyncAppComponent;MsiMergeModsComponent;MsiThemeComponent;BackgroundImagesComponent;DictionaryComponent;MsiEnvComponent;ScheduledTasksComponent;CPLAppletComponent;GameUxComponent;FirewallExceptionComponent;UserAccountsComponent;MsiClassComponent;WebApplicationsComponent;MsiOdbcDataSrcComponent;SqlConnectionComponent;SharePointSlnComponent;SilverlightSlnComponent;MsiAppSearchComponent;AppXAppDetailsComponent;AppXCapabilitiesComponent;AppXDependenciesComponent;AppXProductDetailsComponent;AppXVisualAssetsComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent"/>
|
|
||||||
</COMPONENT>
|
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
|
||||||
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
|
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
|
||||||
<ROW Property="ALLUSERS" Value="1"/>
|
<ROW Property="ALLUSERS" Value="1"/>
|
||||||
|
@ -16,25 +13,21 @@
|
||||||
<ROW Property="LIMITUI" MultiBuildValue="DefaultBuild:1"/>
|
<ROW Property="LIMITUI" MultiBuildValue="DefaultBuild:1"/>
|
||||||
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
||||||
<ROW Property="Manufacturer" Value="ZeroTier"/>
|
<ROW Property="Manufacturer" Value="ZeroTier"/>
|
||||||
<ROW Property="ProductCode" Value="1033:{75F0AFE9-A004-428A-89DB-9BB9ACC4489E} " Type="16"/>
|
<ROW Property="ProductCode" Value="1033:{AB7A3645-54C9-4A73-80DE-EC33669EA0C9} " Type="16"/>
|
||||||
<ROW Property="ProductLanguage" Value="1033"/>
|
<ROW Property="ProductLanguage" Value="1033"/>
|
||||||
<ROW Property="ProductName" Value="ZeroTier One Virtual Network Port"/>
|
<ROW Property="ProductName" Value="ZeroTier Virtual Network Port"/>
|
||||||
<ROW Property="ProductVersion" Value="1.0.0" Type="32"/>
|
<ROW Property="ProductVersion" Value="1.0.1" Type="32"/>
|
||||||
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
||||||
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
|
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
|
||||||
<ROW Property="UpgradeCode" Value="{88AA80DE-14CA-4443-B024-6EC13F3EDDAD}"/>
|
<ROW Property="UpgradeCode" Value="{88AA80DE-14CA-4443-B024-6EC13F3EDDAD}"/>
|
||||||
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT" MultiBuildValue="DefaultBuild:Windows XP SP3 x86, Windows Server 2003 SP2 x86" ValueLocId="-"/>
|
|
||||||
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT64" MultiBuildValue="DefaultBuild:Windows XP SP2 x64, Windows Server 2003 SP2 x64" ValueLocId="-"/>
|
|
||||||
<ROW Property="WindowsTypeNT64Display" MultiBuildValue="DefaultBuild:Windows XP SP2 x64, Windows Server 2003 SP2 x64" ValueLocId="-"/>
|
|
||||||
<ROW Property="WindowsTypeNTDisplay" MultiBuildValue="DefaultBuild:Windows XP SP3 x86, Windows Server 2003 SP2 x86" ValueLocId="-"/>
|
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
|
||||||
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
|
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
|
||||||
|
@ -43,6 +36,7 @@
|
||||||
<ROW Directory="zttap300_Dir" Directory_Parent="APPDIR" DefaultDir="zttap300"/>
|
<ROW Directory="zttap300_Dir" Directory_Parent="APPDIR" DefaultDir="zttap300"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
||||||
|
<ROW Component="APPDIR" ComponentId="{91213EC2-D3A0-405C-867E-D89DDAA34D26}" Directory_="APPDIR" Attributes="0"/>
|
||||||
<ROW Component="ProductInformation" ComponentId="{FFBF63D7-E03E-4ACA-966A-824C3DF6DEED}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
<ROW Component="ProductInformation" ComponentId="{FFBF63D7-E03E-4ACA-966A-824C3DF6DEED}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
||||||
<ROW Component="certutil.exe" ComponentId="{716192EC-038F-4CB7-9E85-689904DFA5A7}" Directory_="zttap300_Dir" Attributes="256" KeyPath="certutil.exe"/>
|
<ROW Component="certutil.exe" ComponentId="{716192EC-038F-4CB7-9E85-689904DFA5A7}" Directory_="zttap300_Dir" Attributes="256" KeyPath="certutil.exe"/>
|
||||||
<ROW Component="zttap300.cer" ComponentId="{38822503-75B2-4D81-8F48-76F776CA921D}" Directory_="zttap300_Dir" Attributes="0" KeyPath="zttap300.cer" Type="0"/>
|
<ROW Component="zttap300.cer" ComponentId="{38822503-75B2-4D81-8F48-76F776CA921D}" Directory_="zttap300_Dir" Attributes="0" KeyPath="zttap300.cer" Type="0"/>
|
||||||
|
@ -50,17 +44,17 @@
|
||||||
<ROW Component="zttap300.inf_1" ComponentId="{07119034-A51F-4871-B503-09D1340FF248}" Directory_="zttap300_Dir" Attributes="0" Condition="(VersionNT >= 500) AND NOT VersionNT64" KeyPath="zttap300.inf"/>
|
<ROW Component="zttap300.inf_1" ComponentId="{07119034-A51F-4871-B503-09D1340FF248}" Directory_="zttap300_Dir" Attributes="0" Condition="(VersionNT >= 500) AND NOT VersionNT64" KeyPath="zttap300.inf"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||||
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="ProductInformation certutil.exe zttap300.cer zttap300.cer_1"/>
|
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0"/>
|
||||||
<ROW Feature="zttap300" Feature_Parent="MainFeature" Title="zttap300" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="zttap300.inf_1"/>
|
<ROW Feature="zttap300" Feature_Parent="MainFeature" Title="zttap300" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0"/>
|
||||||
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||||
<ROW File="certutil.exe" Component_="certutil.exe" FileName="certutil.exe" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\certutil.exe" SelfReg="false" NextFile="zttap300.cer" DigSign="true"/>
|
<ROW File="zttap300.inf" Component_="zttap300.inf_1" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.inf" SelfReg="false"/>
|
||||||
<ROW File="zttap300.cat" Component_="zttap300.inf_1" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.cat" SelfReg="false" NextFile="certutil.exe"/>
|
<ROW File="zttap300.sys" Component_="zttap300.inf_1" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.sys" SelfReg="false"/>
|
||||||
<ROW File="zttap300.cer" Component_="zttap300.cer" FileName="zttap300.cer" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\zttap300.cer" SelfReg="false" NextFile="zttap300.cer_1"/>
|
<ROW File="zttap300.cat" Component_="zttap300.inf_1" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.cat" SelfReg="false"/>
|
||||||
|
<ROW File="certutil.exe" Component_="certutil.exe" FileName="certutil.exe" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\certutil.exe" SelfReg="false" DigSign="true"/>
|
||||||
|
<ROW File="zttap300.cer" Component_="zttap300.cer" FileName="zttap300.cer" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\zttap300.cer" SelfReg="false"/>
|
||||||
<ROW File="zttap300.cer_1" Component_="zttap300.cer_1" FileName="zttap300.cer" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\zttap300.cer" SelfReg="false"/>
|
<ROW File="zttap300.cer_1" Component_="zttap300.cer_1" FileName="zttap300.cer" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\zttap300.cer" SelfReg="false"/>
|
||||||
<ROW File="zttap300.inf" Component_="zttap300.inf_1" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.inf" SelfReg="false" NextFile="zttap300.sys"/>
|
|
||||||
<ROW File="zttap300.sys" Component_="zttap300.inf_1" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.sys" SelfReg="false" NextFile="zttap300.cat"/>
|
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.custcomp.AiInstallExecuteSequenceAliasComponent">
|
<COMPONENT cid="caphyon.advinst.custcomp.AiInstallExecuteSequenceAliasComponent">
|
||||||
<ROW AliasRowId="certutil.exe" AliasRowOperation="2" Sequence="4001"/>
|
<ROW AliasRowId="certutil.exe" AliasRowOperation="2" Sequence="4001"/>
|
||||||
|
@ -76,7 +70,7 @@
|
||||||
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
||||||
<ROW TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="[|ProductName]" SignOptions="7" SignTool="0" UseSha256="1" Thumbprint="7f01c3746df9e6c8235ea2ae38d3cdfeb185728b Subject: ZeroTier, Inc. Issuer: DigiCert EV Code Signing CA (SHA2) Valid from 11/30/2016 to 12/05/2019"/>
|
<ROW TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="[|ProductName]" SignOptions="7" SignTool="5" UseSha256="1" KVTenantId="5300bf3b-0eff-4a5f-a63f-821e22ed1730" KVAppId="5f94d77e-b795-41fd-afe7-ec913b03c1d3" KVName="ZeroTier-CS" KVCertName="ZT-EV-CS" KVCertVersion="442c2d6f77874ff99eed4b36f5cb401c"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
|
||||||
<ROW Fragment="CommonUI.aip" Path="<AI_FRAGS>CommonUI.aip"/>
|
<ROW Fragment="CommonUI.aip" Path="<AI_FRAGS>CommonUI.aip"/>
|
||||||
|
@ -122,6 +116,9 @@
|
||||||
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
|
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
|
||||||
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/>
|
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
|
||||||
|
<ROW Directory_="APPDIR" Component_="APPDIR" ManualDelete="true"/>
|
||||||
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
||||||
<ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH_ORIGINAL" Target="[AI_SETUPEXEPATH]"/>
|
<ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH_ORIGINAL" Target="[AI_SETUPEXEPATH]"/>
|
||||||
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
|
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
|
||||||
|
@ -142,6 +139,14 @@
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiDriverPackagesComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiDriverPackagesComponent">
|
||||||
<ROW InfFileName="zttap300.inf" Flags="15"/>
|
<ROW InfFileName="zttap300.inf" Flags="15"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatCompsComponent">
|
||||||
|
<ROW Feature_="MainFeature" Component_="ProductInformation"/>
|
||||||
|
<ROW Feature_="MainFeature" Component_="certutil.exe"/>
|
||||||
|
<ROW Feature_="MainFeature" Component_="zttap300.cer"/>
|
||||||
|
<ROW Feature_="MainFeature" Component_="zttap300.cer_1"/>
|
||||||
|
<ROW Feature_="zttap300" Component_="zttap300.inf_1"/>
|
||||||
|
<ROW Feature_="MainFeature" Component_="APPDIR"/>
|
||||||
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
||||||
<ROW Name="ZeroTierIcon.exe" SourcePath="..\..\..\artwork\ZeroTierIcon.ico" Index="0"/>
|
<ROW Name="ZeroTierIcon.exe" SourcePath="..\..\..\artwork\ZeroTierIcon.ico" Index="0"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
@ -150,7 +155,7 @@
|
||||||
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
||||||
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/>
|
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/>
|
||||||
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/>
|
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/>
|
||||||
<ROW Action="AI_ResolveKnownFolders" Sequence="53"/>
|
<ROW Action="AI_ResolveKnownFolders" Sequence="54"/>
|
||||||
<ROW Action="AI_EnableDebugLog" Sequence="51"/>
|
<ROW Action="AI_EnableDebugLog" Sequence="51"/>
|
||||||
<ROW Action="certutil.exe" Condition="( NOT Installed )" Sequence="6401"/>
|
<ROW Action="certutil.exe" Condition="( NOT Installed )" Sequence="6401"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
@ -163,11 +168,9 @@
|
||||||
<ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Condition="AI_SETUPEXEPATH_ORIGINAL" Sequence="101"/>
|
<ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Condition="AI_SETUPEXEPATH_ORIGINAL" Sequence="101"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
||||||
<ROW Condition="( Version9X OR ( NOT VersionNT64 ) OR ( VersionNT64 AND ((VersionNT64 <> 502) OR (ServicePackLevel <> 2) OR (MsiNTProductType <> 1)) AND ((VersionNT64 <> 502) OR (ServicePackLevel <> 2) OR (MsiNTProductType = 1)) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT64Display]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT64" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="((VersionNT <> 501) AND (VersionNT <> 502))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="( Version9X OR VersionNT64 OR ( VersionNT AND ((VersionNT <> 501) OR (ServicePackLevel <> 3)) AND ((VersionNT <> 502) OR (ServicePackLevel <> 2)) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNTDisplay]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT" IsPredefined="true" Builds="DefaultBuild"/>
|
|
||||||
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT40Display]" DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT40Display]" DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="(VersionNT <> 500)" Description="[ProductName] cannot be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="(VersionNT <> 500)" Description="[ProductName] cannot be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="(VersionNT64 OR ((VersionNT <> 501) OR (ServicePackLevel = 3))) AND ((VersionNT <> 502) OR (ServicePackLevel = 2))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild"/>
|
|
||||||
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]." DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]." DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<DOCUMENT Type="Advanced Installer" CreateVersion="10.9" version="14.5.2" Modules="enterprise" RootPath="." Language="en" Id="{DC564647-6BF0-4550-87F4-89C938D0159C}">
|
<DOCUMENT Type="Advanced Installer" CreateVersion="10.9" version="17.6" Modules="enterprise" RootPath="." Language="en" Id="{DC564647-6BF0-4550-87F4-89C938D0159C}">
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
|
|
||||||
<ROW Name="HiddenItems" Value="UpdaterComponent;SerValComponent;AutorunComponent;MultipleInstancesComponent;AppXProductDetailsComponent;AppXDependenciesComponent;AppXAppDetailsComponent;AppXVisualAssetsComponent;AppXCapabilitiesComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent;MsiJavaComponent;MsiRegsComponent;MsiExtComponent;MsiAssemblyComponent;AnalyticsComponent;ActSyncAppComponent;MsiMergeModsComponent;MsiThemeComponent;BackgroundImagesComponent;DictionaryComponent;ScheduledTasksComponent;CPLAppletComponent;GameUxComponent;UserAccountsComponent;MsiClassComponent;WebApplicationsComponent;MsiOdbcDataSrcComponent;SqlConnectionComponent;SharePointSlnComponent;SilverlightSlnComponent"/>
|
|
||||||
</COMPONENT>
|
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
|
||||||
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
|
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
|
||||||
<ROW Property="AI_EMBD_MSI_EXTR_PATH" Value="[TempFolder]" ValueLocId="-"/>
|
<ROW Property="AI_EMBD_MSI_EXTR_PATH" Value="[TempFolder]" ValueLocId="-"/>
|
||||||
|
@ -17,6 +14,7 @@
|
||||||
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]."/>
|
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]."/>
|
||||||
<ROW Property="ARPCONTACT" Value="contact@zerotier.com"/>
|
<ROW Property="ARPCONTACT" Value="contact@zerotier.com"/>
|
||||||
<ROW Property="ARPHELPLINK" Value="https://www.zerotier.com/"/>
|
<ROW Property="ARPHELPLINK" Value="https://www.zerotier.com/"/>
|
||||||
|
<ROW Property="ARPHELPTELEPHONE" Value="949-505-9993"/>
|
||||||
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
|
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
|
||||||
<ROW Property="ARPNOREPAIR" Value="1" MultiBuildValue="ExeBuild:1"/>
|
<ROW Property="ARPNOREPAIR" Value="1" MultiBuildValue="ExeBuild:1"/>
|
||||||
<ROW Property="ARPPRODUCTICON" Value="ZeroTierIcon.exe" Type="8"/>
|
<ROW Property="ARPPRODUCTICON" Value="ZeroTierIcon.exe" Type="8"/>
|
||||||
|
@ -27,26 +25,22 @@
|
||||||
<ROW Property="CTRLS" Value="2"/>
|
<ROW Property="CTRLS" Value="2"/>
|
||||||
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
<ROW Property="MSIFASTINSTALL" MultiBuildValue="DefaultBuild:2"/>
|
||||||
<ROW Property="Manufacturer" Value="ZeroTier, Inc."/>
|
<ROW Property="Manufacturer" Value="ZeroTier, Inc."/>
|
||||||
<ROW Property="ProductCode" Value="1033:{80CEE5C9-4DF0-43F5-B232-484D6455978E} " Type="16"/>
|
<ROW Property="ProductCode" Value="1033:{692F9FF8-0AEE-4D48-96FC-BB89816AB814} " Type="16"/>
|
||||||
<ROW Property="ProductLanguage" Value="1033"/>
|
<ROW Property="ProductLanguage" Value="1033"/>
|
||||||
<ROW Property="ProductName" Value="ZeroTier One"/>
|
<ROW Property="ProductName" Value="ZeroTier One"/>
|
||||||
<ROW Property="ProductVersion" Value="1.4.6" Type="32"/>
|
<ROW Property="ProductVersion" Value="1.6.1" Type="32"/>
|
||||||
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:ReallySuppress"/>
|
||||||
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
|
<ROW Property="RUNAPPLICATION" Value="1" Type="4"/>
|
||||||
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
|
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
|
||||||
<ROW Property="UpgradeCode" Value="{B0E2A5F3-88B6-4E77-B922-CB4739B4C4C8}"/>
|
<ROW Property="UpgradeCode" Value="{B0E2A5F3-88B6-4E77-B922-CB4739B4C4C8}"/>
|
||||||
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME#ExeBuild:Windows 9x/ME" ValueLocId="-"/>
|
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME#ExeBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME#ExeBuild:Windows 9x/ME" ValueLocId="-"/>
|
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME#ExeBuild:Windows 9x/ME" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT" MultiBuildValue="DefaultBuild:Windows XP SP3 x86, Windows Server 2003 SP2 x86" ValueLocId="-"/>
|
|
||||||
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0#ExeBuild:Windows NT 4.0" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0#ExeBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0#ExeBuild:Windows NT 4.0" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0#ExeBuild:Windows NT 4.0" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000#ExeBuild:Windows 2000" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000#ExeBuild:Windows 2000" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000#ExeBuild:Windows 2000" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000#ExeBuild:Windows 2000" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86#ExeBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003#ExeBuild:Windows XP/2003" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86#ExeBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86" ValueLocId="-"/>
|
<ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003#ExeBuild:Windows XP/2003" ValueLocId="-"/>
|
||||||
<ROW Property="WindowsTypeNT64" MultiBuildValue="DefaultBuild:Windows XP SP2 x64, Windows Server 2003 SP2 x64" ValueLocId="-"/>
|
|
||||||
<ROW Property="WindowsTypeNT64Display" MultiBuildValue="DefaultBuild:Windows XP SP2 x64, Windows Server 2003 SP2 x64" ValueLocId="-"/>
|
|
||||||
<ROW Property="WindowsTypeNTDisplay" MultiBuildValue="DefaultBuild:Windows XP SP3 x86, Windows Server 2003 SP2 x86" ValueLocId="-"/>
|
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
|
||||||
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1" DirectoryOptions="2"/>
|
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1" DirectoryOptions="2"/>
|
||||||
|
@ -61,47 +55,58 @@
|
||||||
<ROW Directory="regid.201001.com.zerotier_Dir" Directory_Parent="CommonAppDataFolder" DefaultDir="REGID2~1.ZER|regid.2010-01.com.zerotier"/>
|
<ROW Directory="regid.201001.com.zerotier_Dir" Directory_Parent="CommonAppDataFolder" DefaultDir="REGID2~1.ZER|regid.2010-01.com.zerotier"/>
|
||||||
<ROW Directory="tapwindows_Dir" Directory_Parent="One_Dir" DefaultDir="TAP-WI~1|tap-windows"/>
|
<ROW Directory="tapwindows_Dir" Directory_Parent="One_Dir" DefaultDir="TAP-WI~1|tap-windows"/>
|
||||||
<ROW Directory="x64_Dir" Directory_Parent="tapwindows_Dir" DefaultDir="x64"/>
|
<ROW Directory="x64_Dir" Directory_Parent="tapwindows_Dir" DefaultDir="x64"/>
|
||||||
|
<ROW Directory="x64_pre_win10_Dir" Directory_Parent="x64_Dir" DefaultDir=".:X64_PR~1|x64_pre_win10"/>
|
||||||
<ROW Directory="x86_Dir" Directory_Parent="tapwindows_Dir" DefaultDir="x86"/>
|
<ROW Directory="x86_Dir" Directory_Parent="tapwindows_Dir" DefaultDir="x86"/>
|
||||||
|
<ROW Directory="x86_pre_win10_Dir" Directory_Parent="x86_Dir" DefaultDir=".:X86_PR~1|x86_pre_win10"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
|
||||||
<ROW Component="AI_CustomARPName" ComponentId="{717E3B00-472C-4E07-BC45-AF83F5442898}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
|
<ROW Component="AI_CustomARPName" ComponentId="{C7D2938D-A253-4683-A71B-B2052C5BD60F}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayName" Options="1"/>
|
||||||
<ROW Component="AI_DisableModify" ComponentId="{020DCABD-5D56-49B9-AF48-F07F0B55E590}" Directory_="APPDIR" Attributes="4" KeyPath="NoModify" Options="1"/>
|
<ROW Component="AI_DisableModify" ComponentId="{020DCABD-5D56-49B9-AF48-F07F0B55E590}" Directory_="APPDIR" Attributes="4" KeyPath="NoModify" Options="1"/>
|
||||||
<ROW Component="AI_ExePath" ComponentId="{8E02B36C-7A19-429B-A93E-77A9261AC918}" Directory_="APPDIR" Attributes="4" KeyPath="AI_ExePath"/>
|
<ROW Component="AI_ExePath" ComponentId="{8E02B36C-7A19-429B-A93E-77A9261AC918}" Directory_="APPDIR" Attributes="4" KeyPath="AI_ExePath"/>
|
||||||
|
<ROW Component="APPDIR" ComponentId="{4DD7907D-D7FE-4CD6-B1A0-B5C1625F5133}" Directory_="APPDIR" Attributes="0"/>
|
||||||
<ROW Component="Hardcodet.Wpf.TaskbarNotification.dll" ComponentId="{BEA825AF-2555-44AF-BE40-47FFC16DCBA6}" Directory_="APPDIR" Attributes="0" KeyPath="Hardcodet.Wpf.TaskbarNotification.dll"/>
|
<ROW Component="Hardcodet.Wpf.TaskbarNotification.dll" ComponentId="{BEA825AF-2555-44AF-BE40-47FFC16DCBA6}" Directory_="APPDIR" Attributes="0" KeyPath="Hardcodet.Wpf.TaskbarNotification.dll"/>
|
||||||
<ROW Component="Newtonsoft.Json.dll" ComponentId="{0B2F229D-5425-42FB-9E28-F6D25AB2B4B5}" Directory_="APPDIR" Attributes="0" KeyPath="Newtonsoft.Json.dll"/>
|
<ROW Component="Newtonsoft.Json.dll" ComponentId="{0B2F229D-5425-42FB-9E28-F6D25AB2B4B5}" Directory_="APPDIR" Attributes="0" KeyPath="Newtonsoft.Json.dll"/>
|
||||||
<ROW Component="ProductInformation" ComponentId="{DB078D04-EA8E-4A7C-9001-89BAD932F9D9}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
<ROW Component="ProductInformation" ComponentId="{DB078D04-EA8E-4A7C-9001-89BAD932F9D9}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
|
||||||
|
<ROW Component="UI_fonts" ComponentId="{9F415308-A118-419F-AD8A-678DEA856B78}" Directory_="FontsFolder" Attributes="144" Type="0"/>
|
||||||
<ROW Component="ZeroTierOne.exe" ComponentId="{18B51525-77BF-4FD9-9C18-A10D4CFC25BA}" Directory_="APPDIR" Attributes="0" KeyPath="ZeroTierOne.exe"/>
|
<ROW Component="ZeroTierOne.exe" ComponentId="{18B51525-77BF-4FD9-9C18-A10D4CFC25BA}" Directory_="APPDIR" Attributes="0" KeyPath="ZeroTierOne.exe"/>
|
||||||
<ROW Component="copyutil.exe" ComponentId="{9B9E89FB-81CB-4500-978B-11E2FA81B5B4}" Directory_="APPDIR" Attributes="0" KeyPath="copyutil.exe"/>
|
<ROW Component="copyutil.exe" ComponentId="{9B9E89FB-81CB-4500-978B-11E2FA81B5B4}" Directory_="APPDIR" Attributes="0" KeyPath="copyutil.exe"/>
|
||||||
<ROW Component="networks.d" ComponentId="{EF54D0DF-889F-41DC-AF5C-4E7F96AB1C8B}" Directory_="networks.d_Dir" Attributes="0"/>
|
<ROW Component="networks.d" ComponentId="{EF54D0DF-889F-41DC-AF5C-4E7F96AB1C8B}" Directory_="networks.d_Dir" Attributes="0"/>
|
||||||
<ROW Component="regid.201001.com.zerotier" ComponentId="{A39C80FC-6A8F-454F-9052-10DAC3C3B139}" Directory_="regid.201001.com.zerotier_Dir" Attributes="0"/>
|
<ROW Component="regid.201001.com.zerotier" ComponentId="{A39C80FC-6A8F-454F-9052-10DAC3C3B139}" Directory_="regid.201001.com.zerotier_Dir" Attributes="0"/>
|
||||||
<ROW Component="segoeui.ttf" ComponentId="{9F415308-A118-419F-AD8A-678DEA856B78}" Directory_="FontsFolder" Attributes="144" Type="0"/>
|
|
||||||
<ROW Component="zerotierone_x64.exe" ComponentId="{DFCFB72D-B055-4E60-B6D8-81FF585C2183}" Directory_="One_Dir" Attributes="256" Condition="VersionNT64" KeyPath="zerotierone_x64.exe"/>
|
<ROW Component="zerotierone_x64.exe" ComponentId="{DFCFB72D-B055-4E60-B6D8-81FF585C2183}" Directory_="One_Dir" Attributes="256" Condition="VersionNT64" KeyPath="zerotierone_x64.exe"/>
|
||||||
<ROW Component="zerotierone_x86.exe" ComponentId="{5D2F3366-4FE1-40A4-A81A-66C49FA11F1C}" Directory_="One_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="zerotierone_x86.exe"/>
|
<ROW Component="zerotierone_x86.exe" ComponentId="{5D2F3366-4FE1-40A4-A81A-66C49FA11F1C}" Directory_="One_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="zerotierone_x86.exe"/>
|
||||||
<ROW Component="zttap300.cat_1" ComponentId="{9F913E48-095B-4EA3-98DA-EDAB1593F3E3}" Directory_="x86_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="zttap300.cat_3" Type="0"/>
|
<ROW Component="zttap300_x64_pre_win10" ComponentId="{B520DF93-641A-4450-8960-397880EF7432}" Directory_="x64_pre_win10_Dir" Attributes="256" Condition="VersionNT64 AND VersionNT < 1000" KeyPath="zttap300.cat"/>
|
||||||
<ROW Component="zttap300.inf" ComponentId="{D4839F5E-FB94-41CB-9B1B-177A97ADC904}" Directory_="x64_Dir" Attributes="256" Condition="VersionNT64" KeyPath="zttap300.inf"/>
|
<ROW Component="zttap300_x64_win10" ComponentId="{D4839F5E-FB94-41CB-9B1B-177A97ADC904}" Directory_="x64_Dir" Attributes="256" Condition="VersionNT64 AND VersionNT >= 1000" KeyPath="zttap300.inf"/>
|
||||||
|
<ROW Component="zttap300_x86_pre_win10" ComponentId="{144AC4E8-C08C-4132-A90E-234EEB3BC1DF}" Directory_="x86_pre_win10_Dir" Attributes="0" Condition="(NOT VersionNT64) And VersionNT < 1000" KeyPath="zttap300.cat_1" Type="0"/>
|
||||||
|
<ROW Component="zttap300_x86_win10" ComponentId="{9F913E48-095B-4EA3-98DA-EDAB1593F3E3}" Directory_="x86_Dir" Attributes="0" Condition="(NOT VersionNT64) And VersionNT >= 1000" KeyPath="zttap300.cat_3" Type="0"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
|
||||||
<ROW Feature="ZeroTierOne" Title="MainFeature" Description="ZeroTier One" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="AI_CustomARPName AI_DisableModify AI_ExePath Hardcodet.Wpf.TaskbarNotification.dll Newtonsoft.Json.dll ProductInformation ZeroTierOne.exe copyutil.exe networks.d regid.201001.com.zerotier segoeui.ttf zerotierone_x64.exe zerotierone_x86.exe zttap300.cat_1"/>
|
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0"/>
|
||||||
<ROW Feature="zttap300" Feature_Parent="ZeroTierOne" Title="zttap300" Description="ZeroTier Virtual Network Port Driver" Display="1" Level="1" Directory_="APPDIR" Attributes="16" Components="zttap300.inf"/>
|
<ROW Feature="ZeroTierOne" Title="MainFeature" Description="ZeroTier One" Display="1" Level="1" Directory_="APPDIR" Attributes="0"/>
|
||||||
<ATTRIBUTE name="CurrentFeature" value="ZeroTierOne"/>
|
<ATTRIBUTE name="CurrentFeature" value="ZeroTierOne"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
|
||||||
<ROW File="Hardcodet.Wpf.TaskbarNotification.dll" Component_="Hardcodet.Wpf.TaskbarNotification.dll" FileName="HARDCO~1.DLL|Hardcodet.Wpf.TaskbarNotification.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\WinUI\bin\Release\Hardcodet.Wpf.TaskbarNotification.dll" SelfReg="false" NextFile="segoeui.ttf" DigSign="true"/>
|
<ROW File="zerotierone_x86.exe" Component_="zerotierone_x86.exe" FileName="ZEROTI~1.EXE|zerotier-one_x86.exe" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\Build\Win32\Release\zerotier-one_x86.exe" SelfReg="false" DigSign="true"/>
|
||||||
<ROW File="Newtonsoft.Json.dll" Component_="Newtonsoft.Json.dll" FileName="NEWTON~1.DLL|Newtonsoft.Json.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\WinUI\bin\Release\Newtonsoft.Json.dll" SelfReg="false" NextFile="copyutil.exe" DigSign="true"/>
|
<ROW File="zerotierone_x64.exe" Component_="zerotierone_x64.exe" FileName="ZEROTI~2.EXE|zerotier-one_x64.exe" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\Build\x64\Release\zerotier-one_x64.exe" SelfReg="false" DigSign="true"/>
|
||||||
<ROW File="ZeroTierOne.exe" Component_="ZeroTierOne.exe" FileName="ZEROTI~1.EXE|ZeroTier One.exe" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\WinUI\bin\Release\ZeroTier One.exe" SelfReg="false" NextFile="zttap300.cat_2" DigSign="true"/>
|
<ROW File="ZeroTierOne.exe" Component_="ZeroTierOne.exe" FileName="ZEROTI~1.EXE|ZeroTier One.exe" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\WinUI\bin\Release\ZeroTier One.exe" SelfReg="false" DigSign="true"/>
|
||||||
<ROW File="copyutil.exe" Component_="copyutil.exe" FileName="copyutil.exe" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\copyutil\bin\Release\copyutil.exe" SelfReg="false" NextFile="Hardcodet.Wpf.TaskbarNotification.dll" DigSign="true"/>
|
<ROW File="zttap300.cat_2" Component_="zttap300_x64_win10" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.cat" SelfReg="false"/>
|
||||||
<ROW File="segoeui.ttf" Component_="segoeui.ttf" FileName="segoeui.ttf" Attributes="0" SourcePath="..\..\..\windows\WinUI\Fonts\segoeui.ttf" SelfReg="false" NextFile="segoeuib.ttf"/>
|
<ROW File="zttap300.sys_2" Component_="zttap300_x64_win10" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.sys" SelfReg="false"/>
|
||||||
<ROW File="segoeuib.ttf" Component_="segoeui.ttf" FileName="segoeuib.ttf" Attributes="0" SourcePath="..\..\..\windows\WinUI\Fonts\segoeuib.ttf" SelfReg="false" NextFile="segoeuii.ttf"/>
|
<ROW File="zttap300.inf" Component_="zttap300_x64_win10" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.inf" SelfReg="false"/>
|
||||||
<ROW File="segoeuii.ttf" Component_="segoeui.ttf" FileName="segoeuii.ttf" Attributes="0" SourcePath="..\..\..\windows\WinUI\Fonts\segoeuii.ttf" SelfReg="false" NextFile="segoeuiz.ttf"/>
|
<ROW File="zttap300.cat_3" Component_="zttap300_x86_win10" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.cat" SelfReg="false"/>
|
||||||
<ROW File="segoeuiz.ttf" Component_="segoeui.ttf" FileName="segoeuiz.ttf" Attributes="0" SourcePath="..\..\..\windows\WinUI\Fonts\segoeuiz.ttf" SelfReg="false"/>
|
<ROW File="zttap300.sys_3" Component_="zttap300_x86_win10" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.sys" SelfReg="false"/>
|
||||||
<ROW File="zerotierone_x64.exe" Component_="zerotierone_x64.exe" FileName="ZEROTI~2.EXE|zerotier-one_x64.exe" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\Build\x64\Release\zerotier-one_x64.exe" SelfReg="false" NextFile="ZeroTierOne.exe" DigSign="true"/>
|
<ROW File="zttap300.inf_1" Component_="zttap300_x86_win10" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.inf" SelfReg="false"/>
|
||||||
<ROW File="zerotierone_x86.exe" Component_="zerotierone_x86.exe" FileName="ZEROTI~1.EXE|zerotier-one_x86.exe" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\Build\Win32\Release\zerotier-one_x86.exe" SelfReg="false" NextFile="zerotierone_x64.exe" DigSign="true"/>
|
<ROW File="Newtonsoft.Json.dll" Component_="Newtonsoft.Json.dll" FileName="NEWTON~1.DLL|Newtonsoft.Json.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\WinUI\bin\Release\Newtonsoft.Json.dll" SelfReg="false" DigSign="true"/>
|
||||||
<ROW File="zttap300.cat_2" Component_="zttap300.inf" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.cat" SelfReg="false" NextFile="zttap300.sys_2"/>
|
<ROW File="copyutil.exe" Component_="copyutil.exe" FileName="copyutil.exe" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\copyutil\bin\Release\copyutil.exe" SelfReg="false" DigSign="true"/>
|
||||||
<ROW File="zttap300.cat_3" Component_="zttap300.cat_1" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.cat" SelfReg="false" NextFile="zttap300.sys_3"/>
|
<ROW File="Hardcodet.Wpf.TaskbarNotification.dll" Component_="Hardcodet.Wpf.TaskbarNotification.dll" FileName="HARDCO~1.DLL|Hardcodet.Wpf.TaskbarNotification.dll" Version="65535.65535.65535.65535" Attributes="0" SourcePath="..\..\..\windows\WinUI\bin\Release\Hardcodet.Wpf.TaskbarNotification.dll" SelfReg="false" DigSign="true"/>
|
||||||
<ROW File="zttap300.inf" Component_="zttap300.inf" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.inf" SelfReg="false" NextFile="zttap300.cat_3"/>
|
<ROW File="segoeui.ttf" Component_="UI_fonts" FileName="segoeui.ttf" Attributes="0" SourcePath="..\..\..\windows\WinUI\Fonts\segoeui.ttf" SelfReg="false"/>
|
||||||
<ROW File="zttap300.inf_1" Component_="zttap300.cat_1" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.inf" SelfReg="false" NextFile="Newtonsoft.Json.dll"/>
|
<ROW File="segoeuib.ttf" Component_="UI_fonts" FileName="segoeuib.ttf" Attributes="0" SourcePath="..\..\..\windows\WinUI\Fonts\segoeuib.ttf" SelfReg="false"/>
|
||||||
<ROW File="zttap300.sys_2" Component_="zttap300.inf" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64\zttap300.sys" SelfReg="false" NextFile="zttap300.inf"/>
|
<ROW File="segoeuii.ttf" Component_="UI_fonts" FileName="segoeuii.ttf" Attributes="0" SourcePath="..\..\..\windows\WinUI\Fonts\segoeuii.ttf" SelfReg="false"/>
|
||||||
<ROW File="zttap300.sys_3" Component_="zttap300.cat_1" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86\zttap300.sys" SelfReg="false" NextFile="zttap300.inf_1"/>
|
<ROW File="segoeuiz.ttf" Component_="UI_fonts" FileName="segoeuiz.ttf" Attributes="0" SourcePath="..\..\..\windows\WinUI\Fonts\segoeuiz.ttf" SelfReg="false"/>
|
||||||
|
<ROW File="zttap300.cat" Component_="zttap300_x64_pre_win10" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64.old\zttap300.cat" SelfReg="false"/>
|
||||||
|
<ROW File="zttap300.inf_2" Component_="zttap300_x64_pre_win10" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64.old\zttap300.inf" SelfReg="false"/>
|
||||||
|
<ROW File="zttap300.sys" Component_="zttap300_x64_pre_win10" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x64.old\zttap300.sys" SelfReg="false"/>
|
||||||
|
<ROW File="zttap300.cat_1" Component_="zttap300_x86_pre_win10" FileName="zttap300.cat" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86.old\zttap300.cat" SelfReg="false"/>
|
||||||
|
<ROW File="zttap300.inf_3" Component_="zttap300_x86_pre_win10" FileName="zttap300.inf" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86.old\zttap300.inf" SelfReg="false"/>
|
||||||
|
<ROW File="zttap300.sys_1" Component_="zttap300_x86_pre_win10" FileName="zttap300.sys" Attributes="0" SourcePath="..\..\bin\tap-windows-ndis6\x86.old\zttap300.sys" SelfReg="false"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.AiPersistentDataComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.AiPersistentDataComponent">
|
||||||
<ROW PersistentRow="segoeui.ttf" Type="0" Condition="1"/>
|
<ROW PersistentRow="segoeui.ttf" Type="0" Condition="1"/>
|
||||||
|
@ -123,19 +128,23 @@
|
||||||
<ATTRIBUTE name="Enable" value="false"/>
|
<ATTRIBUTE name="Enable" value="false"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.ChainedPackageComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.ChainedPackageComponent">
|
||||||
<ROW ChainedPackage="ZeroTierOne_NDIS6_x64.msi" Order="1" Options="110" InstallCondition="(NOT Installed) AND VersionNT64" MaintenanceCondition="FALSE" RemoveCondition="REMOVE="ALL" AND VersionNT64"/>
|
<ROW ChainedPackage="ZeroTierOne_NDIS6_x64.msi" Order="1" Options="110" InstallCondition="VersionNT64 AND VersionNT >= 1000" MaintenanceCondition="FALSE" RemoveCondition="REMOVE="ALL" AND VersionNT64"/>
|
||||||
<ROW ChainedPackage="ZeroTierOne_NDIS6_x86.msi" Order="2" Options="110" InstallCondition="(NOT Installed) AND (NOT VersionNT64)" MaintenanceCondition="FALSE" RemoveCondition="REMOVE="ALL" AND (NOT VersionNT64)"/>
|
<ROW ChainedPackage="ZeroTierOne_NDIS6_x64.msi_1" Order="3" Options="110" InstallCondition="VersionNT64 AND VersionNT < 1000" MaintenanceCondition="FALSE" RemoveCondition="REMOVE="ALL" AND VersionNT64"/>
|
||||||
|
<ROW ChainedPackage="ZeroTierOne_NDIS6_x86.msi" Order="2" Options="110" InstallCondition="(NOT VersionNT64) And VersionNT >= 1000" MaintenanceCondition="FALSE" RemoveCondition="REMOVE="ALL" AND (NOT VersionNT64)"/>
|
||||||
|
<ROW ChainedPackage="ZeroTierOne_NDIS6_x86.msi_1" Order="4" Options="110" InstallCondition="(NOT VersionNT64) And VersionNT < 1000" MaintenanceCondition="FALSE" RemoveCondition="REMOVE="ALL" AND (NOT VersionNT64)"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.ChainedPackageFileComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.ChainedPackageFileComponent">
|
||||||
<ROW FileId="ZeroTierOne_NDIS6_x64.msi" ChainedPackage="ZeroTierOne_NDIS6_x64.msi" Options="1" TargetPath="ZeroTierOne_NDIS6_x64.msi" Content="..\..\bin\tap-windows-ndis6\x64\ZeroTierOne_NDIS6_x64.msi"/>
|
<ROW FileId="ZeroTierOne_NDIS6_x64.msi" ChainedPackage="ZeroTierOne_NDIS6_x64.msi" Options="1" TargetPath="ZeroTierOne_NDIS6_x64.msi" Content="..\..\bin\tap-windows-ndis6\x64\ZeroTierOne_NDIS6_x64.msi"/>
|
||||||
|
<ROW FileId="ZeroTierOne_NDIS6_x64.msi_1" ChainedPackage="ZeroTierOne_NDIS6_x64.msi_1" Options="1" TargetPath="ZeroTierOne_NDIS6_x64.msi" Content="..\..\bin\tap-windows-ndis6\x64.old\ZeroTierOne_NDIS6_x64.msi"/>
|
||||||
<ROW FileId="ZeroTierOne_NDIS6_x86.msi" ChainedPackage="ZeroTierOne_NDIS6_x86.msi" Options="1" TargetPath="ZeroTierOne_NDIS6_x86.msi" Content="..\..\bin\tap-windows-ndis6\x86\ZeroTierOne_NDIS6_x86.msi"/>
|
<ROW FileId="ZeroTierOne_NDIS6_x86.msi" ChainedPackage="ZeroTierOne_NDIS6_x86.msi" Options="1" TargetPath="ZeroTierOne_NDIS6_x86.msi" Content="..\..\bin\tap-windows-ndis6\x86\ZeroTierOne_NDIS6_x86.msi"/>
|
||||||
|
<ROW FileId="ZeroTierOne_NDIS6_x86.msi_1" ChainedPackage="ZeroTierOne_NDIS6_x86.msi_1" Options="1" TargetPath="ZeroTierOne_NDIS6_x86.msi" Content="..\..\bin\tap-windows-ndis6\x86.old\ZeroTierOne_NDIS6_x86.msi"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
|
||||||
<ROW Path="<AI_DICTS>ui.ail"/>
|
<ROW Path="<AI_DICTS>ui.ail"/>
|
||||||
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
<ROW Path="<AI_DICTS>ui_en.ail"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
|
||||||
<ROW TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="ZeroTier One" DescriptionUrl="https://www.zerotier.com/" SignOptions="7" SignTool="0" UseSha256="1" Thumbprint="7f01c3746df9e6c8235ea2ae38d3cdfeb185728b Subject: ZeroTier, Inc. Issuer: DigiCert EV Code Signing CA (SHA2) Valid from 11/30/2016 to 12/05/2019"/>
|
<ROW TimeStampUrl="http://timestamp.verisign.com/scripts/timstamp.dll" SignerDescription="ZeroTier One" DescriptionUrl="https://www.zerotier.com/" SignOptions="7" SignTool="5" UseSha256="1" KVTenantId="5300bf3b-0eff-4a5f-a63f-821e22ed1730" KVAppId="5f94d77e-b795-41fd-afe7-ec913b03c1d3" KVName="ZeroTier-CS" KVCertName="ZT-EV-CS" KVCertVersion="442c2d6f77874ff99eed4b36f5cb401c"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.FirewallExceptionComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.FirewallExceptionComponent">
|
||||||
<ROW FirewallException="ZeroTierOneControl" DisplayName="ZeroTier One TCP/9993" GroupName="ZeroTierOne" Enabled="1" Scope="*" Condition="1" Profiles="7" Port="9993" Protocol="TCP"/>
|
<ROW FirewallException="ZeroTierOneControl" DisplayName="ZeroTier One TCP/9993" GroupName="ZeroTierOne" Enabled="1" Scope="*" Condition="1" Profiles="7" Port="9993" Protocol="TCP"/>
|
||||||
|
@ -199,9 +208,6 @@
|
||||||
<ROW Name="msichainer.exe" SourcePath="<AI_CUSTACTS>msichainer.exe"/>
|
<ROW Name="msichainer.exe" SourcePath="<AI_CUSTACTS>msichainer.exe"/>
|
||||||
<ROW Name="xmlCfg.dll" SourcePath="<AI_CUSTACTS>xmlCfg.dll"/>
|
<ROW Name="xmlCfg.dll" SourcePath="<AI_CUSTACTS>xmlCfg.dll"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiConditionComponent">
|
|
||||||
<ROW Feature_="zttap300" Level="0" Condition="((VersionNT < 500) OR (NOT VersionNT))"/>
|
|
||||||
</COMPONENT>
|
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlComponent">
|
||||||
<ROW Dialog_="WelcomeDlg" Control="WelcomeDlgDialogInitializer" Type="DialogInitializer" X="0" Y="0" Width="0" Height="0" Attributes="0" Order="-1" TextLocId="-" HelpLocId="-" ExtDataLocId="-"/>
|
<ROW Dialog_="WelcomeDlg" Control="WelcomeDlgDialogInitializer" Type="DialogInitializer" X="0" Y="0" Width="0" Height="0" Attributes="0" Order="-1" TextLocId="-" HelpLocId="-" ExtDataLocId="-"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
@ -239,6 +245,7 @@
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
|
||||||
<ROW Directory_="networks.d_Dir" Component_="networks.d" ManualDelete="false"/>
|
<ROW Directory_="networks.d_Dir" Component_="networks.d" ManualDelete="false"/>
|
||||||
<ROW Directory_="regid.201001.com.zerotier_Dir" Component_="regid.201001.com.zerotier" ManualDelete="false"/>
|
<ROW Directory_="regid.201001.com.zerotier_Dir" Component_="regid.201001.com.zerotier" ManualDelete="false"/>
|
||||||
|
<ROW Directory_="APPDIR" Component_="APPDIR" ManualDelete="true"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
|
||||||
<ROW Action="AI_AiBackupCleanup" Type="1" Source="ResourceCleaner.dll" Target="OnAiBackupCleanup" WithoutSeq="true"/>
|
<ROW Action="AI_AiBackupCleanup" Type="1" Source="ResourceCleaner.dll" Target="OnAiBackupCleanup" WithoutSeq="true"/>
|
||||||
|
@ -254,7 +261,7 @@
|
||||||
<ROW Action="AI_DATA_SETTER_1" Type="51" Source="CustomActionData" Target="[~]"/>
|
<ROW Action="AI_DATA_SETTER_1" Type="51" Source="CustomActionData" Target="[~]"/>
|
||||||
<ROW Action="AI_DATA_SETTER_2" Type="51" Source="CustomActionData" Target="[~]"/>
|
<ROW Action="AI_DATA_SETTER_2" Type="51" Source="CustomActionData" Target="[~]"/>
|
||||||
<ROW Action="AI_DATA_SETTER_3" Type="51" Source="CustomActionData" Target="[~]"/>
|
<ROW Action="AI_DATA_SETTER_3" Type="51" Source="CustomActionData" Target="[~]"/>
|
||||||
<ROW Action="AI_DATA_SETTER_4" Type="51" Source="AI_ExtractFiles" Target="[AI_SETUPEXEPATH]"/>
|
<ROW Action="AI_DATA_SETTER_4" Type="51" Source="CustomActionData" Target="[AI_SETUPEXEPATH]"/>
|
||||||
<ROW Action="AI_DATA_SETTER_6" Type="51" Source="CustomActionData" Target="ZeroTier One.exe"/>
|
<ROW Action="AI_DATA_SETTER_6" Type="51" Source="CustomActionData" Target="ZeroTier One.exe"/>
|
||||||
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
|
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
|
||||||
<ROW Action="AI_DeleteCadLzma" Type="51" Source="AI_DeleteLzma" Target="[AI_SETUPEXEPATH]"/>
|
<ROW Action="AI_DeleteCadLzma" Type="51" Source="AI_DeleteLzma" Target="[AI_SETUPEXEPATH]"/>
|
||||||
|
@ -265,9 +272,8 @@
|
||||||
<ROW Action="AI_DoRemoveExternalUIStub" Type="3585" Source="ExternalUICleaner.dll" Target="DoRemoveExternalUIStub" WithoutSeq="true"/>
|
<ROW Action="AI_DoRemoveExternalUIStub" Type="3585" Source="ExternalUICleaner.dll" Target="DoRemoveExternalUIStub" WithoutSeq="true"/>
|
||||||
<ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/>
|
<ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/>
|
||||||
<ROW Action="AI_EnableDebugLog" Type="321" Source="aicustact.dll" Target="EnableDebugLog"/>
|
<ROW Action="AI_EnableDebugLog" Type="321" Source="aicustact.dll" Target="EnableDebugLog"/>
|
||||||
<ROW Action="AI_EstimateExtractFiles" Type="1" Source="Prereq.dll" Target="EstimateExtractFiles"/>
|
|
||||||
<ROW Action="AI_ExtractCadLzma" Type="51" Source="AI_ExtractLzma" Target="[AI_SETUPEXEPATH]"/>
|
<ROW Action="AI_ExtractCadLzma" Type="51" Source="AI_ExtractLzma" Target="[AI_SETUPEXEPATH]"/>
|
||||||
<ROW Action="AI_ExtractFiles" Type="1025" Source="Prereq.dll" Target="ExtractSourceFiles" AdditionalSeq="AI_DATA_SETTER_4"/>
|
<ROW Action="AI_ExtractFiles" Type="1" Source="Prereq.dll" Target="ExtractSourceFiles" AdditionalSeq="AI_DATA_SETTER_4"/>
|
||||||
<ROW Action="AI_ExtractLzma" Type="1025" Source="lzmaextractor.dll" Target="ExtractLZMAFiles"/>
|
<ROW Action="AI_ExtractLzma" Type="1025" Source="lzmaextractor.dll" Target="ExtractLZMAFiles"/>
|
||||||
<ROW Action="AI_FindExeLzma" Type="1" Source="lzmaextractor.dll" Target="FindEXE"/>
|
<ROW Action="AI_FindExeLzma" Type="1" Source="lzmaextractor.dll" Target="FindEXE"/>
|
||||||
<ROW Action="AI_FwConfig" Type="11265" Source="NetFirewall.dll" Target="OnFwConfig" WithoutSeq="true"/>
|
<ROW Action="AI_FwConfig" Type="11265" Source="NetFirewall.dll" Target="OnFwConfig" WithoutSeq="true"/>
|
||||||
|
@ -310,6 +316,26 @@
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiEnvComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiEnvComponent">
|
||||||
<ROW Environment="Path" Name="=-*Path" Value="[~];[APPDIR]" Component_="ZeroTierOne.exe"/>
|
<ROW Environment="Path" Name="=-*Path" Value="[~];[APPDIR]" Component_="ZeroTierOne.exe"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatCompsComponent">
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="AI_CustomARPName"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="AI_DisableModify"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="AI_ExePath"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="Hardcodet.Wpf.TaskbarNotification.dll"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="Newtonsoft.Json.dll"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="ProductInformation"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="ZeroTierOne.exe"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="copyutil.exe"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="networks.d"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="regid.201001.com.zerotier"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="UI_fonts"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="zerotierone_x64.exe"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="zerotierone_x86.exe"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="zttap300_x86_win10"/>
|
||||||
|
<ROW Feature_="MainFeature" Component_="APPDIR"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="zttap300_x64_win10"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="zttap300_x64_pre_win10"/>
|
||||||
|
<ROW Feature_="ZeroTierOne" Component_="zttap300_x86_pre_win10"/>
|
||||||
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiFontsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiFontsComponent">
|
||||||
<ROW File_="segoeui.ttf"/>
|
<ROW File_="segoeui.ttf"/>
|
||||||
<ROW File_="segoeuib.ttf"/>
|
<ROW File_="segoeuib.ttf"/>
|
||||||
|
@ -323,7 +349,7 @@
|
||||||
<ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel <> 5)" Sequence="210"/>
|
<ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel <> 5)" Sequence="210"/>
|
||||||
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
||||||
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1503"/>
|
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1503"/>
|
||||||
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/>
|
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1397"/>
|
||||||
<ROW Action="AI_ResolveKnownFolders" Sequence="52"/>
|
<ROW Action="AI_ResolveKnownFolders" Sequence="52"/>
|
||||||
<ROW Action="AI_XmlInstall" Condition="(REMOVE <> "ALL")" Sequence="5103"/>
|
<ROW Action="AI_XmlInstall" Condition="(REMOVE <> "ALL")" Sequence="5103"/>
|
||||||
<ROW Action="AI_DATA_SETTER" Condition="(REMOVE <> "ALL")" Sequence="5102"/>
|
<ROW Action="AI_DATA_SETTER" Condition="(REMOVE <> "ALL")" Sequence="5102"/>
|
||||||
|
@ -349,9 +375,6 @@
|
||||||
<ROW Action="AI_ExtractLzma" Condition="SETUPEXEDIR="" AND Installed AND (REMOVE<>"ALL") AND (AI_INSTALL_MODE<>"Remove") AND (NOT PATCH)" Sequence="1549" Builds="ExeBuild"/>
|
<ROW Action="AI_ExtractLzma" Condition="SETUPEXEDIR="" AND Installed AND (REMOVE<>"ALL") AND (AI_INSTALL_MODE<>"Remove") AND (NOT PATCH)" Sequence="1549" Builds="ExeBuild"/>
|
||||||
<ROW Action="AI_DeleteRLzma" Condition="SETUPEXEDIR="" AND Installed AND (REMOVE<>"ALL") AND (AI_INSTALL_MODE<>"Remove") AND (NOT PATCH)" Sequence="1548" Builds="ExeBuild"/>
|
<ROW Action="AI_DeleteRLzma" Condition="SETUPEXEDIR="" AND Installed AND (REMOVE<>"ALL") AND (AI_INSTALL_MODE<>"Remove") AND (NOT PATCH)" Sequence="1548" Builds="ExeBuild"/>
|
||||||
<ROW Action="AI_DeleteLzma" Condition="SETUPEXEDIR="" AND Installed AND (REMOVE<>"ALL") AND (AI_INSTALL_MODE<>"Remove") AND (NOT PATCH)" Sequence="6594" Builds="ExeBuild"/>
|
<ROW Action="AI_DeleteLzma" Condition="SETUPEXEDIR="" AND Installed AND (REMOVE<>"ALL") AND (AI_INSTALL_MODE<>"Remove") AND (NOT PATCH)" Sequence="6594" Builds="ExeBuild"/>
|
||||||
<ROW Action="AI_ExtractFiles" Sequence="3998" Builds="ExeBuild"/>
|
|
||||||
<ROW Action="AI_DATA_SETTER_4" Sequence="3997"/>
|
|
||||||
<ROW Action="AI_EstimateExtractFiles" Sequence="3999" Builds="ExeBuild"/>
|
|
||||||
<ROW Action="TerminateUI" Sequence="1602"/>
|
<ROW Action="TerminateUI" Sequence="1602"/>
|
||||||
<ROW Action="AI_DATA_SETTER_6" Sequence="1601"/>
|
<ROW Action="AI_DATA_SETTER_6" Sequence="1601"/>
|
||||||
<ROW Action="AI_AiBackupImmediate" Sequence="1401"/>
|
<ROW Action="AI_AiBackupImmediate" Sequence="1401"/>
|
||||||
|
@ -361,6 +384,8 @@
|
||||||
<ROW Action="AI_AiRestoreDeferredImpersonate" Sequence="6596"/>
|
<ROW Action="AI_AiRestoreDeferredImpersonate" Sequence="6596"/>
|
||||||
<ROW Action="AI_AppSearchEx" Sequence="101"/>
|
<ROW Action="AI_AppSearchEx" Sequence="101"/>
|
||||||
<ROW Action="AI_PrepareChainers" Condition="VersionMsi >= "4.05"" Sequence="5851"/>
|
<ROW Action="AI_PrepareChainers" Condition="VersionMsi >= "4.05"" Sequence="5851"/>
|
||||||
|
<ROW Action="AI_ExtractFiles" Sequence="1399" Builds="ExeBuild"/>
|
||||||
|
<ROW Action="AI_DATA_SETTER_4" Sequence="1398"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
|
||||||
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/>
|
||||||
|
@ -374,11 +399,9 @@
|
||||||
<ROW Action="AI_AppSearchEx" Sequence="101"/>
|
<ROW Action="AI_AppSearchEx" Sequence="101"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
||||||
<ROW Condition="( Version9X OR ( NOT VersionNT64 ) OR ( VersionNT64 AND ((VersionNT64 <> 502) OR (ServicePackLevel <> 2) OR (MsiNTProductType <> 1)) AND ((VersionNT64 <> 502) OR (ServicePackLevel <> 2) OR (MsiNTProductType = 1)) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT64Display]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT64" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="((VersionNT <> 501) AND (VersionNT <> 502))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
|
||||||
<ROW Condition="( Version9X OR VersionNT64 OR ( VersionNT AND ((VersionNT <> 501) OR (ServicePackLevel <> 3)) AND ((VersionNT <> 502) OR (ServicePackLevel <> 2)) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNTDisplay]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT" IsPredefined="true" Builds="DefaultBuild"/>
|
|
||||||
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on [WindowsTypeNT40Display]." DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
|
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on [WindowsTypeNT40Display]." DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
|
||||||
<ROW Condition="(VersionNT <> 500)" Description="[ProductName] cannot be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
|
<ROW Condition="(VersionNT <> 500)" Description="[ProductName] cannot be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
|
||||||
<ROW Condition="(VersionNT64 OR ((VersionNT <> 501) OR (ServicePackLevel = 3))) AND ((VersionNT <> 502) OR (ServicePackLevel = 2))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
|
|
||||||
<ROW Condition="AI_DETECTED_DOTNET_VERSION >= AI_REQUIRED_DOTNET_VERSION" Description="[ProductName] cannot be installed on systems with .NET Framework version lower than [AI_REQUIRED_DOTNET_DISPLAY]." DescriptionLocId="AI.LaunchCondition.DotNET" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="AI_DETECTED_DOTNET_VERSION >= AI_REQUIRED_DOTNET_VERSION" Description="[ProductName] cannot be installed on systems with .NET Framework version lower than [AI_REQUIRED_DOTNET_DISPLAY]." DescriptionLocId="AI.LaunchCondition.DotNET" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
|
<ROW Condition="Privileged" Description="[ProductName] requires administrative privileges to install." DescriptionLocId="AI.LaunchCondition.Privileged" IsPredefined="true" Builds="DefaultBuild"/>
|
||||||
<ROW Condition="SETUPEXEDIR OR (REMOVE="ALL")" Description="This package can only be run from a bootstrapper." DescriptionLocId="AI.LaunchCondition.RequireBootstrapper" IsPredefined="true" Builds="ExeBuild"/>
|
<ROW Condition="SETUPEXEDIR OR (REMOVE="ALL")" Description="This package can only be run from a bootstrapper." DescriptionLocId="AI.LaunchCondition.RequireBootstrapper" IsPredefined="true" Builds="ExeBuild"/>
|
||||||
|
@ -399,8 +422,8 @@
|
||||||
<ROW Registry="HelpTelephone" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="HelpTelephone" Value="[ARPHELPTELEPHONE]" Component_="AI_CustomARPName"/>
|
<ROW Registry="HelpTelephone" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="HelpTelephone" Value="[ARPHELPTELEPHONE]" Component_="AI_CustomARPName"/>
|
||||||
<ROW Registry="InstallLocation" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="InstallLocation" Value="[APPDIR]" Component_="AI_CustomARPName"/>
|
<ROW Registry="InstallLocation" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="InstallLocation" Value="[APPDIR]" Component_="AI_CustomARPName"/>
|
||||||
<ROW Registry="ModifyPath" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="ModifyPath" Value="[AI_UNINSTALLER] /I [ProductCode]" Component_="AI_CustomARPName"/>
|
<ROW Registry="ModifyPath" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="ModifyPath" Value="[AI_UNINSTALLER] /I [ProductCode]" Component_="AI_CustomARPName"/>
|
||||||
<ROW Registry="NoModify" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="NoModify" Value="#1" Component_="AI_DisableModify"/>
|
<ROW Registry="NoModify" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="NoModify" Value="#1" Component_="AI_DisableModify" VirtualValue="#"/>
|
||||||
<ROW Registry="NoRepair" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="NoRepair" Value="#1" Component_="AI_CustomARPName"/>
|
<ROW Registry="NoRepair" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="NoRepair" Value="#1" Component_="AI_CustomARPName" VirtualValue="#"/>
|
||||||
<ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/>
|
<ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/>
|
||||||
<ROW Registry="Publisher" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="Publisher" Value="[Manufacturer]" Component_="AI_CustomARPName"/>
|
<ROW Registry="Publisher" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="Publisher" Value="[Manufacturer]" Component_="AI_CustomARPName"/>
|
||||||
<ROW Registry="URLInfoAbout" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="URLInfoAbout" Value="[ARPURLINFOABOUT]" Component_="AI_CustomARPName"/>
|
<ROW Registry="URLInfoAbout" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="URLInfoAbout" Value="[ARPURLINFOABOUT]" Component_="AI_CustomARPName"/>
|
||||||
|
@ -408,8 +431,8 @@
|
||||||
<ROW Registry="UninstallPath" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="UninstallPath" Value="[AI_UNINSTALLER] /x [ProductCode] AI_UNINSTALLER_CTP=1" Component_="AI_CustomARPName"/>
|
<ROW Registry="UninstallPath" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="UninstallPath" Value="[AI_UNINSTALLER] /x [ProductCode] AI_UNINSTALLER_CTP=1" Component_="AI_CustomARPName"/>
|
||||||
<ROW Registry="UninstallString" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="UninstallString" Value="[AI_UNINSTALLER] /x [ProductCode] AI_UNINSTALLER_CTP=1" Component_="AI_CustomARPName"/>
|
<ROW Registry="UninstallString" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="UninstallString" Value="[AI_UNINSTALLER] /x [ProductCode] AI_UNINSTALLER_CTP=1" Component_="AI_CustomARPName"/>
|
||||||
<ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
|
<ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
|
||||||
<ROW Registry="VersionMajor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMajor" Value="#0" Component_="AI_CustomARPName"/>
|
<ROW Registry="VersionMajor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMajor" Value="#0" Component_="AI_CustomARPName" VirtualValue="#"/>
|
||||||
<ROW Registry="VersionMinor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMinor" Value="#7" Component_="AI_CustomARPName"/>
|
<ROW Registry="VersionMinor" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="VersionMinor" Value="#7" Component_="AI_CustomARPName" VirtualValue="#"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiServCtrlComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.MsiServCtrlComponent">
|
||||||
<ROW ServiceControl="zerotierone_x64.exe" Name="ZeroTierOneService" Event="163" Wait="1" Component_="zerotierone_x64.exe"/>
|
<ROW ServiceControl="zerotierone_x64.exe" Name="ZeroTierOneService" Event="163" Wait="1" Component_="zerotierone_x64.exe"/>
|
||||||
|
@ -454,28 +477,28 @@
|
||||||
<ROW XmlAttribute="xsischemaLocation" XmlElement="swidsoftware_identification_tag" Name="xsi:schemaLocation" Flags="14" Order="3" Value="http://standards.iso.org/iso/19770/-2/2008/schema.xsd software_identification_tag.xsd"/>
|
<ROW XmlAttribute="xsischemaLocation" XmlElement="swidsoftware_identification_tag" Name="xsi:schemaLocation" Flags="14" Order="3" Value="http://standards.iso.org/iso/19770/-2/2008/schema.xsd software_identification_tag.xsd"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.XmlElementComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.XmlElementComponent">
|
||||||
<ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Condition="1" Order="2" Flags="14" Text="6"/>
|
<ROW XmlElement="swidbuild" ParentElement="swidnumeric" Name="swid:build" Condition="1" Order="2" Flags="14" Text="1" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidentitlement_required_indicator" ParentElement="swidsoftware_identification_tag" Name="swid:entitlement_required_indicator" Condition="1" Order="0" Flags="14" Text="false"/>
|
<ROW XmlElement="swidentitlement_required_indicator" ParentElement="swidsoftware_identification_tag" Name="swid:entitlement_required_indicator" Condition="1" Order="0" Flags="14" Text="false" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidmajor" ParentElement="swidnumeric" Name="swid:major" Condition="1" Order="0" Flags="14" Text="1"/>
|
<ROW XmlElement="swidmajor" ParentElement="swidnumeric" Name="swid:major" Condition="1" Order="0" Flags="14" Text="1" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidminor" ParentElement="swidnumeric" Name="swid:minor" Condition="1" Order="1" Flags="14" Text="4"/>
|
<ROW XmlElement="swidminor" ParentElement="swidnumeric" Name="swid:minor" Condition="1" Order="1" Flags="14" Text="6" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidname" ParentElement="swidproduct_version" Name="swid:name" Condition="1" Order="0" Flags="14" Text="[ProductVersion]"/>
|
<ROW XmlElement="swidname" ParentElement="swidproduct_version" Name="swid:name" Condition="1" Order="0" Flags="14" Text="[ProductVersion]" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidname_1" ParentElement="swidsoftware_creator" Name="swid:name" Condition="1" Order="0" Flags="14" Text="ZeroTier, Inc."/>
|
<ROW XmlElement="swidname_1" ParentElement="swidsoftware_creator" Name="swid:name" Condition="1" Order="0" Flags="14" Text="ZeroTier, Inc." UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidname_2" ParentElement="swidsoftware_licensor" Name="swid:name" Condition="1" Order="0" Flags="14" Text="ZeroTier, Inc."/>
|
<ROW XmlElement="swidname_2" ParentElement="swidsoftware_licensor" Name="swid:name" Condition="1" Order="0" Flags="14" Text="ZeroTier, Inc." UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidname_3" ParentElement="swidtag_creator" Name="swid:name" Condition="1" Order="0" Flags="14" Text="ZeroTier, Inc."/>
|
<ROW XmlElement="swidname_3" ParentElement="swidtag_creator" Name="swid:name" Condition="1" Order="0" Flags="14" Text="ZeroTier, Inc." UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidnumeric" ParentElement="swidproduct_version" Name="swid:numeric" Condition="1" Order="1" Flags="14"/>
|
<ROW XmlElement="swidnumeric" ParentElement="swidproduct_version" Name="swid:numeric" Condition="1" Order="1" Flags="14" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidproduct_title" ParentElement="swidsoftware_identification_tag" Name="swid:product_title" Condition="1" Order="1" Flags="14" Text="[ProductName]"/>
|
<ROW XmlElement="swidproduct_title" ParentElement="swidsoftware_identification_tag" Name="swid:product_title" Condition="1" Order="1" Flags="14" Text="[ProductName]" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidproduct_version" ParentElement="swidsoftware_identification_tag" Name="swid:product_version" Condition="1" Order="2" Flags="14"/>
|
<ROW XmlElement="swidproduct_version" ParentElement="swidsoftware_identification_tag" Name="swid:product_version" Condition="1" Order="2" Flags="14" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidregid" ParentElement="swidsoftware_creator" Name="swid:regid" Condition="1" Order="1" Flags="14" Text="regid.2010-01.com.zerotier"/>
|
<ROW XmlElement="swidregid" ParentElement="swidsoftware_creator" Name="swid:regid" Condition="1" Order="1" Flags="14" Text="regid.2010-01.com.zerotier" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidregid_1" ParentElement="swidsoftware_licensor" Name="swid:regid" Condition="1" Order="1" Flags="14" Text="regid.2010-01.com.zerotier"/>
|
<ROW XmlElement="swidregid_1" ParentElement="swidsoftware_licensor" Name="swid:regid" Condition="1" Order="1" Flags="14" Text="regid.2010-01.com.zerotier" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidregid_2" ParentElement="swidtag_creator" Name="swid:regid" Condition="1" Order="1" Flags="14" Text="regid.2010-01.com.zerotier"/>
|
<ROW XmlElement="swidregid_2" ParentElement="swidtag_creator" Name="swid:regid" Condition="1" Order="1" Flags="14" Text="regid.2010-01.com.zerotier" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidreview" ParentElement="swidnumeric" Name="swid:review" Condition="1" Order="3" Flags="14" Text="0"/>
|
<ROW XmlElement="swidreview" ParentElement="swidnumeric" Name="swid:review" Condition="1" Order="3" Flags="14" Text="0" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidsoftware_creator" ParentElement="swidsoftware_identification_tag" Name="swid:software_creator" Condition="1" Order="3" Flags="14"/>
|
<ROW XmlElement="swidsoftware_creator" ParentElement="swidsoftware_identification_tag" Name="swid:software_creator" Condition="1" Order="3" Flags="14" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidsoftware_id" ParentElement="swidsoftware_identification_tag" Name="swid:software_id" Condition="1" Order="5" Flags="14"/>
|
<ROW XmlElement="swidsoftware_id" ParentElement="swidsoftware_identification_tag" Name="swid:software_id" Condition="1" Order="5" Flags="14" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidsoftware_identification_tag" Name="swid:software_identification_tag" Condition="1" Order="0" Flags="14"/>
|
<ROW XmlElement="swidsoftware_identification_tag" Name="swid:software_identification_tag" Condition="1" Order="0" Flags="14" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidsoftware_licensor" ParentElement="swidsoftware_identification_tag" Name="swid:software_licensor" Condition="1" Order="4" Flags="14"/>
|
<ROW XmlElement="swidsoftware_licensor" ParentElement="swidsoftware_identification_tag" Name="swid:software_licensor" Condition="1" Order="4" Flags="14" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidtag_creator" ParentElement="swidsoftware_identification_tag" Name="swid:tag_creator" Condition="1" Order="6" Flags="14"/>
|
<ROW XmlElement="swidtag_creator" ParentElement="swidsoftware_identification_tag" Name="swid:tag_creator" Condition="1" Order="6" Flags="14" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidtag_creator_regid" ParentElement="swidsoftware_id" Name="swid:tag_creator_regid" Condition="1" Order="1" Flags="14" Text="regid.2010-01.com.zerotier"/>
|
<ROW XmlElement="swidtag_creator_regid" ParentElement="swidsoftware_id" Name="swid:tag_creator_regid" Condition="1" Order="1" Flags="14" Text="regid.2010-01.com.zerotier" UpdateIndexInParent="0"/>
|
||||||
<ROW XmlElement="swidunique_id" ParentElement="swidsoftware_id" Name="swid:unique_id" Condition="1" Order="0" Flags="14" Text="ZeroTierOne"/>
|
<ROW XmlElement="swidunique_id" ParentElement="swidsoftware_id" Name="swid:unique_id" Condition="1" Order="0" Flags="14" Text="ZeroTierOne" UpdateIndexInParent="0"/>
|
||||||
</COMPONENT>
|
</COMPONENT>
|
||||||
<COMPONENT cid="caphyon.advinst.msicomp.XmlFileComponent">
|
<COMPONENT cid="caphyon.advinst.msicomp.XmlFileComponent">
|
||||||
<ROW XmlFile="regid.199509.com.example_ProductName.swidtag" FileName="REGID2~1.SWI|regid.2010-01.com.zerotier_ZeroTierOne.swidtag" DirProperty="APPDIR" Component="ProductInformation" RootElement="swidsoftware_identification_tag" Flags="25" Version="1.0" Encoding="UTF-8" IndentUnits="2"/>
|
<ROW XmlFile="regid.199509.com.example_ProductName.swidtag" FileName="REGID2~1.SWI|regid.2010-01.com.zerotier_ZeroTierOne.swidtag" DirProperty="APPDIR" Component="ProductInformation" RootElement="swidsoftware_identification_tag" Flags="25" Version="1.0" Encoding="UTF-8" IndentUnits="2"/>
|
||||||
|
|
Binary file not shown.
|
@ -1,396 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
|
||||||
<ProjectConfiguration Include="Win8 Debug|Win32">
|
|
||||||
<Configuration>Win8 Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Win8 Release|Win32">
|
|
||||||
<Configuration>Win8 Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Win7 Debug|Win32">
|
|
||||||
<Configuration>Win7 Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Win7 Release|Win32">
|
|
||||||
<Configuration>Win7 Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Vista Debug|Win32">
|
|
||||||
<Configuration>Vista Debug</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Vista Release|Win32">
|
|
||||||
<Configuration>Vista Release</Configuration>
|
|
||||||
<Platform>Win32</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Win8 Debug|x64">
|
|
||||||
<Configuration>Win8 Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Win8 Release|x64">
|
|
||||||
<Configuration>Win8 Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Win7 Debug|x64">
|
|
||||||
<Configuration>Win7 Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Win7 Release|x64">
|
|
||||||
<Configuration>Win7 Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Vista Debug|x64">
|
|
||||||
<Configuration>Vista Debug</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
<ProjectConfiguration Include="Vista Release|x64">
|
|
||||||
<Configuration>Vista Release</Configuration>
|
|
||||||
<Platform>x64</Platform>
|
|
||||||
</ProjectConfiguration>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>{43BA7584-D4DB-4F7C-90FC-E2B18A68A213}</ProjectGuid>
|
|
||||||
<TemplateGuid>{1bc93793-694f-48fe-9372-81e2b05556fd}</TemplateGuid>
|
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
|
||||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
|
||||||
<Configuration>Win8 Debug</Configuration>
|
|
||||||
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<RootNamespace>TapDriver6</RootNamespace>
|
|
||||||
<VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VisualStudioVersion)' == '11.0'">$(VCTargetsPath11)</VCTargetsPath>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Label="PropertySheets">
|
|
||||||
<ConfigurationType>Driver</ConfigurationType>
|
|
||||||
<DriverType>KMDF</DriverType>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'" Label="Configuration">
|
|
||||||
<TargetVersion>Windows8</TargetVersion>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'" Label="Configuration">
|
|
||||||
<TargetVersion>Windows8</TargetVersion>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'" Label="Configuration">
|
|
||||||
<TargetVersion>Windows7</TargetVersion>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'" Label="Configuration">
|
|
||||||
<TargetVersion>Windows7</TargetVersion>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'" Label="Configuration">
|
|
||||||
<TargetVersion>Vista</TargetVersion>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver8.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'" Label="Configuration">
|
|
||||||
<TargetVersion>Vista</TargetVersion>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR>
|
|
||||||
<KMDF_VERSION_MINOR>7</KMDF_VERSION_MINOR>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver8.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'" Label="Configuration">
|
|
||||||
<TargetVersion>Windows8</TargetVersion>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'" Label="Configuration">
|
|
||||||
<TargetVersion>Windows8</TargetVersion>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'" Label="Configuration">
|
|
||||||
<TargetVersion>Windows7</TargetVersion>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'" Label="Configuration">
|
|
||||||
<TargetVersion>Windows7</TargetVersion>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'" Label="Configuration">
|
|
||||||
<TargetVersion>Vista</TargetVersion>
|
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver8.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'" Label="Configuration">
|
|
||||||
<TargetVersion>Vista</TargetVersion>
|
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
|
||||||
<KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR>
|
|
||||||
<KMDF_VERSION_MINOR>7</KMDF_VERSION_MINOR>
|
|
||||||
<PlatformToolset>WindowsKernelModeDriver8.0</PlatformToolset>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
||||||
<ImportGroup Label="ExtensionSettings">
|
|
||||||
</ImportGroup>
|
|
||||||
<ImportGroup Label="PropertySheets">
|
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
||||||
</ImportGroup>
|
|
||||||
<PropertyGroup Label="UserMacros" />
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
|
|
||||||
<TargetName>zttap300</TargetName>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemDefinitionGroup>
|
|
||||||
<ClCompile>
|
|
||||||
<WppEnabled>false</WppEnabled>
|
|
||||||
<WppScanConfigurationData Condition="'%(ClCompile. ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
|
|
||||||
<WppKernelMode>false</WppKernelMode>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WppMinimalRebuildFromTracking Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">false</WppMinimalRebuildFromTracking>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">Level1</WarningLevel>
|
|
||||||
<WarningLevel Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">Level1</WarningLevel>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">Default</CompileAs>
|
|
||||||
<CompileAs Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">Default</CompileAs>
|
|
||||||
</ClCompile>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">C:\WinDDK\7600.16385.1\lib\win7\amd64\ndis.lib;C:\WinDDK\7600.16385.1\lib\win7\amd64\ntstrsafe.lib;C:\WinDDK\7600.16385.1\lib\win7\amd64\wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">C:\WinDDK\7600.16385.1\lib\win7\amd64\ndis.lib;C:\WinDDK\7600.16385.1\lib\win7\amd64\ntstrsafe.lib;C:\WinDDK\7600.16385.1\lib\win7\amd64\wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">C:\WinDDK\7600.16385.1\lib\win7\amd64\ndis.lib;C:\WinDDK\7600.16385.1\lib\win7\amd64\ntstrsafe.lib;C:\WinDDK\7600.16385.1\lib\win7\amd64\wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">$(DDK_LIB_PATH)ndis.lib;$(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">$(DDK_LIB_PATH)ndis.lib;$(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">C:\WinDDK\7600.16385.1\lib\win7\amd64\ndis.lib;C:\WinDDK\7600.16385.1\lib\win7\amd64\ntstrsafe.lib;C:\WinDDK\7600.16385.1\lib\win7\amd64\wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">C:\WinDDK\7600.16385.1\lib\win7\i386\ndis.lib;C:\WinDDK\7600.16385.1\lib\win7\i386\ntstrsafe.lib;C:\WinDDK\7600.16385.1\lib\win7\i386\wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">C:\WinDDK\7600.16385.1\lib\win7\i386\ndis.lib;C:\WinDDK\7600.16385.1\lib\win7\i386\ntstrsafe.lib;C:\WinDDK\7600.16385.1\lib\win7\i386\wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">C:\WinDDK\7600.16385.1\lib\win7\i386\ndis.lib;C:\WinDDK\7600.16385.1\lib\win7\i386\ntstrsafe.lib;C:\WinDDK\7600.16385.1\lib\win7\i386\wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">$(DDK_LIB_PATH)ndis.lib;$(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">$(DDK_LIB_PATH)ndis.lib;$(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Link>
|
|
||||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">C:\WinDDK\7600.16385.1\lib\win7\i386\ndis.lib;C:\WinDDK\7600.16385.1\lib\win7\i386\ntstrsafe.lib;C:\WinDDK\7600.16385.1\lib\win7\i386\wdmsec.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
||||||
</Link>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">false</SpecifyDriverVerDirectiveDate>
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">false</SpecifyDriverVerDirectiveDate>
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">false</SpecifyDriverVerDirectiveDate>
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">true</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">true</SpecifyDriverVerDirectiveDate>
|
|
||||||
<VersionHeaderPath Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">
|
|
||||||
</VersionHeaderPath>
|
|
||||||
<CatalogFileName Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">zttap300.cat</CatalogFileName>
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">
|
|
||||||
</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">false</SpecifyDriverVerDirectiveDate>
|
|
||||||
<DateStamp Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'" />
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">false</SpecifyDriverVerDirectiveDate>
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">false</SpecifyDriverVerDirectiveDate>
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">false</SpecifyDriverVerDirectiveDate>
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">false</SpecifyDriverVerDirectiveDate>
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">true</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">true</SpecifyDriverVerDirectiveDate>
|
|
||||||
<VersionHeaderPath Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">
|
|
||||||
</VersionHeaderPath>
|
|
||||||
<CatalogFileName Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">zttap300.cat</CatalogFileName>
|
|
||||||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">-v "3.00.00.0" %(AdditionalOptions)</AdditionalOptions>
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">true</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">true</SpecifyDriverVerDirectiveDate>
|
|
||||||
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">-v "3.00.00.0" %(AdditionalOptions)</AdditionalOptions>
|
|
||||||
</Inf>
|
|
||||||
<Inf>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveDate Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">false</SpecifyDriverVerDirectiveDate>
|
|
||||||
</Inf>
|
|
||||||
</ItemDefinitionGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<FilesToPackage Include="$(TargetPath)" />
|
|
||||||
<FilesToPackage Include="@(Inf->'%(CopyOutput)')" Condition="'@(Inf)'!=''" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="adapter.c" />
|
|
||||||
<ClCompile Include="device.c" />
|
|
||||||
<ClCompile Include="error.c" />
|
|
||||||
<ClCompile Include="macinfo.c" />
|
|
||||||
<ClCompile Include="mem.c" />
|
|
||||||
<ClCompile Include="oidrequest.c" />
|
|
||||||
<ClCompile Include="rxpath.c" />
|
|
||||||
<ClCompile Include="tapdrvr.c" />
|
|
||||||
<ClCompile Include="txpath.c" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="adapter.h" />
|
|
||||||
<ClInclude Include="config.h" />
|
|
||||||
<ClInclude Include="constants.h" />
|
|
||||||
<ClInclude Include="device.h" />
|
|
||||||
<ClInclude Include="endian.h" />
|
|
||||||
<ClInclude Include="error.h" />
|
|
||||||
<ClInclude Include="hexdump.h" />
|
|
||||||
<ClInclude Include="lock.h" />
|
|
||||||
<ClInclude Include="macinfo.h" />
|
|
||||||
<ClInclude Include="mem.h" />
|
|
||||||
<ClInclude Include="proto.h" />
|
|
||||||
<ClInclude Include="prototypes.h" />
|
|
||||||
<ClInclude Include="resource.h" />
|
|
||||||
<ClInclude Include="tap-windows.h" />
|
|
||||||
<ClInclude Include="tap.h" />
|
|
||||||
<ClInclude Include="types.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="resource.rc" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Inf Include="zttap300.inf">
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">3.00.00.0</TimeStamp>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<SpecifyDriverVerDirectiveVersion Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">false</SpecifyDriverVerDirectiveVersion>
|
|
||||||
<TimeStamp Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">3.00.00.0</TimeStamp>
|
|
||||||
</Inf>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
|
|
@ -1,110 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<ItemGroup>
|
|
||||||
<Filter Include="Source Files">
|
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Header Files">
|
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Resource Files">
|
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
|
||||||
</Filter>
|
|
||||||
<Filter Include="Driver Files">
|
|
||||||
<UniqueIdentifier>{8E41214B-6785-4CFE-B992-037D68949A14}</UniqueIdentifier>
|
|
||||||
<Extensions>inf;inv;inx;mof;mc;</Extensions>
|
|
||||||
</Filter>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="adapter.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="device.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="error.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="macinfo.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="mem.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="oidrequest.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="rxpath.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="tapdrvr.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="txpath.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="adapter.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="config.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="constants.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="device.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="endian.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="error.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="hexdump.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="lock.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="macinfo.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="mem.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="proto.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="prototypes.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="tap.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="tap-windows.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="types.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="resource.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ResourceCompile Include="resource.rc">
|
|
||||||
<Filter>Resource Files</Filter>
|
|
||||||
</ResourceCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Inf Include="zttap300.inf">
|
|
||||||
<Filter>Driver Files</Filter>
|
|
||||||
</Inf>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,352 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#ifndef __TAP_ADAPTER_CONTEXT_H_
|
|
||||||
#define __TAP_ADAPTER_CONTEXT_H_
|
|
||||||
|
|
||||||
#include "tap.h"
|
|
||||||
|
|
||||||
// Memory allocation tags.
|
|
||||||
#define TAP_ADAPTER_TAG ((ULONG)'ApaT') // "TapA
|
|
||||||
#define TAP_RX_NBL_TAG ((ULONG)'RpaT') // "TapR
|
|
||||||
#define TAP_RX_INJECT_BUFFER_TAG ((ULONG)'IpaT') // "TapI
|
|
||||||
|
|
||||||
#define TAP_MAX_NDIS_NAME_LENGTH 64 // 38 character GUID string plus extra..
|
|
||||||
|
|
||||||
// TAP receive indication NBL flag definitions.
|
|
||||||
#define TAP_RX_NBL_FLAGS NBL_FLAGS_MINIPORT_RESERVED
|
|
||||||
#define TAP_RX_NBL_FLAGS_CLEAR_ALL(_NBL) ((_NBL)->Flags &= ~TAP_RX_NBL_FLAGS)
|
|
||||||
#define TAP_RX_NBL_FLAG_SET(_NBL, _F) ((_NBL)->Flags |= ((_F) & TAP_RX_NBL_FLAGS))
|
|
||||||
#define TAP_RX_NBL_FLAG_CLEAR(_NBL, _F) ((_NBL)->Flags &= ~((_F) & TAP_RX_NBL_FLAGS))
|
|
||||||
#define TAP_RX_NBL_FLAG_TEST(_NBL, _F) (((_NBL)->Flags & ((_F) & TAP_RX_NBL_FLAGS)) != 0)
|
|
||||||
|
|
||||||
#define TAP_RX_NBL_FLAGS_IS_P2P 0x00001000
|
|
||||||
#define TAP_RX_NBL_FLAGS_IS_INJECTED 0x00002000
|
|
||||||
|
|
||||||
// MSDN Ref: http://msdn.microsoft.com/en-us/library/windows/hardware/ff560490(v=vs.85).aspx
|
|
||||||
typedef
|
|
||||||
enum _TAP_MINIPORT_ADAPTER_STATE
|
|
||||||
{
|
|
||||||
// The Halted state is the initial state of all adapters. When an
|
|
||||||
// adapter is in the Halted state, NDIS can call the driver's
|
|
||||||
// MiniportInitializeEx function to initialize the adapter.
|
|
||||||
MiniportHaltedState,
|
|
||||||
|
|
||||||
// In the Shutdown state, a system shutdown and restart must occur
|
|
||||||
// before the system can use the adapter again.
|
|
||||||
MiniportShutdownState,
|
|
||||||
|
|
||||||
// In the Initializing state, a miniport driver completes any
|
|
||||||
//operations that are required to initialize an adapter.
|
|
||||||
MiniportInitializingState,
|
|
||||||
|
|
||||||
// Entering the Paused state...
|
|
||||||
MiniportPausingState,
|
|
||||||
|
|
||||||
// In the Paused state, the adapter does not indicate received
|
|
||||||
// network data or accept send requests.
|
|
||||||
MiniportPausedState,
|
|
||||||
|
|
||||||
// In the Running state, a miniport driver performs send and
|
|
||||||
// receive processing for an adapter.
|
|
||||||
MiniportRunning,
|
|
||||||
|
|
||||||
// In the Restarting state, a miniport driver completes any
|
|
||||||
// operations that are required to restart send and receive
|
|
||||||
// operations for an adapter.
|
|
||||||
MiniportRestartingState
|
|
||||||
} TAP_MINIPORT_ADAPTER_STATE, *PTAP_MINIPORT_ADAPTER_STATE;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Each adapter managed by this driver has a TapAdapter struct.
|
|
||||||
// ------------------------------------------------------------
|
|
||||||
// Since there is a one-to-one relationship between adapter instances
|
|
||||||
// and device instances this structure is the device extension as well.
|
|
||||||
//
|
|
||||||
typedef struct _TAP_ADAPTER_CONTEXT
|
|
||||||
{
|
|
||||||
LIST_ENTRY AdapterListLink;
|
|
||||||
|
|
||||||
volatile LONG RefCount;
|
|
||||||
|
|
||||||
NDIS_HANDLE MiniportAdapterHandle;
|
|
||||||
|
|
||||||
NDIS_SPIN_LOCK AdapterLock; // Lock for protection of state and outstanding sends and recvs
|
|
||||||
|
|
||||||
//
|
|
||||||
// All fields that are protected by the AdapterLock are included
|
|
||||||
// in the Locked structure to remind us to take the Lock
|
|
||||||
// before accessing them :)
|
|
||||||
//
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
TAP_MINIPORT_ADAPTER_STATE AdapterState;
|
|
||||||
} Locked;
|
|
||||||
|
|
||||||
BOOLEAN ResetInProgress;
|
|
||||||
|
|
||||||
//
|
|
||||||
// NetCfgInstanceId as UNICODE_STRING
|
|
||||||
// ----------------------------------
|
|
||||||
// This a GUID string provided by NDIS that identifies the adapter instance.
|
|
||||||
// An example is:
|
|
||||||
//
|
|
||||||
// NetCfgInstanceId={410EB49D-2381-4FE7-9B36-498E22619DF0}
|
|
||||||
//
|
|
||||||
// Other names are derived from NetCfgInstanceId. For example, MiniportName:
|
|
||||||
//
|
|
||||||
// MiniportName=\DEVICE\{410EB49D-2381-4FE7-9B36-498E22619DF0}
|
|
||||||
//
|
|
||||||
NDIS_STRING NetCfgInstanceId;
|
|
||||||
WCHAR NetCfgInstanceIdBuffer[TAP_MAX_NDIS_NAME_LENGTH];
|
|
||||||
|
|
||||||
# define MINIPORT_INSTANCE_ID(a) ((a)->NetCfgInstanceIdAnsi.Buffer)
|
|
||||||
ANSI_STRING NetCfgInstanceIdAnsi; // Used occasionally
|
|
||||||
|
|
||||||
ULONG MtuSize; // 1500 byte (typical)
|
|
||||||
|
|
||||||
// TRUE if adapter should always be "connected" even when device node
|
|
||||||
// is not open by a userspace process.
|
|
||||||
//
|
|
||||||
// FALSE if connection state is application controlled.
|
|
||||||
BOOLEAN MediaStateAlwaysConnected;
|
|
||||||
|
|
||||||
// TRUE if device is "connected".
|
|
||||||
BOOLEAN LogicalMediaState;
|
|
||||||
|
|
||||||
NDIS_DEVICE_POWER_STATE CurrentPowerState;
|
|
||||||
|
|
||||||
BOOLEAN AllowNonAdmin;
|
|
||||||
|
|
||||||
MACADDR PermanentAddress; // From registry, if available
|
|
||||||
MACADDR CurrentAddress;
|
|
||||||
|
|
||||||
// Device registration parameters from NdisRegisterDeviceEx.
|
|
||||||
NDIS_STRING DeviceName;
|
|
||||||
WCHAR DeviceNameBuffer[TAP_MAX_NDIS_NAME_LENGTH];
|
|
||||||
|
|
||||||
NDIS_STRING LinkName;
|
|
||||||
WCHAR LinkNameBuffer[TAP_MAX_NDIS_NAME_LENGTH];
|
|
||||||
|
|
||||||
NDIS_HANDLE DeviceHandle;
|
|
||||||
PDEVICE_OBJECT DeviceObject;
|
|
||||||
BOOLEAN TapDeviceCreated; // WAS: m_TapIsRunning
|
|
||||||
|
|
||||||
PFILE_OBJECT TapFileObject; // Exclusive access
|
|
||||||
BOOLEAN TapFileIsOpen; // WAS: m_TapOpens
|
|
||||||
LONG TapFileOpenCount; // WAS: m_NumTapOpens
|
|
||||||
|
|
||||||
// Cancel-Safe read IRP queue.
|
|
||||||
TAP_IRP_CSQ PendingReadIrpQueue;
|
|
||||||
|
|
||||||
// Queue containing TAP packets representing host send NBs. These are
|
|
||||||
// waiting to be read by user-mode application.
|
|
||||||
TAP_PACKET_QUEUE SendPacketQueue;
|
|
||||||
|
|
||||||
// NBL pool for making TAP receive indications.
|
|
||||||
NDIS_HANDLE ReceiveNblPool;
|
|
||||||
|
|
||||||
volatile LONG ReceiveNblInFlightCount;
|
|
||||||
#define TAP_WAIT_POLL_LOOP_TIMEOUT 3000 // 3 seconds
|
|
||||||
NDIS_EVENT ReceiveNblInFlightCountZeroEvent;
|
|
||||||
|
|
||||||
/*
|
|
||||||
// Info for point-to-point mode
|
|
||||||
BOOLEAN m_tun;
|
|
||||||
IPADDR m_localIP;
|
|
||||||
IPADDR m_remoteNetwork;
|
|
||||||
IPADDR m_remoteNetmask;
|
|
||||||
ETH_HEADER m_TapToUser;
|
|
||||||
ETH_HEADER m_UserToTap;
|
|
||||||
ETH_HEADER m_UserToTap_IPv6; // same as UserToTap but proto=ipv6
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Info for DHCP server masquerade
|
|
||||||
/*
|
|
||||||
BOOLEAN m_dhcp_enabled;
|
|
||||||
IPADDR m_dhcp_addr;
|
|
||||||
ULONG m_dhcp_netmask;
|
|
||||||
IPADDR m_dhcp_server_ip;
|
|
||||||
BOOLEAN m_dhcp_server_arp;
|
|
||||||
MACADDR m_dhcp_server_mac;
|
|
||||||
ULONG m_dhcp_lease_time;
|
|
||||||
UCHAR m_dhcp_user_supplied_options_buffer[DHCP_USER_SUPPLIED_OPTIONS_BUFFER_SIZE];
|
|
||||||
ULONG m_dhcp_user_supplied_options_buffer_len;
|
|
||||||
BOOLEAN m_dhcp_received_discover;
|
|
||||||
ULONG m_dhcp_bad_requests;
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Multicast list. Fixed size.
|
|
||||||
ULONG ulMCListSize;
|
|
||||||
UCHAR MCList[TAP_MAX_MCAST_LIST][MACADDR_SIZE];
|
|
||||||
|
|
||||||
ULONG PacketFilter;
|
|
||||||
ULONG ulLookahead;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Statistics
|
|
||||||
// -------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
|
|
||||||
// Packet counts
|
|
||||||
ULONG64 FramesRxDirected;
|
|
||||||
ULONG64 FramesRxMulticast;
|
|
||||||
ULONG64 FramesRxBroadcast;
|
|
||||||
ULONG64 FramesTxDirected;
|
|
||||||
ULONG64 FramesTxMulticast;
|
|
||||||
ULONG64 FramesTxBroadcast;
|
|
||||||
|
|
||||||
// Byte counts
|
|
||||||
ULONG64 BytesRxDirected;
|
|
||||||
ULONG64 BytesRxMulticast;
|
|
||||||
ULONG64 BytesRxBroadcast;
|
|
||||||
ULONG64 BytesTxDirected;
|
|
||||||
ULONG64 BytesTxMulticast;
|
|
||||||
ULONG64 BytesTxBroadcast;
|
|
||||||
|
|
||||||
// Count of transmit errors
|
|
||||||
ULONG TxAbortExcessCollisions;
|
|
||||||
ULONG TxLateCollisions;
|
|
||||||
ULONG TxDmaUnderrun;
|
|
||||||
ULONG TxLostCRS;
|
|
||||||
ULONG TxOKButDeferred;
|
|
||||||
ULONG OneRetry;
|
|
||||||
ULONG MoreThanOneRetry;
|
|
||||||
ULONG TotalRetries;
|
|
||||||
ULONG TransmitFailuresOther;
|
|
||||||
|
|
||||||
// Count of receive errors
|
|
||||||
ULONG RxCrcErrors;
|
|
||||||
ULONG RxAlignmentErrors;
|
|
||||||
ULONG RxResourceErrors;
|
|
||||||
ULONG RxDmaOverrunErrors;
|
|
||||||
ULONG RxCdtFrames;
|
|
||||||
ULONG RxRuntErrors;
|
|
||||||
|
|
||||||
#if PACKET_TRUNCATION_CHECK
|
|
||||||
LONG m_RxTrunc, m_TxTrunc;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BOOLEAN m_InterfaceIsRunning;
|
|
||||||
LONG m_Rx, m_RxErr;
|
|
||||||
NDIS_MEDIUM m_Medium;
|
|
||||||
|
|
||||||
// Help to tear down the adapter by keeping
|
|
||||||
// some state information on allocated
|
|
||||||
// resources.
|
|
||||||
BOOLEAN m_CalledAdapterFreeResources;
|
|
||||||
BOOLEAN m_RegisteredAdapterShutdownHandler;
|
|
||||||
|
|
||||||
} TAP_ADAPTER_CONTEXT, *PTAP_ADAPTER_CONTEXT;
|
|
||||||
|
|
||||||
FORCEINLINE
|
|
||||||
LONG
|
|
||||||
tapAdapterContextReference(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter
|
|
||||||
)
|
|
||||||
{
|
|
||||||
LONG refCount = NdisInterlockedIncrement(&Adapter->RefCount);
|
|
||||||
|
|
||||||
ASSERT(refCount>1); // Cannot dereference a zombie.
|
|
||||||
|
|
||||||
return refCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapAdapterContextFree(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter
|
|
||||||
);
|
|
||||||
|
|
||||||
FORCEINLINE
|
|
||||||
LONG
|
|
||||||
tapAdapterContextDereference(
|
|
||||||
IN PTAP_ADAPTER_CONTEXT Adapter
|
|
||||||
)
|
|
||||||
{
|
|
||||||
LONG refCount = NdisInterlockedDecrement(&Adapter->RefCount);
|
|
||||||
ASSERT(refCount >= 0);
|
|
||||||
if (!refCount)
|
|
||||||
{
|
|
||||||
tapAdapterContextFree(Adapter);
|
|
||||||
}
|
|
||||||
|
|
||||||
return refCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapAdapterAcquireLock(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter,
|
|
||||||
__in BOOLEAN DispatchLevel
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapAdapterReleaseLock(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter,
|
|
||||||
__in BOOLEAN DispatchLevel
|
|
||||||
);
|
|
||||||
|
|
||||||
// Returns with added reference on adapter context.
|
|
||||||
PTAP_ADAPTER_CONTEXT
|
|
||||||
tapAdapterContextFromDeviceObject(
|
|
||||||
__in PDEVICE_OBJECT DeviceObject
|
|
||||||
);
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
tapAdapterReadAndWriteReady(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter
|
|
||||||
);
|
|
||||||
|
|
||||||
NDIS_STATUS
|
|
||||||
tapAdapterSendAndReceiveReady(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter
|
|
||||||
);
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
tapGetNetBufferFrameType(
|
|
||||||
__in PNET_BUFFER NetBuffer
|
|
||||||
);
|
|
||||||
|
|
||||||
ULONG
|
|
||||||
tapGetNetBufferCountsFromNetBufferList(
|
|
||||||
__in PNET_BUFFER_LIST NetBufferList,
|
|
||||||
__inout_opt PULONG TotalByteCount // Of all linked NBs
|
|
||||||
);
|
|
||||||
|
|
||||||
// Prototypes for standard NDIS miniport entry points
|
|
||||||
MINIPORT_SET_OPTIONS AdapterSetOptions;
|
|
||||||
MINIPORT_INITIALIZE AdapterCreate;
|
|
||||||
MINIPORT_HALT AdapterHalt;
|
|
||||||
MINIPORT_UNLOAD TapDriverUnload;
|
|
||||||
MINIPORT_PAUSE AdapterPause;
|
|
||||||
MINIPORT_RESTART AdapterRestart;
|
|
||||||
MINIPORT_OID_REQUEST AdapterOidRequest;
|
|
||||||
MINIPORT_SEND_NET_BUFFER_LISTS AdapterSendNetBufferLists;
|
|
||||||
MINIPORT_RETURN_NET_BUFFER_LISTS AdapterReturnNetBufferLists;
|
|
||||||
MINIPORT_CANCEL_SEND AdapterCancelSend;
|
|
||||||
MINIPORT_CHECK_FOR_HANG AdapterCheckForHangEx;
|
|
||||||
MINIPORT_RESET AdapterReset;
|
|
||||||
MINIPORT_DEVICE_PNP_EVENT_NOTIFY AdapterDevicePnpEventNotify;
|
|
||||||
MINIPORT_SHUTDOWN AdapterShutdownEx;
|
|
||||||
MINIPORT_CANCEL_OID_REQUEST AdapterCancelOidRequest;
|
|
||||||
|
|
||||||
#endif // __TAP_ADAPTER_CONTEXT_H_
|
|
|
@ -1,9 +0,0 @@
|
||||||
#define PRODUCT_NAME "ZeroTier One Virtual Port"
|
|
||||||
#define PRODUCT_VERSION "3.0.0"
|
|
||||||
#define PRODUCT_VERSION_RESOURCE 3,0,0,1
|
|
||||||
#define PRODUCT_TAP_WIN_COMPONENT_ID "zttap300"
|
|
||||||
#define PRODUCT_TAP_WIN_MAJOR 3
|
|
||||||
#define PRODUCT_TAP_WIN_MINOR 0
|
|
||||||
#define PRODUCT_TAP_WIN_PROVIDER "ZeroTier Networks"
|
|
||||||
#define PRODUCT_TAP_WIN_DEVICE_DESCRIPTION PRODUCT_NAME
|
|
||||||
#define PRODUCT_TAP_WIN_RELDATE "04/25/2015"
|
|
|
@ -1,196 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
//====================================================================
|
|
||||||
// Product and Version public settings
|
|
||||||
//====================================================================
|
|
||||||
|
|
||||||
#define PRODUCT_STRING PRODUCT_TAP_DEVICE_DESCRIPTION
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Update the driver version number every time you release a new driver
|
|
||||||
// The high word is the major version. The low word is the minor version.
|
|
||||||
// Also make sure that VER_FILEVERSION specified in the .RC file also
|
|
||||||
// matches with the driver version because NDISTESTER checks for that.
|
|
||||||
//
|
|
||||||
#ifndef TAP_DRIVER_MAJOR_VERSION
|
|
||||||
|
|
||||||
#define TAP_DRIVER_MAJOR_VERSION 0x04
|
|
||||||
#define TAP_DRIVER_MINOR_VERSION 0x02
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TAP_DRIVER_VENDOR_VERSION ((TAP_DRIVER_MAJOR_VERSION << 16) | TAP_DRIVER_MINOR_VERSION)
|
|
||||||
|
|
||||||
//
|
|
||||||
// Define the NDIS miniport interface version that this driver targets.
|
|
||||||
//
|
|
||||||
#if defined(NDIS60_MINIPORT)
|
|
||||||
# define TAP_NDIS_MAJOR_VERSION 6
|
|
||||||
# define TAP_NDIS_MINOR_VERSION 0
|
|
||||||
#elif defined(NDIS61_MINIPORT)
|
|
||||||
# define TAP_NDIS_MAJOR_VERSION 6
|
|
||||||
# define TAP_NDIS_MINOR_VERSION 1
|
|
||||||
#elif defined(NDIS620_MINIPORT)
|
|
||||||
# define TAP_NDIS_MAJOR_VERSION 6
|
|
||||||
# define TAP_NDIS_MINOR_VERSION 20
|
|
||||||
#elif defined(NDIS630_MINIPORT)
|
|
||||||
# define TAP_NDIS_MAJOR_VERSION 6
|
|
||||||
# define TAP_NDIS_MINOR_VERSION 30
|
|
||||||
#else
|
|
||||||
#define TAP_NDIS_MAJOR_VERSION 5
|
|
||||||
#define TAP_NDIS_MINOR_VERSION 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//===========================================================
|
|
||||||
// Driver constants
|
|
||||||
//===========================================================
|
|
||||||
|
|
||||||
#define ETHERNET_HEADER_SIZE (sizeof (ETH_HEADER))
|
|
||||||
//#define ETHERNET_MTU 1500
|
|
||||||
#define ETHERNET_MTU 2800
|
|
||||||
#define ETHERNET_PACKET_SIZE (ETHERNET_MTU + ETHERNET_HEADER_SIZE)
|
|
||||||
#define DEFAULT_PACKET_LOOKAHEAD (ETHERNET_PACKET_SIZE)
|
|
||||||
#define VLAN_TAG_SIZE 4
|
|
||||||
|
|
||||||
//===========================================================
|
|
||||||
// Medium properties
|
|
||||||
//===========================================================
|
|
||||||
|
|
||||||
#define TAP_FRAME_HEADER_SIZE ETHERNET_HEADER_SIZE
|
|
||||||
#define TAP_FRAME_MAX_DATA_SIZE ETHERNET_MTU
|
|
||||||
#define TAP_MAX_FRAME_SIZE (TAP_FRAME_HEADER_SIZE + TAP_FRAME_MAX_DATA_SIZE)
|
|
||||||
#define TAP_MIN_FRAME_SIZE 60
|
|
||||||
|
|
||||||
#define TAP_MEDIUM_TYPE NdisMedium802_3
|
|
||||||
|
|
||||||
//===========================================================
|
|
||||||
// Physical adapter properties
|
|
||||||
//===========================================================
|
|
||||||
|
|
||||||
// The bus that connects the adapter to the PC.
|
|
||||||
// (Example: PCI adapters should use NdisInterfacePci).
|
|
||||||
#define TAP_INTERFACE_TYPE NdisInterfaceInternal
|
|
||||||
|
|
||||||
#define TAP_VENDOR_DESC PRODUCT_TAP_WIN_DEVICE_DESCRIPTION
|
|
||||||
|
|
||||||
// Highest byte is the NIC byte plus three vendor bytes. This is normally
|
|
||||||
// obtained from the NIC.
|
|
||||||
#define TAP_VENDOR_ID 0x00FFFFFF
|
|
||||||
|
|
||||||
// If you have physical hardware on 802.3, use NdisPhysicalMedium802_3.
|
|
||||||
#define TAP_PHYSICAL_MEDIUM NdisPhysicalMediumUnspecified
|
|
||||||
|
|
||||||
// Claim to be 100mbps duplex
|
|
||||||
#define MEGABITS_PER_SECOND 1000000ULL
|
|
||||||
#define TAP_XMIT_SPEED (100ULL*MEGABITS_PER_SECOND)
|
|
||||||
#define TAP_RECV_SPEED (100ULL*MEGABITS_PER_SECOND)
|
|
||||||
|
|
||||||
// Max number of multicast addresses supported in hardware
|
|
||||||
#define TAP_MAX_MCAST_LIST 128
|
|
||||||
|
|
||||||
#define TAP_MAX_LOOKAHEAD TAP_FRAME_MAX_DATA_SIZE
|
|
||||||
#define TAP_BUFFER_SIZE TAP_MAX_FRAME_SIZE
|
|
||||||
|
|
||||||
// Set this value to TRUE if there is a physical adapter.
|
|
||||||
#define TAP_HAS_PHYSICAL_CONNECTOR FALSE
|
|
||||||
#define TAP_ACCESS_TYPE NET_IF_ACCESS_BROADCAST
|
|
||||||
#define TAP_DIRECTION_TYPE NET_IF_DIRECTION_SENDRECEIVE
|
|
||||||
#define TAP_CONNECTION_TYPE NET_IF_CONNECTION_DEDICATED
|
|
||||||
|
|
||||||
// This value must match the *IfType in the driver .inf file
|
|
||||||
#define TAP_IFTYPE IF_TYPE_ETHERNET_CSMACD
|
|
||||||
|
|
||||||
//
|
|
||||||
// This is a virtual device, so it can tolerate surprise removal and
|
|
||||||
// suspend. Ensure the correct flags are set for your hardware.
|
|
||||||
//
|
|
||||||
#define TAP_ADAPTER_ATTRIBUTES_FLAGS (\
|
|
||||||
NDIS_MINIPORT_ATTRIBUTES_SURPRISE_REMOVE_OK | NDIS_MINIPORT_ATTRIBUTES_NDIS_WDM)
|
|
||||||
|
|
||||||
#define TAP_SUPPORTED_FILTERS ( \
|
|
||||||
NDIS_PACKET_TYPE_DIRECTED | \
|
|
||||||
NDIS_PACKET_TYPE_MULTICAST | \
|
|
||||||
NDIS_PACKET_TYPE_BROADCAST | \
|
|
||||||
NDIS_PACKET_TYPE_ALL_LOCAL | \
|
|
||||||
NDIS_PACKET_TYPE_PROMISCUOUS | \
|
|
||||||
NDIS_PACKET_TYPE_ALL_MULTICAST)
|
|
||||||
|
|
||||||
//#define TAP_MAX_MCAST_LIST 128 // Max length of multicast address list
|
|
||||||
|
|
||||||
//
|
|
||||||
// Specify a bitmask that defines optional properties of the NIC.
|
|
||||||
// This miniport indicates receive with NdisMIndicateReceiveNetBufferLists
|
|
||||||
// function. Such a driver should set this NDIS_MAC_OPTION_TRANSFERS_NOT_PEND
|
|
||||||
// flag.
|
|
||||||
//
|
|
||||||
// NDIS_MAC_OPTION_NO_LOOPBACK tells NDIS that NIC has no internal
|
|
||||||
// loopback support so NDIS will manage loopbacks on behalf of
|
|
||||||
// this driver.
|
|
||||||
//
|
|
||||||
// NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA tells the protocol that
|
|
||||||
// our receive buffer is not on a device-specific card. If
|
|
||||||
// NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA is not set, multi-buffer
|
|
||||||
// indications are copied to a single flat buffer.
|
|
||||||
//
|
|
||||||
|
|
||||||
#define TAP_MAC_OPTIONS (\
|
|
||||||
NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA | \
|
|
||||||
NDIS_MAC_OPTION_TRANSFERS_NOT_PEND | \
|
|
||||||
NDIS_MAC_OPTION_NO_LOOPBACK)
|
|
||||||
|
|
||||||
#define TAP_ADAPTER_CHECK_FOR_HANG_TIME_IN_SECONDS 4
|
|
||||||
|
|
||||||
|
|
||||||
// NDIS 6.x miniports must support all counters in OID_GEN_STATISTICS.
|
|
||||||
#define TAP_SUPPORTED_STATISTICS (\
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_DIRECTED_FRAMES_RCV | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_MULTICAST_FRAMES_RCV | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_BROADCAST_FRAMES_RCV | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_BYTES_RCV | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_RCV_DISCARDS | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_RCV_ERROR | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_DIRECTED_FRAMES_XMIT | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_MULTICAST_FRAMES_XMIT | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_BROADCAST_FRAMES_XMIT | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_BYTES_XMIT | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_XMIT_ERROR | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_XMIT_DISCARDS | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_DIRECTED_BYTES_RCV | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_MULTICAST_BYTES_RCV | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_BROADCAST_BYTES_RCV | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_DIRECTED_BYTES_XMIT | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_MULTICAST_BYTES_XMIT | \
|
|
||||||
NDIS_STATISTICS_FLAGS_VALID_BROADCAST_BYTES_XMIT)
|
|
||||||
|
|
||||||
|
|
||||||
#define MINIMUM_MTU 576 // USE TCP Minimum MTU
|
|
||||||
#define MAXIMUM_MTU 65536 // IP maximum MTU
|
|
||||||
|
|
||||||
#define PACKET_QUEUE_SIZE 64 // tap -> userspace queue size
|
|
||||||
#define IRP_QUEUE_SIZE 16 // max number of simultaneous i/o operations from userspace
|
|
||||||
#define INJECT_QUEUE_SIZE 16 // DHCP/ARP -> tap injection queue
|
|
||||||
|
|
||||||
#define TAP_LITTLE_ENDIAN // affects ntohs, htonl, etc. functions
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,50 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __TAP_DEVICE_H_
|
|
||||||
#define __TAP_DEVICE_H_
|
|
||||||
|
|
||||||
//======================================================================
|
|
||||||
// TAP Prototypes for standard Win32 device I/O entry points
|
|
||||||
//======================================================================
|
|
||||||
|
|
||||||
__drv_dispatchType(IRP_MJ_CREATE)
|
|
||||||
DRIVER_DISPATCH TapDeviceCreate;
|
|
||||||
|
|
||||||
__drv_dispatchType(IRP_MJ_READ)
|
|
||||||
DRIVER_DISPATCH TapDeviceRead;
|
|
||||||
|
|
||||||
__drv_dispatchType(IRP_MJ_WRITE)
|
|
||||||
DRIVER_DISPATCH TapDeviceWrite;
|
|
||||||
|
|
||||||
__drv_dispatchType(IRP_MJ_DEVICE_CONTROL)
|
|
||||||
DRIVER_DISPATCH TapDeviceControl;
|
|
||||||
|
|
||||||
__drv_dispatchType(IRP_MJ_CLEANUP)
|
|
||||||
DRIVER_DISPATCH TapDeviceCleanup;
|
|
||||||
|
|
||||||
__drv_dispatchType(IRP_MJ_CLOSE)
|
|
||||||
DRIVER_DISPATCH TapDeviceClose;
|
|
||||||
|
|
||||||
#endif // __TAP_DEVICE_H_
|
|
|
@ -1,35 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef TAP_LITTLE_ENDIAN
|
|
||||||
#define ntohs(x) RtlUshortByteSwap(x)
|
|
||||||
#define htons(x) RtlUshortByteSwap(x)
|
|
||||||
#define ntohl(x) RtlUlongByteSwap(x)
|
|
||||||
#define htonl(x) RtlUlongByteSwap(x)
|
|
||||||
#else
|
|
||||||
#define ntohs(x) ((USHORT)(x))
|
|
||||||
#define htons(x) ((USHORT)(x))
|
|
||||||
#define ntohl(x) ((ULONG)(x))
|
|
||||||
#define htonl(x) ((ULONG)(x))
|
|
||||||
#endif
|
|
|
@ -1,398 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "tap.h"
|
|
||||||
|
|
||||||
//-----------------
|
|
||||||
// DEBUGGING OUTPUT
|
|
||||||
//-----------------
|
|
||||||
|
|
||||||
const char *g_LastErrorFilename;
|
|
||||||
int g_LastErrorLineNumber;
|
|
||||||
|
|
||||||
#if DBG
|
|
||||||
|
|
||||||
DebugOutput g_Debug;
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
NewlineExists (const char *str, int len)
|
|
||||||
{
|
|
||||||
while (len-- > 0)
|
|
||||||
{
|
|
||||||
const char c = *str++;
|
|
||||||
if (c == '\n')
|
|
||||||
return TRUE;
|
|
||||||
else if (c == '\0')
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
MyDebugInit (unsigned int bufsiz)
|
|
||||||
{
|
|
||||||
NdisZeroMemory (&g_Debug, sizeof (g_Debug));
|
|
||||||
g_Debug.text = (char *) MemAlloc (bufsiz, FALSE);
|
|
||||||
|
|
||||||
if (g_Debug.text)
|
|
||||||
{
|
|
||||||
g_Debug.capacity = bufsiz;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
MyDebugFree ()
|
|
||||||
{
|
|
||||||
if (g_Debug.text)
|
|
||||||
{
|
|
||||||
MemFree (g_Debug.text, g_Debug.capacity);
|
|
||||||
}
|
|
||||||
|
|
||||||
NdisZeroMemory (&g_Debug, sizeof (g_Debug));
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
MyDebugPrint (const unsigned char* format, ...)
|
|
||||||
{
|
|
||||||
if (g_Debug.text && g_Debug.capacity > 0 && CAN_WE_PRINT)
|
|
||||||
{
|
|
||||||
BOOLEAN owned;
|
|
||||||
ACQUIRE_MUTEX_ADAPTIVE (&g_Debug.lock, owned);
|
|
||||||
if (owned)
|
|
||||||
{
|
|
||||||
const int remaining = (int)g_Debug.capacity - (int)g_Debug.out;
|
|
||||||
|
|
||||||
if (remaining > 0)
|
|
||||||
{
|
|
||||||
va_list args;
|
|
||||||
NTSTATUS status;
|
|
||||||
char *end;
|
|
||||||
|
|
||||||
#ifdef DBG_PRINT
|
|
||||||
va_start (args, format);
|
|
||||||
vDbgPrintEx (DPFLTR_IHVNETWORK_ID, DPFLTR_INFO_LEVEL, format, args);
|
|
||||||
va_end (args);
|
|
||||||
#endif
|
|
||||||
va_start (args, format);
|
|
||||||
status = RtlStringCchVPrintfExA (g_Debug.text + g_Debug.out,
|
|
||||||
remaining,
|
|
||||||
&end,
|
|
||||||
NULL,
|
|
||||||
STRSAFE_NO_TRUNCATION | STRSAFE_IGNORE_NULLS,
|
|
||||||
format,
|
|
||||||
args);
|
|
||||||
va_end (args);
|
|
||||||
va_start (args, format);
|
|
||||||
vDbgPrintEx(DPFLTR_IHVDRIVER_ID , 1, format, args);
|
|
||||||
va_end (args);
|
|
||||||
if (status == STATUS_SUCCESS)
|
|
||||||
g_Debug.out = (unsigned int) (end - g_Debug.text);
|
|
||||||
else
|
|
||||||
g_Debug.error = TRUE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
g_Debug.error = TRUE;
|
|
||||||
|
|
||||||
RELEASE_MUTEX (&g_Debug.lock);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
g_Debug.error = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
GetDebugLine (
|
|
||||||
__in char *buf,
|
|
||||||
__in const int len
|
|
||||||
)
|
|
||||||
{
|
|
||||||
static const char *truncated = "[OUTPUT TRUNCATED]\n";
|
|
||||||
BOOLEAN ret = FALSE;
|
|
||||||
|
|
||||||
NdisZeroMemory (buf, len);
|
|
||||||
|
|
||||||
if (g_Debug.text && g_Debug.capacity > 0)
|
|
||||||
{
|
|
||||||
BOOLEAN owned;
|
|
||||||
ACQUIRE_MUTEX_ADAPTIVE (&g_Debug.lock, owned);
|
|
||||||
if (owned)
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
|
|
||||||
if (g_Debug.error || NewlineExists (g_Debug.text + g_Debug.in, (int)g_Debug.out - (int)g_Debug.in))
|
|
||||||
{
|
|
||||||
while (i < (len - 1) && g_Debug.in < g_Debug.out)
|
|
||||||
{
|
|
||||||
const char c = g_Debug.text[g_Debug.in++];
|
|
||||||
if (c == '\n')
|
|
||||||
break;
|
|
||||||
buf[i++] = c;
|
|
||||||
}
|
|
||||||
if (i < len)
|
|
||||||
buf[i] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!i)
|
|
||||||
{
|
|
||||||
if (g_Debug.in == g_Debug.out)
|
|
||||||
{
|
|
||||||
g_Debug.in = g_Debug.out = 0;
|
|
||||||
if (g_Debug.error)
|
|
||||||
{
|
|
||||||
const unsigned int tlen = strlen (truncated);
|
|
||||||
if (tlen < g_Debug.capacity)
|
|
||||||
{
|
|
||||||
NdisMoveMemory (g_Debug.text, truncated, tlen+1);
|
|
||||||
g_Debug.out = tlen;
|
|
||||||
}
|
|
||||||
g_Debug.error = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ret = TRUE;
|
|
||||||
|
|
||||||
RELEASE_MUTEX (&g_Debug.lock);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
PrMac (const MACADDR mac)
|
|
||||||
{
|
|
||||||
DEBUGP (("%x:%x:%x:%x:%x:%x",
|
|
||||||
mac[0], mac[1], mac[2],
|
|
||||||
mac[3], mac[4], mac[5]));
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
PrIP (IPADDR ip_addr)
|
|
||||||
{
|
|
||||||
const unsigned char *ip = (const unsigned char *) &ip_addr;
|
|
||||||
|
|
||||||
DEBUGP (("%d.%d.%d.%d",
|
|
||||||
ip[0], ip[1], ip[2], ip[3]));
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *
|
|
||||||
PrIPProto (int proto)
|
|
||||||
{
|
|
||||||
switch (proto)
|
|
||||||
{
|
|
||||||
case IPPROTO_UDP:
|
|
||||||
return "UDP";
|
|
||||||
|
|
||||||
case IPPROTO_TCP:
|
|
||||||
return "TCP";
|
|
||||||
|
|
||||||
case IPPROTO_ICMP:
|
|
||||||
return "ICMP";
|
|
||||||
|
|
||||||
case IPPROTO_IGMP:
|
|
||||||
return "IGMP";
|
|
||||||
|
|
||||||
default:
|
|
||||||
return "???";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
DumpARP (const char *prefix, const ARP_PACKET *arp)
|
|
||||||
{
|
|
||||||
DEBUGP (("%s ARP src=", prefix));
|
|
||||||
PrMac (arp->m_MAC_Source);
|
|
||||||
DEBUGP ((" dest="));
|
|
||||||
PrMac (arp->m_MAC_Destination);
|
|
||||||
DEBUGP ((" OP=0x%04x",
|
|
||||||
(int)ntohs(arp->m_ARP_Operation)));
|
|
||||||
DEBUGP ((" M=0x%04x(%d)",
|
|
||||||
(int)ntohs(arp->m_MAC_AddressType),
|
|
||||||
(int)arp->m_MAC_AddressSize));
|
|
||||||
DEBUGP ((" P=0x%04x(%d)",
|
|
||||||
(int)ntohs(arp->m_PROTO_AddressType),
|
|
||||||
(int)arp->m_PROTO_AddressSize));
|
|
||||||
|
|
||||||
DEBUGP ((" MacSrc="));
|
|
||||||
PrMac (arp->m_ARP_MAC_Source);
|
|
||||||
DEBUGP ((" MacDest="));
|
|
||||||
PrMac (arp->m_ARP_MAC_Destination);
|
|
||||||
|
|
||||||
DEBUGP ((" IPSrc="));
|
|
||||||
PrIP (arp->m_ARP_IP_Source);
|
|
||||||
DEBUGP ((" IPDest="));
|
|
||||||
PrIP (arp->m_ARP_IP_Destination);
|
|
||||||
|
|
||||||
DEBUGP (("\n"));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct ethpayload
|
|
||||||
{
|
|
||||||
ETH_HEADER eth;
|
|
||||||
UCHAR payload[DEFAULT_PACKET_LOOKAHEAD];
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef ALLOW_PACKET_DUMP
|
|
||||||
|
|
||||||
VOID
|
|
||||||
DumpPacket2(
|
|
||||||
__in const char *prefix,
|
|
||||||
__in const ETH_HEADER *eth,
|
|
||||||
__in const unsigned char *data,
|
|
||||||
__in unsigned int len
|
|
||||||
)
|
|
||||||
{
|
|
||||||
struct ethpayload *ep = (struct ethpayload *) MemAlloc (sizeof (struct ethpayload), TRUE);
|
|
||||||
if (ep)
|
|
||||||
{
|
|
||||||
if (len > DEFAULT_PACKET_LOOKAHEAD)
|
|
||||||
len = DEFAULT_PACKET_LOOKAHEAD;
|
|
||||||
ep->eth = *eth;
|
|
||||||
NdisMoveMemory (ep->payload, data, len);
|
|
||||||
DumpPacket (prefix, (unsigned char *) ep, sizeof (ETH_HEADER) + len);
|
|
||||||
MemFree (ep, sizeof (struct ethpayload));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
DumpPacket(
|
|
||||||
__in const char *prefix,
|
|
||||||
__in const unsigned char *data,
|
|
||||||
__in unsigned int len
|
|
||||||
)
|
|
||||||
{
|
|
||||||
const ETH_HEADER *eth = (const ETH_HEADER *) data;
|
|
||||||
const IPHDR *ip = (const IPHDR *) (data + sizeof (ETH_HEADER));
|
|
||||||
|
|
||||||
if (len < sizeof (ETH_HEADER))
|
|
||||||
{
|
|
||||||
DEBUGP (("%s TRUNCATED PACKET LEN=%d\n", prefix, len));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ARP Packet?
|
|
||||||
if (len >= sizeof (ARP_PACKET) && eth->proto == htons (ETH_P_ARP))
|
|
||||||
{
|
|
||||||
DumpARP (prefix, (const ARP_PACKET *) data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// IPv4 packet?
|
|
||||||
if (len >= (sizeof (IPHDR) + sizeof (ETH_HEADER))
|
|
||||||
&& eth->proto == htons (ETH_P_IP)
|
|
||||||
&& IPH_GET_VER (ip->version_len) == 4)
|
|
||||||
{
|
|
||||||
const int hlen = IPH_GET_LEN (ip->version_len);
|
|
||||||
const int blen = len - sizeof (ETH_HEADER);
|
|
||||||
BOOLEAN did = FALSE;
|
|
||||||
|
|
||||||
DEBUGP (("%s IPv4 %s[%d]", prefix, PrIPProto (ip->protocol), len));
|
|
||||||
|
|
||||||
if (!(ntohs (ip->tot_len) == blen && hlen <= blen))
|
|
||||||
{
|
|
||||||
DEBUGP ((" XXX"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TCP packet?
|
|
||||||
if (ip->protocol == IPPROTO_TCP
|
|
||||||
&& blen - hlen >= (sizeof (TCPHDR)))
|
|
||||||
{
|
|
||||||
const TCPHDR *tcp = (TCPHDR *) (data + sizeof (ETH_HEADER) + hlen);
|
|
||||||
DEBUGP ((" "));
|
|
||||||
PrIP (ip->saddr);
|
|
||||||
DEBUGP ((":%d", ntohs (tcp->source)));
|
|
||||||
DEBUGP ((" -> "));
|
|
||||||
PrIP (ip->daddr);
|
|
||||||
DEBUGP ((":%d", ntohs (tcp->dest)));
|
|
||||||
did = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// UDP packet?
|
|
||||||
else if ((ntohs (ip->frag_off) & IP_OFFMASK) == 0
|
|
||||||
&& ip->protocol == IPPROTO_UDP
|
|
||||||
&& blen - hlen >= (sizeof (UDPHDR)))
|
|
||||||
{
|
|
||||||
const UDPHDR *udp = (UDPHDR *) (data + sizeof (ETH_HEADER) + hlen);
|
|
||||||
|
|
||||||
// DHCP packet?
|
|
||||||
if ((udp->dest == htons (BOOTPC_PORT) || udp->dest == htons (BOOTPS_PORT))
|
|
||||||
&& blen - hlen >= (sizeof (UDPHDR) + sizeof (DHCP)))
|
|
||||||
{
|
|
||||||
const DHCP *dhcp = (DHCP *) (data
|
|
||||||
+ hlen
|
|
||||||
+ sizeof (ETH_HEADER)
|
|
||||||
+ sizeof (UDPHDR));
|
|
||||||
|
|
||||||
int optlen = len
|
|
||||||
- sizeof (ETH_HEADER)
|
|
||||||
- hlen
|
|
||||||
- sizeof (UDPHDR)
|
|
||||||
- sizeof (DHCP);
|
|
||||||
|
|
||||||
if (optlen < 0)
|
|
||||||
optlen = 0;
|
|
||||||
|
|
||||||
DumpDHCP (eth, ip, udp, dhcp, optlen);
|
|
||||||
did = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!did)
|
|
||||||
{
|
|
||||||
DEBUGP ((" "));
|
|
||||||
PrIP (ip->saddr);
|
|
||||||
DEBUGP ((":%d", ntohs (udp->source)));
|
|
||||||
DEBUGP ((" -> "));
|
|
||||||
PrIP (ip->daddr);
|
|
||||||
DEBUGP ((":%d", ntohs (udp->dest)));
|
|
||||||
did = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!did)
|
|
||||||
{
|
|
||||||
DEBUGP ((" ipproto=%d ", ip->protocol));
|
|
||||||
PrIP (ip->saddr);
|
|
||||||
DEBUGP ((" -> "));
|
|
||||||
PrIP (ip->daddr);
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUGP (("\n"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
DEBUGP (("%s ??? src=", prefix));
|
|
||||||
PrMac (eth->src);
|
|
||||||
DEBUGP ((" dest="));
|
|
||||||
PrMac (eth->dest);
|
|
||||||
DEBUGP ((" proto=0x%04x len=%d\n",
|
|
||||||
(int) ntohs(eth->proto),
|
|
||||||
len));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // ALLOW_PACKET_DUMP
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,114 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
//-----------------
|
|
||||||
// DEBUGGING OUTPUT
|
|
||||||
//-----------------
|
|
||||||
|
|
||||||
extern const char *g_LastErrorFilename;
|
|
||||||
extern int g_LastErrorLineNumber;
|
|
||||||
|
|
||||||
// Debug info output
|
|
||||||
#define ALSO_DBGPRINT 1
|
|
||||||
#define DEBUGP_AT_DISPATCH 1
|
|
||||||
|
|
||||||
// Uncomment line below to allow packet dumps
|
|
||||||
//#define ALLOW_PACKET_DUMP 1
|
|
||||||
|
|
||||||
#define NOTE_ERROR() \
|
|
||||||
{ \
|
|
||||||
g_LastErrorFilename = __FILE__; \
|
|
||||||
g_LastErrorLineNumber = __LINE__; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#if DBG
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
unsigned int in;
|
|
||||||
unsigned int out;
|
|
||||||
unsigned int capacity;
|
|
||||||
char *text;
|
|
||||||
BOOLEAN error;
|
|
||||||
MUTEX lock;
|
|
||||||
} DebugOutput;
|
|
||||||
|
|
||||||
VOID MyDebugPrint (const unsigned char* format, ...);
|
|
||||||
|
|
||||||
VOID PrMac (const MACADDR mac);
|
|
||||||
|
|
||||||
VOID PrIP (IPADDR ip_addr);
|
|
||||||
|
|
||||||
#ifdef ALLOW_PACKET_DUMP
|
|
||||||
|
|
||||||
VOID
|
|
||||||
DumpPacket(
|
|
||||||
__in const char *prefix,
|
|
||||||
__in const unsigned char *data,
|
|
||||||
__in unsigned int len
|
|
||||||
);
|
|
||||||
|
|
||||||
DumpPacket2(
|
|
||||||
__in const char *prefix,
|
|
||||||
__in const ETH_HEADER *eth,
|
|
||||||
__in const unsigned char *data,
|
|
||||||
__in unsigned int len
|
|
||||||
);
|
|
||||||
|
|
||||||
#else
|
|
||||||
#define DUMP_PACKET(prefix, data, len)
|
|
||||||
#define DUMP_PACKET2(prefix, eth, data, len)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CAN_WE_PRINT (DEBUGP_AT_DISPATCH || KeGetCurrentIrql () < DISPATCH_LEVEL)
|
|
||||||
|
|
||||||
#if ALSO_DBGPRINT
|
|
||||||
#define DEBUGP(fmt) { MyDebugPrint fmt; if (CAN_WE_PRINT) DbgPrint fmt; }
|
|
||||||
#else
|
|
||||||
#define DEBUGP(fmt) { MyDebugPrint fmt; }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ALLOW_PACKET_DUMP
|
|
||||||
|
|
||||||
#define DUMP_PACKET(prefix, data, len) \
|
|
||||||
DumpPacket (prefix, data, len)
|
|
||||||
|
|
||||||
#define DUMP_PACKET2(prefix, eth, data, len) \
|
|
||||||
DumpPacket2 (prefix, eth, data, len)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
GetDebugLine (
|
|
||||||
__in char *buf,
|
|
||||||
__in const int len
|
|
||||||
);
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define DEBUGP(fmt)
|
|
||||||
#define DUMP_PACKET(prefix, data, len)
|
|
||||||
#define DUMP_PACKET2(prefix, eth, data, len)
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,63 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef HEXDUMP_DEFINED
|
|
||||||
#define HEXDUMP_DEFINED
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//=====================================================================================
|
|
||||||
// Debug Routines
|
|
||||||
//=====================================================================================
|
|
||||||
|
|
||||||
#ifndef NDIS_MINIPORT_DRIVER
|
|
||||||
# include <stdio.h>
|
|
||||||
# include <ctype.h>
|
|
||||||
# include <windows.h>
|
|
||||||
# include <winnt.h>
|
|
||||||
# include <memory.h>
|
|
||||||
|
|
||||||
# ifndef DEBUGP
|
|
||||||
# define DEBUGP(fmt) { DbgMessage fmt; }
|
|
||||||
# endif
|
|
||||||
|
|
||||||
extern VOID (*DbgMessage)(char *p_Format, ...);
|
|
||||||
|
|
||||||
VOID DisplayDebugString (char *p_Format, ...);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//===================================================================================
|
|
||||||
// Reporting / Debugging
|
|
||||||
//===================================================================================
|
|
||||||
#define IfPrint(c) (c >= 32 && c < 127 ? c : '.')
|
|
||||||
|
|
||||||
VOID HexDump (unsigned char *p_Buffer, unsigned long p_Size);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,75 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
volatile long count;
|
|
||||||
} MUTEX;
|
|
||||||
|
|
||||||
#define MUTEX_SLEEP_TIME 10000 // microseconds
|
|
||||||
|
|
||||||
#define INIT_MUTEX(m) { (m)->count = 0; }
|
|
||||||
|
|
||||||
#define ACQUIRE_MUTEX_BLOCKING(m) \
|
|
||||||
{ \
|
|
||||||
while (NdisInterlockedIncrement (&((m)->count)) != 1) \
|
|
||||||
{ \
|
|
||||||
NdisInterlockedDecrement(&((m)->count)); \
|
|
||||||
NdisMSleep(MUTEX_SLEEP_TIME); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define RELEASE_MUTEX(m) \
|
|
||||||
{ \
|
|
||||||
NdisInterlockedDecrement(&((m)->count)); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ACQUIRE_MUTEX_NONBLOCKING(m, result) \
|
|
||||||
{ \
|
|
||||||
if (NdisInterlockedIncrement (&((m)->count)) != 1) \
|
|
||||||
{ \
|
|
||||||
NdisInterlockedDecrement(&((m)->count)); \
|
|
||||||
result = FALSE; \
|
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
result = TRUE; \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define ACQUIRE_MUTEX_ADAPTIVE(m, result) \
|
|
||||||
{ \
|
|
||||||
result = TRUE; \
|
|
||||||
while (NdisInterlockedIncrement (&((m)->count)) != 1) \
|
|
||||||
{ \
|
|
||||||
NdisInterlockedDecrement(&((m)->count)); \
|
|
||||||
if (KeGetCurrentIrql () < DISPATCH_LEVEL) \
|
|
||||||
NdisMSleep(MUTEX_SLEEP_TIME); \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
result = FALSE; \
|
|
||||||
break; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
}
|
|
|
@ -1,164 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "tap.h"
|
|
||||||
|
|
||||||
int
|
|
||||||
HexStringToDecimalInt (const int p_Character)
|
|
||||||
{
|
|
||||||
int l_Value = 0;
|
|
||||||
|
|
||||||
if (p_Character >= 'A' && p_Character <= 'F')
|
|
||||||
l_Value = (p_Character - 'A') + 10;
|
|
||||||
else if (p_Character >= 'a' && p_Character <= 'f')
|
|
||||||
l_Value = (p_Character - 'a') + 10;
|
|
||||||
else if (p_Character >= '0' && p_Character <= '9')
|
|
||||||
l_Value = p_Character - '0';
|
|
||||||
|
|
||||||
return l_Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
ParseMAC (MACADDR dest, const char *src)
|
|
||||||
{
|
|
||||||
int c;
|
|
||||||
int mac_index = 0;
|
|
||||||
BOOLEAN high_digit = FALSE;
|
|
||||||
int delim_action = 1;
|
|
||||||
|
|
||||||
ASSERT (src);
|
|
||||||
ASSERT (dest);
|
|
||||||
|
|
||||||
CLEAR_MAC (dest);
|
|
||||||
|
|
||||||
while (c = *src++)
|
|
||||||
{
|
|
||||||
if (IsMacDelimiter (c))
|
|
||||||
{
|
|
||||||
mac_index += delim_action;
|
|
||||||
high_digit = FALSE;
|
|
||||||
delim_action = 1;
|
|
||||||
}
|
|
||||||
else if (IsHexDigit (c))
|
|
||||||
{
|
|
||||||
const int digit = HexStringToDecimalInt (c);
|
|
||||||
if (mac_index < sizeof (MACADDR))
|
|
||||||
{
|
|
||||||
if (!high_digit)
|
|
||||||
{
|
|
||||||
dest[mac_index] = (char)(digit);
|
|
||||||
high_digit = TRUE;
|
|
||||||
delim_action = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dest[mac_index] = (char)(dest[mac_index] * 16 + digit);
|
|
||||||
++mac_index;
|
|
||||||
high_digit = FALSE;
|
|
||||||
delim_action = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (mac_index + delim_action) >= sizeof (MACADDR);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Generate a MAC using the GUID in the adapter name.
|
|
||||||
*
|
|
||||||
* The mac is constructed as 00:FF:xx:xx:xx:xx where
|
|
||||||
* the Xs are taken from the first 32 bits of the GUID in the
|
|
||||||
* adapter name. This is similar to the Linux 2.4 tap MAC
|
|
||||||
* generator, except linux uses 32 random bits for the Xs.
|
|
||||||
*
|
|
||||||
* In general, this solution is reasonable for most
|
|
||||||
* applications except for very large bridged TAP networks,
|
|
||||||
* where the probability of address collisions becomes more
|
|
||||||
* than infintesimal.
|
|
||||||
*
|
|
||||||
* Using the well-known "birthday paradox", on a 1000 node
|
|
||||||
* network the probability of collision would be
|
|
||||||
* 0.000116292153. On a 10,000 node network, the probability
|
|
||||||
* of collision would be 0.01157288998621678766.
|
|
||||||
*/
|
|
||||||
|
|
||||||
VOID
|
|
||||||
GenerateRandomMac(
|
|
||||||
__in MACADDR mac,
|
|
||||||
__in const unsigned char *adapter_name
|
|
||||||
)
|
|
||||||
{
|
|
||||||
unsigned const char *cp = adapter_name;
|
|
||||||
unsigned char c;
|
|
||||||
unsigned int i = 2;
|
|
||||||
unsigned int byte = 0;
|
|
||||||
int brace = 0;
|
|
||||||
int state = 0;
|
|
||||||
|
|
||||||
CLEAR_MAC (mac);
|
|
||||||
|
|
||||||
mac[0] = 0x00;
|
|
||||||
mac[1] = 0xFF;
|
|
||||||
|
|
||||||
while (c = *cp++)
|
|
||||||
{
|
|
||||||
if (i >= sizeof (MACADDR))
|
|
||||||
break;
|
|
||||||
if (c == '{')
|
|
||||||
brace = 1;
|
|
||||||
if (IsHexDigit (c) && brace)
|
|
||||||
{
|
|
||||||
const unsigned int digit = HexStringToDecimalInt (c);
|
|
||||||
if (state)
|
|
||||||
{
|
|
||||||
byte <<= 4;
|
|
||||||
byte |= digit;
|
|
||||||
mac[i++] = (unsigned char) byte;
|
|
||||||
state = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
byte = digit;
|
|
||||||
state = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
GenerateRelatedMAC(
|
|
||||||
__in MACADDR dest,
|
|
||||||
__in const MACADDR src,
|
|
||||||
__in const int delta
|
|
||||||
)
|
|
||||||
{
|
|
||||||
ETH_COPY_NETWORK_ADDRESS (dest, src);
|
|
||||||
dest[2] += (UCHAR) delta;
|
|
||||||
}
|
|
|
@ -1,53 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MacInfoDefined
|
|
||||||
#define MacInfoDefined
|
|
||||||
|
|
||||||
//===================================================================================
|
|
||||||
// Macros
|
|
||||||
//===================================================================================
|
|
||||||
#define IsMacDelimiter(a) (a == ':' || a == '-' || a == '.')
|
|
||||||
#define IsHexDigit(c) ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'))
|
|
||||||
|
|
||||||
#define CLEAR_MAC(dest) NdisZeroMemory ((dest), sizeof (MACADDR))
|
|
||||||
#define MAC_EQUAL(a,b) (memcmp ((a), (b), sizeof (MACADDR)) == 0)
|
|
||||||
|
|
||||||
BOOLEAN
|
|
||||||
ParseMAC (MACADDR dest, const char *src);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
GenerateRandomMac(
|
|
||||||
__in MACADDR mac,
|
|
||||||
__in const unsigned char *adapter_name
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
GenerateRelatedMAC(
|
|
||||||
__in MACADDR dest,
|
|
||||||
__in const MACADDR src,
|
|
||||||
__in const int delta
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,401 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
//------------------
|
|
||||||
// Memory Management
|
|
||||||
//------------------
|
|
||||||
|
|
||||||
#include "tap.h"
|
|
||||||
|
|
||||||
PVOID
|
|
||||||
MemAlloc(
|
|
||||||
__in ULONG p_Size,
|
|
||||||
__in BOOLEAN zero
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PVOID l_Return = NULL;
|
|
||||||
|
|
||||||
if (p_Size)
|
|
||||||
{
|
|
||||||
__try
|
|
||||||
{
|
|
||||||
if (NdisAllocateMemoryWithTag (&l_Return, p_Size, 'APAT')
|
|
||||||
== NDIS_STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
if (zero)
|
|
||||||
{
|
|
||||||
NdisZeroMemory (l_Return, p_Size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
l_Return = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
__except (EXCEPTION_EXECUTE_HANDLER)
|
|
||||||
{
|
|
||||||
l_Return = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return l_Return;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
MemFree(
|
|
||||||
__in PVOID p_Addr,
|
|
||||||
__in ULONG p_Size
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (p_Addr && p_Size)
|
|
||||||
{
|
|
||||||
__try
|
|
||||||
{
|
|
||||||
#if DBG
|
|
||||||
NdisZeroMemory (p_Addr, p_Size);
|
|
||||||
#endif
|
|
||||||
NdisFreeMemory (p_Addr, p_Size, 0);
|
|
||||||
}
|
|
||||||
__except (EXCEPTION_EXECUTE_HANDLER)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//======================================================================
|
|
||||||
// TAP Packet Queue Support
|
|
||||||
//======================================================================
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapPacketQueueInsertTail(
|
|
||||||
__in PTAP_PACKET_QUEUE TapPacketQueue,
|
|
||||||
__in PTAP_PACKET TapPacket
|
|
||||||
)
|
|
||||||
{
|
|
||||||
KIRQL irql;
|
|
||||||
|
|
||||||
KeAcquireSpinLock(&TapPacketQueue->QueueLock,&irql);
|
|
||||||
|
|
||||||
InsertTailList(&TapPacketQueue->Queue,&TapPacket->QueueLink);
|
|
||||||
|
|
||||||
// BUGBUG!!! Enforce PACKET_QUEUE_SIZE queue count limit???
|
|
||||||
// For NDIS 6 there is no per-packet status, so this will need to
|
|
||||||
// be handled on per-NBL basis in AdapterSendNetBufferLists...
|
|
||||||
|
|
||||||
// Update counts
|
|
||||||
++TapPacketQueue->Count;
|
|
||||||
|
|
||||||
if(TapPacketQueue->Count > TapPacketQueue->MaxCount)
|
|
||||||
{
|
|
||||||
TapPacketQueue->MaxCount = TapPacketQueue->Count;
|
|
||||||
|
|
||||||
DEBUGP (("[TAP] tapPacketQueueInsertTail: New MAX queued packet count = %d\n",
|
|
||||||
TapPacketQueue->MaxCount));
|
|
||||||
}
|
|
||||||
|
|
||||||
KeReleaseSpinLock(&TapPacketQueue->QueueLock,irql);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Call with QueueLock held
|
|
||||||
PTAP_PACKET
|
|
||||||
tapPacketRemoveHeadLocked(
|
|
||||||
__in PTAP_PACKET_QUEUE TapPacketQueue
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PTAP_PACKET tapPacket = NULL;
|
|
||||||
PLIST_ENTRY listEntry;
|
|
||||||
|
|
||||||
listEntry = RemoveHeadList(&TapPacketQueue->Queue);
|
|
||||||
|
|
||||||
if(listEntry != &TapPacketQueue->Queue)
|
|
||||||
{
|
|
||||||
tapPacket = CONTAINING_RECORD(listEntry, TAP_PACKET, QueueLink);
|
|
||||||
|
|
||||||
// Update counts
|
|
||||||
--TapPacketQueue->Count;
|
|
||||||
}
|
|
||||||
|
|
||||||
return tapPacket;
|
|
||||||
}
|
|
||||||
|
|
||||||
PTAP_PACKET
|
|
||||||
tapPacketRemoveHead(
|
|
||||||
__in PTAP_PACKET_QUEUE TapPacketQueue
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PTAP_PACKET tapPacket = NULL;
|
|
||||||
KIRQL irql;
|
|
||||||
|
|
||||||
KeAcquireSpinLock(&TapPacketQueue->QueueLock,&irql);
|
|
||||||
|
|
||||||
tapPacket = tapPacketRemoveHeadLocked(TapPacketQueue);
|
|
||||||
|
|
||||||
KeReleaseSpinLock(&TapPacketQueue->QueueLock,irql);
|
|
||||||
|
|
||||||
return tapPacket;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapPacketQueueInitialize(
|
|
||||||
__in PTAP_PACKET_QUEUE TapPacketQueue
|
|
||||||
)
|
|
||||||
{
|
|
||||||
KeInitializeSpinLock(&TapPacketQueue->QueueLock);
|
|
||||||
|
|
||||||
NdisInitializeListHead(&TapPacketQueue->Queue);
|
|
||||||
}
|
|
||||||
|
|
||||||
//======================================================================
|
|
||||||
// TAP Cancel-Safe Queue Support
|
|
||||||
//======================================================================
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapIrpCsqInsert (
|
|
||||||
__in struct _IO_CSQ *Csq,
|
|
||||||
__in PIRP Irp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PTAP_IRP_CSQ tapIrpCsq;
|
|
||||||
|
|
||||||
tapIrpCsq = (PTAP_IRP_CSQ )Csq;
|
|
||||||
|
|
||||||
InsertTailList(
|
|
||||||
&tapIrpCsq->Queue,
|
|
||||||
&Irp->Tail.Overlay.ListEntry
|
|
||||||
);
|
|
||||||
|
|
||||||
// Update counts
|
|
||||||
++tapIrpCsq->Count;
|
|
||||||
|
|
||||||
if(tapIrpCsq->Count > tapIrpCsq->MaxCount)
|
|
||||||
{
|
|
||||||
tapIrpCsq->MaxCount = tapIrpCsq->Count;
|
|
||||||
|
|
||||||
DEBUGP (("[TAP] tapIrpCsqInsert: New MAX queued IRP count = %d\n",
|
|
||||||
tapIrpCsq->MaxCount));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapIrpCsqRemoveIrp(
|
|
||||||
__in PIO_CSQ Csq,
|
|
||||||
__in PIRP Irp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PTAP_IRP_CSQ tapIrpCsq;
|
|
||||||
|
|
||||||
tapIrpCsq = (PTAP_IRP_CSQ )Csq;
|
|
||||||
|
|
||||||
// Update counts
|
|
||||||
--tapIrpCsq->Count;
|
|
||||||
|
|
||||||
RemoveEntryList(&Irp->Tail.Overlay.ListEntry);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
PIRP
|
|
||||||
tapIrpCsqPeekNextIrp(
|
|
||||||
__in PIO_CSQ Csq,
|
|
||||||
__in PIRP Irp,
|
|
||||||
__in PVOID PeekContext
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PTAP_IRP_CSQ tapIrpCsq;
|
|
||||||
PIRP nextIrp = NULL;
|
|
||||||
PLIST_ENTRY nextEntry;
|
|
||||||
PLIST_ENTRY listHead;
|
|
||||||
PIO_STACK_LOCATION irpStack;
|
|
||||||
|
|
||||||
tapIrpCsq = (PTAP_IRP_CSQ )Csq;
|
|
||||||
|
|
||||||
listHead = &tapIrpCsq->Queue;
|
|
||||||
|
|
||||||
//
|
|
||||||
// If the IRP is NULL, we will start peeking from the listhead, else
|
|
||||||
// we will start from that IRP onwards. This is done under the
|
|
||||||
// assumption that new IRPs are always inserted at the tail.
|
|
||||||
//
|
|
||||||
|
|
||||||
if (Irp == NULL)
|
|
||||||
{
|
|
||||||
nextEntry = listHead->Flink;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
nextEntry = Irp->Tail.Overlay.ListEntry.Flink;
|
|
||||||
}
|
|
||||||
|
|
||||||
while(nextEntry != listHead)
|
|
||||||
{
|
|
||||||
nextIrp = CONTAINING_RECORD(nextEntry, IRP, Tail.Overlay.ListEntry);
|
|
||||||
|
|
||||||
irpStack = IoGetCurrentIrpStackLocation(nextIrp);
|
|
||||||
|
|
||||||
//
|
|
||||||
// If context is present, continue until you find a matching one.
|
|
||||||
// Else you break out as you got next one.
|
|
||||||
//
|
|
||||||
if (PeekContext)
|
|
||||||
{
|
|
||||||
if (irpStack->FileObject == (PFILE_OBJECT) PeekContext)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
nextIrp = NULL;
|
|
||||||
nextEntry = nextEntry->Flink;
|
|
||||||
}
|
|
||||||
|
|
||||||
return nextIrp;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// tapIrpCsqAcquireQueueLock modifies the execution level of the current processor.
|
|
||||||
//
|
|
||||||
// KeAcquireSpinLock raises the execution level to Dispatch Level and stores
|
|
||||||
// the current execution level in the Irql parameter to be restored at a later
|
|
||||||
// time. KeAcqurieSpinLock also requires us to be running at no higher than
|
|
||||||
// Dispatch level when it is called.
|
|
||||||
//
|
|
||||||
// The annotations reflect these changes and requirments.
|
|
||||||
//
|
|
||||||
|
|
||||||
__drv_raisesIRQL(DISPATCH_LEVEL)
|
|
||||||
__drv_maxIRQL(DISPATCH_LEVEL)
|
|
||||||
VOID
|
|
||||||
tapIrpCsqAcquireQueueLock(
|
|
||||||
__in PIO_CSQ Csq,
|
|
||||||
__out PKIRQL Irql
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PTAP_IRP_CSQ tapIrpCsq;
|
|
||||||
|
|
||||||
tapIrpCsq = (PTAP_IRP_CSQ )Csq;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Suppressing because the address below csq is valid since it's
|
|
||||||
// part of TAP_ADAPTER_CONTEXT structure.
|
|
||||||
//
|
|
||||||
#pragma prefast(suppress: __WARNING_BUFFER_UNDERFLOW, "Underflow using expression 'adapter->PendingReadCsqQueueLock'")
|
|
||||||
KeAcquireSpinLock(&tapIrpCsq->QueueLock, Irql);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// tapIrpCsqReleaseQueueLock modifies the execution level of the current processor.
|
|
||||||
//
|
|
||||||
// KeReleaseSpinLock assumes we already hold the spin lock and are therefore
|
|
||||||
// running at Dispatch level. It will use the Irql parameter saved in a
|
|
||||||
// previous call to KeAcquireSpinLock to return the thread back to it's original
|
|
||||||
// execution level.
|
|
||||||
//
|
|
||||||
// The annotations reflect these changes and requirments.
|
|
||||||
//
|
|
||||||
|
|
||||||
__drv_requiresIRQL(DISPATCH_LEVEL)
|
|
||||||
VOID
|
|
||||||
tapIrpCsqReleaseQueueLock(
|
|
||||||
__in PIO_CSQ Csq,
|
|
||||||
__in KIRQL Irql
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PTAP_IRP_CSQ tapIrpCsq;
|
|
||||||
|
|
||||||
tapIrpCsq = (PTAP_IRP_CSQ )Csq;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Suppressing because the address below csq is valid since it's
|
|
||||||
// part of TAP_ADAPTER_CONTEXT structure.
|
|
||||||
//
|
|
||||||
#pragma prefast(suppress: __WARNING_BUFFER_UNDERFLOW, "Underflow using expression 'adapter->PendingReadCsqQueueLock'")
|
|
||||||
KeReleaseSpinLock(&tapIrpCsq->QueueLock, Irql);
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapIrpCsqCompleteCanceledIrp(
|
|
||||||
__in PIO_CSQ pCsq,
|
|
||||||
__in PIRP Irp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
UNREFERENCED_PARAMETER(pCsq);
|
|
||||||
|
|
||||||
Irp->IoStatus.Status = STATUS_CANCELLED;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapIrpCsqInitialize(
|
|
||||||
__in PTAP_IRP_CSQ TapIrpCsq
|
|
||||||
)
|
|
||||||
{
|
|
||||||
KeInitializeSpinLock(&TapIrpCsq->QueueLock);
|
|
||||||
|
|
||||||
NdisInitializeListHead(&TapIrpCsq->Queue);
|
|
||||||
|
|
||||||
IoCsqInitialize(
|
|
||||||
&TapIrpCsq->CsqQueue,
|
|
||||||
tapIrpCsqInsert,
|
|
||||||
tapIrpCsqRemoveIrp,
|
|
||||||
tapIrpCsqPeekNextIrp,
|
|
||||||
tapIrpCsqAcquireQueueLock,
|
|
||||||
tapIrpCsqReleaseQueueLock,
|
|
||||||
tapIrpCsqCompleteCanceledIrp
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapIrpCsqFlush(
|
|
||||||
__in PTAP_IRP_CSQ TapIrpCsq
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PIRP pendingIrp;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Flush the pending read IRP queue.
|
|
||||||
//
|
|
||||||
pendingIrp = IoCsqRemoveNextIrp(
|
|
||||||
&TapIrpCsq->CsqQueue,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
while(pendingIrp)
|
|
||||||
{
|
|
||||||
// Cancel the IRP
|
|
||||||
pendingIrp->IoStatus.Information = 0;
|
|
||||||
pendingIrp->IoStatus.Status = STATUS_CANCELLED;
|
|
||||||
IoCompleteRequest(pendingIrp, IO_NO_INCREMENT);
|
|
||||||
|
|
||||||
pendingIrp = IoCsqRemoveNextIrp(
|
|
||||||
&TapIrpCsq->CsqQueue,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT(IsListEmpty(&TapIrpCsq->Queue));
|
|
||||||
}
|
|
|
@ -1,113 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
//------------------
|
|
||||||
// Memory Management
|
|
||||||
//------------------
|
|
||||||
|
|
||||||
PVOID
|
|
||||||
MemAlloc(
|
|
||||||
__in ULONG p_Size,
|
|
||||||
__in BOOLEAN zero
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
MemFree(
|
|
||||||
__in PVOID p_Addr,
|
|
||||||
__in ULONG p_Size
|
|
||||||
);
|
|
||||||
|
|
||||||
//======================================================================
|
|
||||||
// TAP Packet Queue
|
|
||||||
//======================================================================
|
|
||||||
|
|
||||||
typedef
|
|
||||||
struct _TAP_PACKET
|
|
||||||
{
|
|
||||||
LIST_ENTRY QueueLink;
|
|
||||||
|
|
||||||
# define TAP_PACKET_SIZE(data_size) (sizeof (TAP_PACKET) + (data_size))
|
|
||||||
# define TP_TUN 0x80000000
|
|
||||||
# define TP_SIZE_MASK (~TP_TUN)
|
|
||||||
ULONG m_SizeFlags;
|
|
||||||
|
|
||||||
// m_Data must be the last struct member
|
|
||||||
UCHAR m_Data [];
|
|
||||||
} TAP_PACKET, *PTAP_PACKET;
|
|
||||||
|
|
||||||
#define TAP_PACKET_TAG '6PAT' // "TAP6"
|
|
||||||
|
|
||||||
typedef struct _TAP_PACKET_QUEUE
|
|
||||||
{
|
|
||||||
KSPIN_LOCK QueueLock;
|
|
||||||
LIST_ENTRY Queue;
|
|
||||||
ULONG Count; // Count of currently queued items
|
|
||||||
ULONG MaxCount;
|
|
||||||
} TAP_PACKET_QUEUE, *PTAP_PACKET_QUEUE;
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapPacketQueueInsertTail(
|
|
||||||
__in PTAP_PACKET_QUEUE TapPacketQueue,
|
|
||||||
__in PTAP_PACKET TapPacket
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Call with QueueLock held
|
|
||||||
PTAP_PACKET
|
|
||||||
tapPacketRemoveHeadLocked(
|
|
||||||
__in PTAP_PACKET_QUEUE TapPacketQueue
|
|
||||||
);
|
|
||||||
|
|
||||||
PTAP_PACKET
|
|
||||||
tapPacketRemoveHead(
|
|
||||||
__in PTAP_PACKET_QUEUE TapPacketQueue
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapPacketQueueInitialize(
|
|
||||||
__in PTAP_PACKET_QUEUE TapPacketQueue
|
|
||||||
);
|
|
||||||
|
|
||||||
//----------------------
|
|
||||||
// Cancel-Safe IRP Queue
|
|
||||||
//----------------------
|
|
||||||
|
|
||||||
typedef struct _TAP_IRP_CSQ
|
|
||||||
{
|
|
||||||
IO_CSQ CsqQueue;
|
|
||||||
KSPIN_LOCK QueueLock;
|
|
||||||
LIST_ENTRY Queue;
|
|
||||||
ULONG Count; // Count of currently queued items
|
|
||||||
ULONG MaxCount;
|
|
||||||
} TAP_IRP_CSQ, *PTAP_IRP_CSQ;
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapIrpCsqInitialize(
|
|
||||||
__in PTAP_IRP_CSQ TapIrpCsq
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapIrpCsqFlush(
|
|
||||||
__in PTAP_IRP_CSQ TapIrpCsq
|
|
||||||
);
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,224 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
//============================================================
|
|
||||||
// MAC address, Ethernet header, and ARP
|
|
||||||
//============================================================
|
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
|
|
||||||
#define IP_HEADER_SIZE 20
|
|
||||||
#define IPV6_HEADER_SIZE 40
|
|
||||||
|
|
||||||
#define MACADDR_SIZE 6
|
|
||||||
typedef unsigned char MACADDR[MACADDR_SIZE];
|
|
||||||
|
|
||||||
typedef unsigned long IPADDR;
|
|
||||||
typedef unsigned char IPV6ADDR[16];
|
|
||||||
|
|
||||||
//-----------------
|
|
||||||
// Ethernet address
|
|
||||||
//-----------------
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
MACADDR addr;
|
|
||||||
} ETH_ADDR;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
ETH_ADDR list[TAP_MAX_MCAST_LIST];
|
|
||||||
} MC_LIST;
|
|
||||||
|
|
||||||
|
|
||||||
// BUGBUG!!! Consider using ststem defines in netiodef.h!!!
|
|
||||||
|
|
||||||
//----------------
|
|
||||||
// Ethernet header
|
|
||||||
//----------------
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
MACADDR dest; /* destination eth addr */
|
|
||||||
MACADDR src; /* source ether addr */
|
|
||||||
USHORT proto; /* packet type ID field */
|
|
||||||
} ETH_HEADER, *PETH_HEADER;
|
|
||||||
|
|
||||||
//----------------
|
|
||||||
// ARP packet
|
|
||||||
//----------------
|
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
MACADDR m_MAC_Destination; // Reverse these two
|
|
||||||
MACADDR m_MAC_Source; // to answer ARP requests
|
|
||||||
USHORT m_Proto; // 0x0806
|
|
||||||
|
|
||||||
# define MAC_ADDR_TYPE 0x0001
|
|
||||||
USHORT m_MAC_AddressType; // 0x0001
|
|
||||||
|
|
||||||
USHORT m_PROTO_AddressType; // 0x0800
|
|
||||||
UCHAR m_MAC_AddressSize; // 0x06
|
|
||||||
UCHAR m_PROTO_AddressSize; // 0x04
|
|
||||||
|
|
||||||
# define ARP_REQUEST 0x0001
|
|
||||||
# define ARP_REPLY 0x0002
|
|
||||||
USHORT m_ARP_Operation; // 0x0001 for ARP request, 0x0002 for ARP reply
|
|
||||||
|
|
||||||
MACADDR m_ARP_MAC_Source;
|
|
||||||
IPADDR m_ARP_IP_Source;
|
|
||||||
MACADDR m_ARP_MAC_Destination;
|
|
||||||
IPADDR m_ARP_IP_Destination;
|
|
||||||
}
|
|
||||||
ARP_PACKET, *PARP_PACKET;
|
|
||||||
|
|
||||||
//----------
|
|
||||||
// IP Header
|
|
||||||
//----------
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
# define IPH_GET_VER(v) (((v) >> 4) & 0x0F)
|
|
||||||
# define IPH_GET_LEN(v) (((v) & 0x0F) << 2)
|
|
||||||
UCHAR version_len;
|
|
||||||
|
|
||||||
UCHAR tos;
|
|
||||||
USHORT tot_len;
|
|
||||||
USHORT id;
|
|
||||||
|
|
||||||
# define IP_OFFMASK 0x1fff
|
|
||||||
USHORT frag_off;
|
|
||||||
|
|
||||||
UCHAR ttl;
|
|
||||||
|
|
||||||
# define IPPROTO_UDP 17 /* UDP protocol */
|
|
||||||
# define IPPROTO_TCP 6 /* TCP protocol */
|
|
||||||
# define IPPROTO_ICMP 1 /* ICMP protocol */
|
|
||||||
# define IPPROTO_IGMP 2 /* IGMP protocol */
|
|
||||||
UCHAR protocol;
|
|
||||||
|
|
||||||
USHORT check;
|
|
||||||
ULONG saddr;
|
|
||||||
ULONG daddr;
|
|
||||||
/* The options start here. */
|
|
||||||
} IPHDR;
|
|
||||||
|
|
||||||
//-----------
|
|
||||||
// UDP header
|
|
||||||
//-----------
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
USHORT source;
|
|
||||||
USHORT dest;
|
|
||||||
USHORT len;
|
|
||||||
USHORT check;
|
|
||||||
} UDPHDR;
|
|
||||||
|
|
||||||
//--------------------------
|
|
||||||
// TCP header, per RFC 793.
|
|
||||||
//--------------------------
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
USHORT source; /* source port */
|
|
||||||
USHORT dest; /* destination port */
|
|
||||||
ULONG seq; /* sequence number */
|
|
||||||
ULONG ack_seq; /* acknowledgement number */
|
|
||||||
|
|
||||||
# define TCPH_GET_DOFF(d) (((d) & 0xF0) >> 2)
|
|
||||||
UCHAR doff_res;
|
|
||||||
|
|
||||||
# define TCPH_FIN_MASK (1<<0)
|
|
||||||
# define TCPH_SYN_MASK (1<<1)
|
|
||||||
# define TCPH_RST_MASK (1<<2)
|
|
||||||
# define TCPH_PSH_MASK (1<<3)
|
|
||||||
# define TCPH_ACK_MASK (1<<4)
|
|
||||||
# define TCPH_URG_MASK (1<<5)
|
|
||||||
# define TCPH_ECE_MASK (1<<6)
|
|
||||||
# define TCPH_CWR_MASK (1<<7)
|
|
||||||
UCHAR flags;
|
|
||||||
|
|
||||||
USHORT window;
|
|
||||||
USHORT check;
|
|
||||||
USHORT urg_ptr;
|
|
||||||
} TCPHDR;
|
|
||||||
|
|
||||||
#define TCPOPT_EOL 0
|
|
||||||
#define TCPOPT_NOP 1
|
|
||||||
#define TCPOPT_MAXSEG 2
|
|
||||||
#define TCPOLEN_MAXSEG 4
|
|
||||||
|
|
||||||
//------------
|
|
||||||
// IPv6 Header
|
|
||||||
//------------
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
UCHAR version_prio;
|
|
||||||
UCHAR flow_lbl[3];
|
|
||||||
USHORT payload_len;
|
|
||||||
# define IPPROTO_ICMPV6 0x3a /* ICMP protocol v6 */
|
|
||||||
UCHAR nexthdr;
|
|
||||||
UCHAR hop_limit;
|
|
||||||
IPV6ADDR saddr;
|
|
||||||
IPV6ADDR daddr;
|
|
||||||
} IPV6HDR;
|
|
||||||
|
|
||||||
//--------------------------------------------
|
|
||||||
// IPCMPv6 NS/NA Packets (RFC4443 and RFC4861)
|
|
||||||
//--------------------------------------------
|
|
||||||
|
|
||||||
// Neighbor Solictiation - RFC 4861, 4.3
|
|
||||||
// (this is just the ICMPv6 part of the packet)
|
|
||||||
typedef struct {
|
|
||||||
UCHAR type;
|
|
||||||
# define ICMPV6_TYPE_NS 135 // neighbour solicitation
|
|
||||||
UCHAR code;
|
|
||||||
# define ICMPV6_CODE_0 0 // no specific sub-code for NS/NA
|
|
||||||
USHORT checksum;
|
|
||||||
ULONG reserved;
|
|
||||||
IPV6ADDR target_addr;
|
|
||||||
} ICMPV6_NS;
|
|
||||||
|
|
||||||
// Neighbor Advertisement - RFC 4861, 4.4 + 4.6/4.6.1
|
|
||||||
// (this is just the ICMPv6 payload)
|
|
||||||
typedef struct {
|
|
||||||
UCHAR type;
|
|
||||||
# define ICMPV6_TYPE_NA 136 // neighbour advertisement
|
|
||||||
UCHAR code;
|
|
||||||
# define ICMPV6_CODE_0 0 // no specific sub-code for NS/NA
|
|
||||||
USHORT checksum;
|
|
||||||
UCHAR rso_bits; // Router(0), Solicited(2), Ovrrd(4)
|
|
||||||
UCHAR reserved[3];
|
|
||||||
IPV6ADDR target_addr;
|
|
||||||
// always include "Target Link-layer Address" option (RFC 4861 4.6.1)
|
|
||||||
UCHAR opt_type;
|
|
||||||
#define ICMPV6_OPTION_TLLA 2
|
|
||||||
UCHAR opt_length;
|
|
||||||
#define ICMPV6_LENGTH_TLLA 1 // multiplied by 8 -> 1 = 8 bytes
|
|
||||||
MACADDR target_macaddr;
|
|
||||||
} ICMPV6_NA;
|
|
||||||
|
|
||||||
// this is the complete packet with Ethernet and IPv6 headers
|
|
||||||
typedef struct {
|
|
||||||
ETH_HEADER eth;
|
|
||||||
IPV6HDR ipv6;
|
|
||||||
ICMPV6_NA icmpv6;
|
|
||||||
} ICMPV6_NA_PKT;
|
|
||||||
|
|
||||||
#pragma pack()
|
|
|
@ -1,91 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef TAP_PROTOTYPES_DEFINED
|
|
||||||
#define TAP_PROTOTYPES_DEFINED
|
|
||||||
|
|
||||||
DRIVER_INITIALIZE DriverEntry;
|
|
||||||
|
|
||||||
//VOID AdapterFreeResources
|
|
||||||
// (
|
|
||||||
// TapAdapterPointer p_Adapter
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
//NTSTATUS TapDeviceHook
|
|
||||||
// (
|
|
||||||
// IN PDEVICE_OBJECT p_DeviceObject,
|
|
||||||
// IN PIRP p_IRP
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
|
|
||||||
NDIS_STATUS
|
|
||||||
CreateTapDevice(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
DestroyTapDevice(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter
|
|
||||||
);
|
|
||||||
|
|
||||||
// Flush the pending send TAP packet queue.
|
|
||||||
VOID
|
|
||||||
tapFlushSendPacketQueue(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter
|
|
||||||
);
|
|
||||||
|
|
||||||
VOID
|
|
||||||
IndicateReceivePacket(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter,
|
|
||||||
__in PUCHAR packetData,
|
|
||||||
__in const unsigned int packetLength
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
BOOLEAN
|
|
||||||
ProcessDHCP(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter,
|
|
||||||
__in const ETH_HEADER *eth,
|
|
||||||
__in const IPHDR *ip,
|
|
||||||
__in const UDPHDR *udp,
|
|
||||||
__in const DHCP *dhcp,
|
|
||||||
__in int optlen
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
BOOLEAN
|
|
||||||
ProcessARP(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter,
|
|
||||||
__in const PARP_PACKET src,
|
|
||||||
__in const IPADDR adapter_ip,
|
|
||||||
__in const IPADDR ip_network,
|
|
||||||
__in const IPADDR ip_netmask,
|
|
||||||
__in const MACADDR mac
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
|
|
||||||
#endif
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,88 +0,0 @@
|
||||||
// Microsoft Visual C++ generated resource script.
|
|
||||||
//
|
|
||||||
#include "resource.h"
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
// English (United States) resources
|
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|
||||||
#pragma code_page(1252)
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Version
|
|
||||||
//
|
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
|
||||||
FILEVERSION 3,0,0,0
|
|
||||||
PRODUCTVERSION 3,0,0,0
|
|
||||||
FILEFLAGSMASK 0x3fL
|
|
||||||
#ifdef _DEBUG
|
|
||||||
FILEFLAGS 0x9L
|
|
||||||
#else
|
|
||||||
FILEFLAGS 0x8L
|
|
||||||
#endif
|
|
||||||
FILEOS 0x40004L
|
|
||||||
FILETYPE 0x3L
|
|
||||||
FILESUBTYPE 0x6L
|
|
||||||
BEGIN
|
|
||||||
BLOCK "StringFileInfo"
|
|
||||||
BEGIN
|
|
||||||
BLOCK "040904b0"
|
|
||||||
BEGIN
|
|
||||||
VALUE "CompanyName", "ZeroTier Networks LLC"
|
|
||||||
VALUE "FileDescription", "ZeroTier One Virtual Network Port"
|
|
||||||
VALUE "FileVersion", "3.0.0 3/0"
|
|
||||||
VALUE "InternalName", "zttap300.sys"
|
|
||||||
VALUE "LegalCopyright", "ZeroTier, Inc., OpenVPN Technologies, Inc."
|
|
||||||
VALUE "OriginalFilename", "zttap300.sys"
|
|
||||||
VALUE "ProductName", "ZeroTier One Virtual Network Port"
|
|
||||||
VALUE "ProductVersion", "3.0.0 3/0"
|
|
||||||
END
|
|
||||||
END
|
|
||||||
BLOCK "VarFileInfo"
|
|
||||||
BEGIN
|
|
||||||
VALUE "Translation", 0x409, 1200
|
|
||||||
END
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// TEXTINCLUDE
|
|
||||||
//
|
|
||||||
|
|
||||||
1 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"resource.h\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
2 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
3 TEXTINCLUDE
|
|
||||||
BEGIN
|
|
||||||
"\r\n"
|
|
||||||
"\0"
|
|
||||||
END
|
|
||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
|
||||||
|
|
||||||
#endif // English (United States) resources
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef APSTUDIO_INVOKED
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 3 resource.
|
|
||||||
//
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#endif // not APSTUDIO_INVOKED
|
|
||||||
|
|
|
@ -1,669 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
//
|
|
||||||
// Include files.
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "tap.h"
|
|
||||||
|
|
||||||
//======================================================================
|
|
||||||
// TAP Receive Path Support
|
|
||||||
//======================================================================
|
|
||||||
|
|
||||||
#ifdef ALLOC_PRAGMA
|
|
||||||
#pragma alloc_text( PAGE, TapDeviceWrite)
|
|
||||||
#endif // ALLOC_PRAGMA
|
|
||||||
|
|
||||||
//===============================================================
|
|
||||||
// Used in cases where internally generated packets such as
|
|
||||||
// ARP or DHCP replies must be returned to the kernel, to be
|
|
||||||
// seen as an incoming packet "arriving" on the interface.
|
|
||||||
//===============================================================
|
|
||||||
|
|
||||||
VOID
|
|
||||||
IndicateReceivePacket(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter,
|
|
||||||
__in PUCHAR packetData,
|
|
||||||
__in const unsigned int packetLength
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PUCHAR injectBuffer;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Handle miniport Pause
|
|
||||||
// ---------------------
|
|
||||||
// NDIS 6 miniports implement a temporary "Pause" state normally followed
|
|
||||||
// by the Restart. While in the Pause state it is forbidden for the miniport
|
|
||||||
// to indicate receive NBLs.
|
|
||||||
//
|
|
||||||
// That is: The device interface may be "up", but the NDIS miniport send/receive
|
|
||||||
// interface may be temporarily "down".
|
|
||||||
//
|
|
||||||
// BUGBUG!!! In the initial implementation of the NDIS 6 TapOas inject path
|
|
||||||
// the code below will simply ignore inject packets passed to the driver while
|
|
||||||
// the miniport is in the Paused state.
|
|
||||||
//
|
|
||||||
// The correct implementation is to go ahead and build the NBLs corresponding
|
|
||||||
// to the inject packet - but queue them. When Restart is entered the
|
|
||||||
// queued NBLs would be dequeued and indicated to the host.
|
|
||||||
//
|
|
||||||
if(tapAdapterSendAndReceiveReady(Adapter) != NDIS_STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
DEBUGP (("[%s] Lying send in IndicateReceivePacket while adapter paused\n",
|
|
||||||
MINIPORT_INSTANCE_ID (Adapter)));
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Allocate flat buffer for packet data.
|
|
||||||
injectBuffer = (PUCHAR )NdisAllocateMemoryWithTagPriority(
|
|
||||||
Adapter->MiniportAdapterHandle,
|
|
||||||
packetLength,
|
|
||||||
TAP_RX_INJECT_BUFFER_TAG,
|
|
||||||
NormalPoolPriority
|
|
||||||
);
|
|
||||||
|
|
||||||
if( injectBuffer)
|
|
||||||
{
|
|
||||||
PMDL mdl;
|
|
||||||
|
|
||||||
// Copy packet data to flat buffer.
|
|
||||||
NdisMoveMemory (injectBuffer, packetData, packetLength);
|
|
||||||
|
|
||||||
// Allocate MDL for flat buffer.
|
|
||||||
mdl = NdisAllocateMdl(
|
|
||||||
Adapter->MiniportAdapterHandle,
|
|
||||||
injectBuffer,
|
|
||||||
packetLength
|
|
||||||
);
|
|
||||||
|
|
||||||
if( mdl )
|
|
||||||
{
|
|
||||||
PNET_BUFFER_LIST netBufferList;
|
|
||||||
|
|
||||||
mdl->Next = NULL; // No next MDL
|
|
||||||
|
|
||||||
// Allocate the NBL and NB. Link MDL chain to NB.
|
|
||||||
netBufferList = NdisAllocateNetBufferAndNetBufferList(
|
|
||||||
Adapter->ReceiveNblPool,
|
|
||||||
0, // ContextSize
|
|
||||||
0, // ContextBackFill
|
|
||||||
mdl, // MDL chain
|
|
||||||
0,
|
|
||||||
packetLength
|
|
||||||
);
|
|
||||||
|
|
||||||
if(netBufferList != NULL)
|
|
||||||
{
|
|
||||||
ULONG receiveFlags = 0;
|
|
||||||
LONG nblCount;
|
|
||||||
|
|
||||||
NET_BUFFER_LIST_NEXT_NBL(netBufferList) = NULL; // Only one NBL
|
|
||||||
|
|
||||||
if(KeGetCurrentIrql() == DISPATCH_LEVEL)
|
|
||||||
{
|
|
||||||
receiveFlags |= NDIS_RECEIVE_FLAGS_DISPATCH_LEVEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set flag indicating that this is an injected packet
|
|
||||||
TAP_RX_NBL_FLAGS_CLEAR_ALL(netBufferList);
|
|
||||||
TAP_RX_NBL_FLAG_SET(netBufferList,TAP_RX_NBL_FLAGS_IS_INJECTED);
|
|
||||||
|
|
||||||
netBufferList->MiniportReserved[0] = NULL;
|
|
||||||
netBufferList->MiniportReserved[1] = NULL;
|
|
||||||
|
|
||||||
// Increment in-flight receive NBL count.
|
|
||||||
nblCount = NdisInterlockedIncrement(&Adapter->ReceiveNblInFlightCount);
|
|
||||||
ASSERT(nblCount > 0 );
|
|
||||||
|
|
||||||
netBufferList->SourceHandle = Adapter->MiniportAdapterHandle;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Indicate the packet
|
|
||||||
// -------------------
|
|
||||||
// Irp->AssociatedIrp.SystemBuffer with length irpSp->Parameters.Write.Length
|
|
||||||
// contains the complete packet including Ethernet header and payload.
|
|
||||||
//
|
|
||||||
NdisMIndicateReceiveNetBufferLists(
|
|
||||||
Adapter->MiniportAdapterHandle,
|
|
||||||
netBufferList,
|
|
||||||
NDIS_DEFAULT_PORT_NUMBER,
|
|
||||||
1, // NumberOfNetBufferLists
|
|
||||||
receiveFlags
|
|
||||||
);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUGP (("[%s] NdisAllocateNetBufferAndNetBufferList failed in IndicateReceivePacket\n",
|
|
||||||
MINIPORT_INSTANCE_ID (Adapter)));
|
|
||||||
NOTE_ERROR ();
|
|
||||||
|
|
||||||
NdisFreeMdl(mdl);
|
|
||||||
NdisFreeMemory(injectBuffer,0,0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUGP (("[%s] NdisAllocateMdl failed in IndicateReceivePacket\n",
|
|
||||||
MINIPORT_INSTANCE_ID (Adapter)));
|
|
||||||
NOTE_ERROR ();
|
|
||||||
|
|
||||||
NdisFreeMemory(injectBuffer,0,0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUGP (("[%s] NdisAllocateMemoryWithTagPriority failed in IndicateReceivePacket\n",
|
|
||||||
MINIPORT_INSTANCE_ID (Adapter)));
|
|
||||||
NOTE_ERROR ();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
tapCompleteIrpAndFreeReceiveNetBufferList(
|
|
||||||
__in PTAP_ADAPTER_CONTEXT Adapter,
|
|
||||||
__in PNET_BUFFER_LIST NetBufferList, // Only one NB here...
|
|
||||||
__in NTSTATUS IoCompletionStatus
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PIRP irp;
|
|
||||||
ULONG frameType, netBufferCount, byteCount;
|
|
||||||
LONG nblCount;
|
|
||||||
|
|
||||||
// Fetch NB frame type.
|
|
||||||
frameType = tapGetNetBufferFrameType(NET_BUFFER_LIST_FIRST_NB(NetBufferList));
|
|
||||||
|
|
||||||
// Fetch statistics for all NBs linked to the NB.
|
|
||||||
netBufferCount = tapGetNetBufferCountsFromNetBufferList(
|
|
||||||
NetBufferList,
|
|
||||||
&byteCount
|
|
||||||
);
|
|
||||||
|
|
||||||
// Update statistics by frame type
|
|
||||||
if(IoCompletionStatus == STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
switch(frameType)
|
|
||||||
{
|
|
||||||
case NDIS_PACKET_TYPE_DIRECTED:
|
|
||||||
Adapter->FramesRxDirected += netBufferCount;
|
|
||||||
Adapter->BytesRxDirected += byteCount;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NDIS_PACKET_TYPE_BROADCAST:
|
|
||||||
Adapter->FramesRxBroadcast += netBufferCount;
|
|
||||||
Adapter->BytesRxBroadcast += byteCount;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case NDIS_PACKET_TYPE_MULTICAST:
|
|
||||||
Adapter->FramesRxMulticast += netBufferCount;
|
|
||||||
Adapter->BytesRxMulticast += byteCount;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
ASSERT(FALSE);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Handle P2P Packet
|
|
||||||
// -----------------
|
|
||||||
// Free MDL allocated for P2P Ethernet header.
|
|
||||||
//
|
|
||||||
if(TAP_RX_NBL_FLAG_TEST(NetBufferList,TAP_RX_NBL_FLAGS_IS_P2P))
|
|
||||||
{
|
|
||||||
PNET_BUFFER netBuffer;
|
|
||||||
PMDL mdl;
|
|
||||||
|
|
||||||
netBuffer = NET_BUFFER_LIST_FIRST_NB(NetBufferList);
|
|
||||||
mdl = NET_BUFFER_FIRST_MDL(netBuffer);
|
|
||||||
mdl->Next = NULL;
|
|
||||||
|
|
||||||
NdisFreeMdl(mdl);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Handle Injected Packet
|
|
||||||
// -----------------------
|
|
||||||
// Free MDL and data buffer allocated for injected packet.
|
|
||||||
//
|
|
||||||
if(TAP_RX_NBL_FLAG_TEST(NetBufferList,TAP_RX_NBL_FLAGS_IS_INJECTED))
|
|
||||||
{
|
|
||||||
PNET_BUFFER netBuffer;
|
|
||||||
PMDL mdl;
|
|
||||||
PUCHAR injectBuffer;
|
|
||||||
|
|
||||||
netBuffer = NET_BUFFER_LIST_FIRST_NB(NetBufferList);
|
|
||||||
mdl = NET_BUFFER_FIRST_MDL(netBuffer);
|
|
||||||
|
|
||||||
injectBuffer = (PUCHAR )MmGetSystemAddressForMdlSafe(mdl,NormalPagePriority);
|
|
||||||
|
|
||||||
if(injectBuffer)
|
|
||||||
{
|
|
||||||
NdisFreeMemory(injectBuffer,0,0);
|
|
||||||
}
|
|
||||||
|
|
||||||
NdisFreeMdl(mdl);
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Complete the IRP
|
|
||||||
//
|
|
||||||
irp = (PIRP )NetBufferList->MiniportReserved[0];
|
|
||||||
|
|
||||||
if(irp)
|
|
||||||
{
|
|
||||||
irp->IoStatus.Status = IoCompletionStatus;
|
|
||||||
IoCompleteRequest(irp, IO_NO_INCREMENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Decrement in-flight receive NBL count.
|
|
||||||
nblCount = NdisInterlockedDecrement(&Adapter->ReceiveNblInFlightCount);
|
|
||||||
ASSERT(nblCount >= 0 );
|
|
||||||
if (0 == nblCount)
|
|
||||||
{
|
|
||||||
NdisSetEvent(&Adapter->ReceiveNblInFlightCountZeroEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Free the NBL
|
|
||||||
NdisFreeNetBufferList(NetBufferList);
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
AdapterReturnNetBufferLists(
|
|
||||||
__in NDIS_HANDLE MiniportAdapterContext,
|
|
||||||
__in PNET_BUFFER_LIST NetBufferLists,
|
|
||||||
__in ULONG ReturnFlags
|
|
||||||
)
|
|
||||||
{
|
|
||||||
PTAP_ADAPTER_CONTEXT adapter = (PTAP_ADAPTER_CONTEXT )MiniportAdapterContext;
|
|
||||||
PNET_BUFFER_LIST currentNbl, nextNbl;
|
|
||||||
|
|
||||||
UNREFERENCED_PARAMETER(ReturnFlags);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Process each NBL individually
|
|
||||||
//
|
|
||||||
currentNbl = NetBufferLists;
|
|
||||||
while (currentNbl)
|
|
||||||
{
|
|
||||||
PNET_BUFFER_LIST nextNbl;
|
|
||||||
|
|
||||||
nextNbl = NET_BUFFER_LIST_NEXT_NBL(currentNbl);
|
|
||||||
NET_BUFFER_LIST_NEXT_NBL(currentNbl) = NULL;
|
|
||||||
|
|
||||||
// Complete write IRP and free NBL and associated resources.
|
|
||||||
tapCompleteIrpAndFreeReceiveNetBufferList(
|
|
||||||
adapter,
|
|
||||||
currentNbl,
|
|
||||||
STATUS_SUCCESS
|
|
||||||
);
|
|
||||||
|
|
||||||
// Move to next NBL
|
|
||||||
currentNbl = nextNbl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// IRP_MJ_WRITE callback.
|
|
||||||
NTSTATUS
|
|
||||||
TapDeviceWrite(
|
|
||||||
PDEVICE_OBJECT DeviceObject,
|
|
||||||
PIRP Irp
|
|
||||||
)
|
|
||||||
{
|
|
||||||
NTSTATUS ntStatus = STATUS_SUCCESS;// Assume success
|
|
||||||
PIO_STACK_LOCATION irpSp;// Pointer to current stack location
|
|
||||||
PTAP_ADAPTER_CONTEXT adapter = NULL;
|
|
||||||
ULONG dataLength;
|
|
||||||
|
|
||||||
PAGED_CODE();
|
|
||||||
|
|
||||||
irpSp = IoGetCurrentIrpStackLocation( Irp );
|
|
||||||
|
|
||||||
//
|
|
||||||
// Fetch adapter context for this device.
|
|
||||||
// --------------------------------------
|
|
||||||
// Adapter pointer was stashed in FsContext when handle was opened.
|
|
||||||
//
|
|
||||||
adapter = (PTAP_ADAPTER_CONTEXT )(irpSp->FileObject)->FsContext;
|
|
||||||
|
|
||||||
ASSERT(adapter);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Sanity checks on state variables
|
|
||||||
//
|
|
||||||
if (!tapAdapterReadAndWriteReady(adapter))
|
|
||||||
{
|
|
||||||
//DEBUGP (("[%s] Interface is down in IRP_MJ_WRITE\n",
|
|
||||||
// MINIPORT_INSTANCE_ID (adapter)));
|
|
||||||
//NOTE_ERROR();
|
|
||||||
|
|
||||||
Irp->IoStatus.Status = ntStatus = STATUS_CANCELLED;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
IoCompleteRequest (Irp, IO_NO_INCREMENT);
|
|
||||||
|
|
||||||
return ntStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save IRP-accessible copy of buffer length
|
|
||||||
Irp->IoStatus.Information = irpSp->Parameters.Write.Length;
|
|
||||||
|
|
||||||
if (Irp->MdlAddress == NULL)
|
|
||||||
{
|
|
||||||
DEBUGP (("[%s] MdlAddress is NULL for IRP_MJ_WRITE\n",
|
|
||||||
MINIPORT_INSTANCE_ID (adapter)));
|
|
||||||
|
|
||||||
NOTE_ERROR();
|
|
||||||
Irp->IoStatus.Status = ntStatus = STATUS_INVALID_PARAMETER;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
IoCompleteRequest (Irp, IO_NO_INCREMENT);
|
|
||||||
|
|
||||||
return ntStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Try to get a virtual address for the MDL.
|
|
||||||
//
|
|
||||||
NdisQueryMdl(
|
|
||||||
Irp->MdlAddress,
|
|
||||||
&Irp->AssociatedIrp.SystemBuffer,
|
|
||||||
&dataLength,
|
|
||||||
NormalPagePriority
|
|
||||||
);
|
|
||||||
|
|
||||||
if (Irp->AssociatedIrp.SystemBuffer == NULL)
|
|
||||||
{
|
|
||||||
DEBUGP (("[%s] Could not map address in IRP_MJ_WRITE\n",
|
|
||||||
MINIPORT_INSTANCE_ID (adapter)));
|
|
||||||
|
|
||||||
NOTE_ERROR();
|
|
||||||
Irp->IoStatus.Status = ntStatus = STATUS_INSUFFICIENT_RESOURCES;
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
IoCompleteRequest (Irp, IO_NO_INCREMENT);
|
|
||||||
|
|
||||||
return ntStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT(dataLength == irpSp->Parameters.Write.Length);
|
|
||||||
|
|
||||||
Irp->IoStatus.Information = irpSp->Parameters.Write.Length;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Handle miniport Pause
|
|
||||||
// ---------------------
|
|
||||||
// NDIS 6 miniports implement a temporary "Pause" state normally followed
|
|
||||||
// by the Restart. While in the Pause state it is forbidden for the miniport
|
|
||||||
// to indicate receive NBLs.
|
|
||||||
//
|
|
||||||
// That is: The device interface may be "up", but the NDIS miniport send/receive
|
|
||||||
// interface may be temporarily "down".
|
|
||||||
//
|
|
||||||
// BUGBUG!!! In the initial implementation of the NDIS 6 TapOas receive path
|
|
||||||
// the code below will perform a "lying send" for write IRPs passed to the
|
|
||||||
// driver while the miniport is in the Paused state.
|
|
||||||
//
|
|
||||||
// The correct implementation is to go ahead and build the NBLs corresponding
|
|
||||||
// to the user-mode write - but queue them. When Restart is entered the
|
|
||||||
// queued NBLs would be dequeued and indicated to the host.
|
|
||||||
//
|
|
||||||
if(tapAdapterSendAndReceiveReady(adapter) == NDIS_STATUS_SUCCESS)
|
|
||||||
{
|
|
||||||
if (/*!adapter->m_tun &&*/ ((irpSp->Parameters.Write.Length) >= ETHERNET_HEADER_SIZE))
|
|
||||||
{
|
|
||||||
PNET_BUFFER_LIST netBufferList;
|
|
||||||
|
|
||||||
DUMP_PACKET ("IRP_MJ_WRITE ETH",
|
|
||||||
(unsigned char *) Irp->AssociatedIrp.SystemBuffer,
|
|
||||||
irpSp->Parameters.Write.Length);
|
|
||||||
|
|
||||||
//=====================================================
|
|
||||||
// If IPv4 packet, check whether or not packet
|
|
||||||
// was truncated.
|
|
||||||
//=====================================================
|
|
||||||
#if PACKET_TRUNCATION_CHECK
|
|
||||||
IPv4PacketSizeVerify (
|
|
||||||
(unsigned char *) Irp->AssociatedIrp.SystemBuffer,
|
|
||||||
irpSp->Parameters.Write.Length,
|
|
||||||
FALSE,
|
|
||||||
"RX",
|
|
||||||
&adapter->m_RxTrunc
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
(Irp->MdlAddress)->Next = NULL; // No next MDL
|
|
||||||
|
|
||||||
// Allocate the NBL and NB. Link MDL chain to NB.
|
|
||||||
netBufferList = NdisAllocateNetBufferAndNetBufferList(
|
|
||||||
adapter->ReceiveNblPool,
|
|
||||||
0, // ContextSize
|
|
||||||
0, // ContextBackFill
|
|
||||||
Irp->MdlAddress, // MDL chain
|
|
||||||
0,
|
|
||||||
dataLength
|
|
||||||
);
|
|
||||||
|
|
||||||
if(netBufferList != NULL)
|
|
||||||
{
|
|
||||||
LONG nblCount;
|
|
||||||
|
|
||||||
NET_BUFFER_LIST_NEXT_NBL(netBufferList) = NULL; // Only one NBL
|
|
||||||
|
|
||||||
// Stash IRP pointer in NBL MiniportReserved[0] field.
|
|
||||||
netBufferList->MiniportReserved[0] = Irp;
|
|
||||||
netBufferList->MiniportReserved[1] = NULL;
|
|
||||||
|
|
||||||
// This IRP is pended.
|
|
||||||
IoMarkIrpPending(Irp);
|
|
||||||
|
|
||||||
// This IRP cannot be cancelled while in-flight.
|
|
||||||
IoSetCancelRoutine(Irp,NULL);
|
|
||||||
|
|
||||||
TAP_RX_NBL_FLAGS_CLEAR_ALL(netBufferList);
|
|
||||||
|
|
||||||
// Increment in-flight receive NBL count.
|
|
||||||
nblCount = NdisInterlockedIncrement(&adapter->ReceiveNblInFlightCount);
|
|
||||||
ASSERT(nblCount > 0 );
|
|
||||||
|
|
||||||
//
|
|
||||||
// Indicate the packet
|
|
||||||
// -------------------
|
|
||||||
// Irp->AssociatedIrp.SystemBuffer with length irpSp->Parameters.Write.Length
|
|
||||||
// contains the complete packet including Ethernet header and payload.
|
|
||||||
//
|
|
||||||
NdisMIndicateReceiveNetBufferLists(
|
|
||||||
adapter->MiniportAdapterHandle,
|
|
||||||
netBufferList,
|
|
||||||
NDIS_DEFAULT_PORT_NUMBER,
|
|
||||||
1, // NumberOfNetBufferLists
|
|
||||||
0 // ReceiveFlags
|
|
||||||
);
|
|
||||||
|
|
||||||
ntStatus = STATUS_PENDING;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUGP (("[%s] NdisMIndicateReceiveNetBufferLists failed in IRP_MJ_WRITE\n",
|
|
||||||
MINIPORT_INSTANCE_ID (adapter)));
|
|
||||||
NOTE_ERROR ();
|
|
||||||
|
|
||||||
// Fail the IRP
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
else if (adapter->m_tun && ((irpSp->Parameters.Write.Length) >= IP_HEADER_SIZE))
|
|
||||||
{
|
|
||||||
PETH_HEADER p_UserToTap = &adapter->m_UserToTap;
|
|
||||||
PMDL mdl; // Head of MDL chain.
|
|
||||||
|
|
||||||
// For IPv6, need to use Ethernet header with IPv6 proto
|
|
||||||
if ( IPH_GET_VER( ((IPHDR*) Irp->AssociatedIrp.SystemBuffer)->version_len) == 6 )
|
|
||||||
{
|
|
||||||
p_UserToTap = &adapter->m_UserToTap_IPv6;
|
|
||||||
}
|
|
||||||
|
|
||||||
DUMP_PACKET2 ("IRP_MJ_WRITE P2P",
|
|
||||||
p_UserToTap,
|
|
||||||
(unsigned char *) Irp->AssociatedIrp.SystemBuffer,
|
|
||||||
irpSp->Parameters.Write.Length);
|
|
||||||
|
|
||||||
//=====================================================
|
|
||||||
// If IPv4 packet, check whether or not packet
|
|
||||||
// was truncated.
|
|
||||||
//=====================================================
|
|
||||||
#if PACKET_TRUNCATION_CHECK
|
|
||||||
IPv4PacketSizeVerify (
|
|
||||||
(unsigned char *) Irp->AssociatedIrp.SystemBuffer,
|
|
||||||
irpSp->Parameters.Write.Length,
|
|
||||||
TRUE,
|
|
||||||
"RX",
|
|
||||||
&adapter->m_RxTrunc
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
|
||||||
// Allocate MDL for Ethernet header
|
|
||||||
// --------------------------------
|
|
||||||
// Irp->AssociatedIrp.SystemBuffer with length irpSp->Parameters.Write.Length
|
|
||||||
// contains the only the Ethernet payload. Prepend the user-mode provided
|
|
||||||
// payload with the Ethernet header pointed to by p_UserToTap.
|
|
||||||
//
|
|
||||||
mdl = NdisAllocateMdl(
|
|
||||||
adapter->MiniportAdapterHandle,
|
|
||||||
p_UserToTap,
|
|
||||||
sizeof(ETH_HEADER)
|
|
||||||
);
|
|
||||||
|
|
||||||
if(mdl != NULL)
|
|
||||||
{
|
|
||||||
PNET_BUFFER_LIST netBufferList;
|
|
||||||
|
|
||||||
// Chain user's Ethernet payload behind Ethernet header.
|
|
||||||
mdl->Next = Irp->MdlAddress;
|
|
||||||
(Irp->MdlAddress)->Next = NULL; // No next MDL
|
|
||||||
|
|
||||||
// Allocate the NBL and NB. Link MDL chain to NB.
|
|
||||||
netBufferList = NdisAllocateNetBufferAndNetBufferList(
|
|
||||||
adapter->ReceiveNblPool,
|
|
||||||
0, // ContextSize
|
|
||||||
0, // ContextBackFill
|
|
||||||
mdl, // MDL chain
|
|
||||||
0,
|
|
||||||
sizeof(ETH_HEADER) + dataLength
|
|
||||||
);
|
|
||||||
|
|
||||||
if(netBufferList != NULL)
|
|
||||||
{
|
|
||||||
LONG nblCount;
|
|
||||||
|
|
||||||
NET_BUFFER_LIST_NEXT_NBL(netBufferList) = NULL; // Only one NBL
|
|
||||||
|
|
||||||
// This IRP is pended.
|
|
||||||
IoMarkIrpPending(Irp);
|
|
||||||
|
|
||||||
// This IRP cannot be cancelled while in-flight.
|
|
||||||
IoSetCancelRoutine(Irp,NULL);
|
|
||||||
|
|
||||||
// Stash IRP pointer in NBL MiniportReserved[0] field.
|
|
||||||
netBufferList->MiniportReserved[0] = Irp;
|
|
||||||
netBufferList->MiniportReserved[1] = NULL;
|
|
||||||
|
|
||||||
// Set flag indicating that this is P2P packet
|
|
||||||
TAP_RX_NBL_FLAGS_CLEAR_ALL(netBufferList);
|
|
||||||
TAP_RX_NBL_FLAG_SET(netBufferList,TAP_RX_NBL_FLAGS_IS_P2P);
|
|
||||||
|
|
||||||
// Increment in-flight receive NBL count.
|
|
||||||
nblCount = NdisInterlockedIncrement(&adapter->ReceiveNblInFlightCount);
|
|
||||||
ASSERT(nblCount > 0 );
|
|
||||||
|
|
||||||
//
|
|
||||||
// Indicate the packet
|
|
||||||
//
|
|
||||||
NdisMIndicateReceiveNetBufferLists(
|
|
||||||
adapter->MiniportAdapterHandle,
|
|
||||||
netBufferList,
|
|
||||||
NDIS_DEFAULT_PORT_NUMBER,
|
|
||||||
1, // NumberOfNetBufferLists
|
|
||||||
0 // ReceiveFlags
|
|
||||||
);
|
|
||||||
|
|
||||||
ntStatus = STATUS_PENDING;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mdl->Next = NULL;
|
|
||||||
NdisFreeMdl(mdl);
|
|
||||||
|
|
||||||
DEBUGP (("[%s] NdisMIndicateReceiveNetBufferLists failed in IRP_MJ_WRITE\n",
|
|
||||||
MINIPORT_INSTANCE_ID (adapter)));
|
|
||||||
NOTE_ERROR ();
|
|
||||||
|
|
||||||
// Fail the IRP
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUGP (("[%s] NdisAllocateMdl failed in IRP_MJ_WRITE\n",
|
|
||||||
MINIPORT_INSTANCE_ID (adapter)));
|
|
||||||
NOTE_ERROR ();
|
|
||||||
|
|
||||||
// Fail the IRP
|
|
||||||
Irp->IoStatus.Information = 0;
|
|
||||||
ntStatus = STATUS_INSUFFICIENT_RESOURCES;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUGP (("[%s] Bad buffer size in IRP_MJ_WRITE, len=%d\n",
|
|
||||||
MINIPORT_INSTANCE_ID (adapter),
|
|
||||||
irpSp->Parameters.Write.Length));
|
|
||||||
NOTE_ERROR ();
|
|
||||||
|
|
||||||
Irp->IoStatus.Information = 0; // ETHERNET_HEADER_SIZE;
|
|
||||||
Irp->IoStatus.Status = ntStatus = STATUS_BUFFER_TOO_SMALL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUGP (("[%s] Lying send in IRP_MJ_WRITE while adapter paused\n",
|
|
||||||
MINIPORT_INSTANCE_ID (adapter)));
|
|
||||||
|
|
||||||
ntStatus = STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ntStatus != STATUS_PENDING)
|
|
||||||
{
|
|
||||||
Irp->IoStatus.Status = ntStatus;
|
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ntStatus;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#ifndef __TAP_WIN_H
|
|
||||||
#define __TAP_WIN_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* =============
|
|
||||||
* TAP IOCTLs
|
|
||||||
* =============
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define TAP_WIN_CONTROL_CODE(request,method) \
|
|
||||||
CTL_CODE (FILE_DEVICE_UNKNOWN, request, method, FILE_ANY_ACCESS)
|
|
||||||
|
|
||||||
/* Present in 8.1 */
|
|
||||||
|
|
||||||
#define TAP_WIN_IOCTL_GET_MAC TAP_WIN_CONTROL_CODE (1, METHOD_BUFFERED)
|
|
||||||
#define TAP_WIN_IOCTL_GET_VERSION TAP_WIN_CONTROL_CODE (2, METHOD_BUFFERED)
|
|
||||||
#define TAP_WIN_IOCTL_GET_MTU TAP_WIN_CONTROL_CODE (3, METHOD_BUFFERED)
|
|
||||||
//#define TAP_WIN_IOCTL_GET_INFO TAP_WIN_CONTROL_CODE (4, METHOD_BUFFERED)
|
|
||||||
//#define TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT TAP_WIN_CONTROL_CODE (5, METHOD_BUFFERED)
|
|
||||||
#define TAP_WIN_IOCTL_SET_MEDIA_STATUS TAP_WIN_CONTROL_CODE (6, METHOD_BUFFERED)
|
|
||||||
//#define TAP_WIN_IOCTL_CONFIG_DHCP_MASQ TAP_WIN_CONTROL_CODE (7, METHOD_BUFFERED)
|
|
||||||
#if DBG
|
|
||||||
#define TAP_WIN_IOCTL_GET_LOG_LINE TAP_WIN_CONTROL_CODE (8, METHOD_BUFFERED)
|
|
||||||
#endif
|
|
||||||
//#define TAP_WIN_IOCTL_CONFIG_DHCP_SET_OPT TAP_WIN_CONTROL_CODE (9, METHOD_BUFFERED)
|
|
||||||
|
|
||||||
/* Added in 8.2 */
|
|
||||||
|
|
||||||
/* obsoletes TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT */
|
|
||||||
//#define TAP_WIN_IOCTL_CONFIG_TUN TAP_WIN_CONTROL_CODE (10, METHOD_BUFFERED)
|
|
||||||
|
|
||||||
// Used by ZT1 to get multicast memberships at the L2 level -- Windows provides no native way to do this that I know of
|
|
||||||
#define TAP_WIN_IOCTL_GET_MULTICAST_MEMBERSHIPS TAP_WIN_CONTROL_CODE (11, METHOD_BUFFERED)
|
|
||||||
// Must be the same as NIC_MAX_MCAST_LIST in constants.h
|
|
||||||
#define TAP_MAX_MCAST_LIST 128
|
|
||||||
// Amount of memory that must be provided to ioctl TAP_WIN_IOCTL_GET_MULTICAST_MEMBERSHIPS
|
|
||||||
#define TAP_WIN_IOCTL_GET_MULTICAST_MEMBERSHIPS_OUTPUT_BUF_SIZE (TAP_MAX_MCAST_LIST * 6)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* =================
|
|
||||||
* Registry keys
|
|
||||||
* =================
|
|
||||||
*/
|
|
||||||
|
|
||||||
#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}"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ======================
|
|
||||||
* Filesystem prefixes
|
|
||||||
* ======================
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define USERMODEDEVICEDIR "\\\\.\\Global\\"
|
|
||||||
#define SYSDEVICEDIR "\\Device\\"
|
|
||||||
#define USERDEVICEDIR "\\DosDevices\\Global\\"
|
|
||||||
#define TAP_WIN_SUFFIX ".tap"
|
|
||||||
|
|
||||||
#endif // __TAP_WIN_H
|
|
|
@ -1,88 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
#ifndef __TAP_H
|
|
||||||
#define __TAP_H
|
|
||||||
|
|
||||||
#ifndef NDIS_SUPPORT_NDIS6
|
|
||||||
#define NDIS_SUPPORT_NDIS6 1
|
|
||||||
#define NDIS_SUPPORT_NDIS61 1
|
|
||||||
#define NDIS_WDM1 1
|
|
||||||
#define NDIS61_MINIPORT 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ntifs.h>
|
|
||||||
#include <ndis.h>
|
|
||||||
#include <ntstrsafe.h>
|
|
||||||
#include <netioapi.h>
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "lock.h"
|
|
||||||
#include "constants.h"
|
|
||||||
#include "proto.h"
|
|
||||||
#include "mem.h"
|
|
||||||
#include "macinfo.h"
|
|
||||||
#include "error.h"
|
|
||||||
#include "endian.h"
|
|
||||||
#include "types.h"
|
|
||||||
#include "adapter.h"
|
|
||||||
#include "device.h"
|
|
||||||
#include "prototypes.h"
|
|
||||||
#include "tap-windows.h"
|
|
||||||
|
|
||||||
//========================================================
|
|
||||||
// Check for truncated IPv4 packets, log errors if found.
|
|
||||||
//========================================================
|
|
||||||
#define PACKET_TRUNCATION_CHECK 0
|
|
||||||
|
|
||||||
//========================================================
|
|
||||||
// EXPERIMENTAL -- Configure TAP device object to be
|
|
||||||
// accessible from non-administrative accounts, based
|
|
||||||
// on an advanced properties setting.
|
|
||||||
//
|
|
||||||
// Duplicates the functionality of OpenVPN's
|
|
||||||
// --allow-nonadmin directive.
|
|
||||||
//========================================================
|
|
||||||
#define ENABLE_NONADMIN 1
|
|
||||||
|
|
||||||
//
|
|
||||||
// The driver has exactly one instance of the TAP_GLOBAL structure. NDIS keeps
|
|
||||||
// an opaque handle to this data, (it doesn't attempt to read or interpret this
|
|
||||||
// data), and it passes the handle back to the miniport in MiniportSetOptions
|
|
||||||
// and MiniportInitializeEx.
|
|
||||||
//
|
|
||||||
typedef struct _TAP_GLOBAL
|
|
||||||
{
|
|
||||||
LIST_ENTRY AdapterList;
|
|
||||||
|
|
||||||
NDIS_RW_LOCK Lock;
|
|
||||||
|
|
||||||
NDIS_HANDLE NdisDriverHandle; // From NdisMRegisterMiniportDriver
|
|
||||||
|
|
||||||
} TAP_GLOBAL, *PTAP_GLOBAL;
|
|
||||||
|
|
||||||
|
|
||||||
// Global data
|
|
||||||
extern TAP_GLOBAL GlobalData;
|
|
||||||
|
|
||||||
#endif // __TAP_H
|
|
|
@ -1,232 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
//======================================================
|
|
||||||
// This driver is designed to work on Windows Vista or higher
|
|
||||||
// versions of Windows.
|
|
||||||
//
|
|
||||||
// It is SMP-safe and handles power management.
|
|
||||||
//
|
|
||||||
// By default we operate as a "tap" virtual ethernet
|
|
||||||
// 802.3 interface, but we can emulate a "tun"
|
|
||||||
// interface (point-to-point IPv4) through the
|
|
||||||
// TAP_WIN_IOCTL_CONFIG_POINT_TO_POINT or
|
|
||||||
// TAP_WIN_IOCTL_CONFIG_TUN ioctl.
|
|
||||||
//======================================================
|
|
||||||
|
|
||||||
//
|
|
||||||
// Include files.
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include "tap.h"
|
|
||||||
|
|
||||||
|
|
||||||
// Global data
|
|
||||||
TAP_GLOBAL GlobalData;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef ALLOC_PRAGMA
|
|
||||||
#pragma alloc_text( INIT, DriverEntry )
|
|
||||||
#pragma alloc_text( PAGE, TapDriverUnload)
|
|
||||||
#endif // ALLOC_PRAGMA
|
|
||||||
|
|
||||||
NTSTATUS
|
|
||||||
DriverEntry(
|
|
||||||
__in PDRIVER_OBJECT DriverObject,
|
|
||||||
__in PUNICODE_STRING RegistryPath
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
In the context of its DriverEntry function, a miniport driver associates
|
|
||||||
itself with NDIS, specifies the NDIS version that it is using, and
|
|
||||||
registers its entry points.
|
|
||||||
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
PVOID DriverObject - pointer to the driver object.
|
|
||||||
PVOID RegistryPath - pointer to the driver registry path.
|
|
||||||
|
|
||||||
Return Value:
|
|
||||||
|
|
||||||
NTSTATUS code
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
NTSTATUS status;
|
|
||||||
|
|
||||||
UNREFERENCED_PARAMETER(RegistryPath);
|
|
||||||
|
|
||||||
DEBUGP (("[TAP] --> DriverEntry; version [%d.%d] %s %s\n",
|
|
||||||
TAP_DRIVER_MAJOR_VERSION,
|
|
||||||
TAP_DRIVER_MINOR_VERSION,
|
|
||||||
__DATE__,
|
|
||||||
__TIME__));
|
|
||||||
|
|
||||||
DEBUGP (("[TAP] Registry Path: '%wZ'\n", RegistryPath));
|
|
||||||
|
|
||||||
//
|
|
||||||
// Initialize any driver-global variables here.
|
|
||||||
//
|
|
||||||
NdisZeroMemory(&GlobalData, sizeof(GlobalData));
|
|
||||||
|
|
||||||
//
|
|
||||||
// The ApaterList in the GlobalData structure is used to track multiple
|
|
||||||
// adapters controlled by this miniport.
|
|
||||||
//
|
|
||||||
NdisInitializeListHead(&GlobalData.AdapterList);
|
|
||||||
|
|
||||||
//
|
|
||||||
// This lock protects the AdapterList.
|
|
||||||
//
|
|
||||||
NdisInitializeReadWriteLock(&GlobalData.Lock);
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
NDIS_MINIPORT_DRIVER_CHARACTERISTICS miniportCharacteristics;
|
|
||||||
|
|
||||||
NdisZeroMemory(&miniportCharacteristics, sizeof(miniportCharacteristics));
|
|
||||||
|
|
||||||
{C_ASSERT(sizeof(miniportCharacteristics) >= NDIS_SIZEOF_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2);}
|
|
||||||
miniportCharacteristics.Header.Type = NDIS_OBJECT_TYPE_MINIPORT_DRIVER_CHARACTERISTICS;
|
|
||||||
miniportCharacteristics.Header.Size = NDIS_SIZEOF_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
|
|
||||||
miniportCharacteristics.Header.Revision = NDIS_MINIPORT_DRIVER_CHARACTERISTICS_REVISION_2;
|
|
||||||
|
|
||||||
miniportCharacteristics.MajorNdisVersion = TAP_NDIS_MAJOR_VERSION;
|
|
||||||
miniportCharacteristics.MinorNdisVersion = TAP_NDIS_MINOR_VERSION;
|
|
||||||
|
|
||||||
miniportCharacteristics.MajorDriverVersion = TAP_DRIVER_MAJOR_VERSION;
|
|
||||||
miniportCharacteristics.MinorDriverVersion = TAP_DRIVER_MINOR_VERSION;
|
|
||||||
|
|
||||||
miniportCharacteristics.Flags = 0;
|
|
||||||
|
|
||||||
//miniportCharacteristics.SetOptionsHandler = MPSetOptions; // Optional
|
|
||||||
miniportCharacteristics.InitializeHandlerEx = AdapterCreate;
|
|
||||||
miniportCharacteristics.HaltHandlerEx = AdapterHalt;
|
|
||||||
miniportCharacteristics.UnloadHandler = TapDriverUnload;
|
|
||||||
miniportCharacteristics.PauseHandler = AdapterPause;
|
|
||||||
miniportCharacteristics.RestartHandler = AdapterRestart;
|
|
||||||
miniportCharacteristics.OidRequestHandler = AdapterOidRequest;
|
|
||||||
miniportCharacteristics.SendNetBufferListsHandler = AdapterSendNetBufferLists;
|
|
||||||
miniportCharacteristics.ReturnNetBufferListsHandler = AdapterReturnNetBufferLists;
|
|
||||||
miniportCharacteristics.CancelSendHandler = AdapterCancelSend;
|
|
||||||
miniportCharacteristics.CheckForHangHandlerEx = AdapterCheckForHangEx;
|
|
||||||
miniportCharacteristics.ResetHandlerEx = AdapterReset;
|
|
||||||
miniportCharacteristics.DevicePnPEventNotifyHandler = AdapterDevicePnpEventNotify;
|
|
||||||
miniportCharacteristics.ShutdownHandlerEx = AdapterShutdownEx;
|
|
||||||
miniportCharacteristics.CancelOidRequestHandler = AdapterCancelOidRequest;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Associate the miniport driver with NDIS by calling the
|
|
||||||
// NdisMRegisterMiniportDriver. This function returns an NdisDriverHandle.
|
|
||||||
// The miniport driver must retain this handle but it should never attempt
|
|
||||||
// to access or interpret this handle.
|
|
||||||
//
|
|
||||||
// By calling NdisMRegisterMiniportDriver, the driver indicates that it
|
|
||||||
// is ready for NDIS to call the driver's MiniportSetOptions and
|
|
||||||
// MiniportInitializeEx handlers.
|
|
||||||
//
|
|
||||||
DEBUGP (("[TAP] Calling NdisMRegisterMiniportDriver...\n"));
|
|
||||||
//NDIS_DECLARE_MINIPORT_DRIVER_CONTEXT(TAP_GLOBAL);
|
|
||||||
status = NdisMRegisterMiniportDriver(
|
|
||||||
DriverObject,
|
|
||||||
RegistryPath,
|
|
||||||
&GlobalData,
|
|
||||||
&miniportCharacteristics,
|
|
||||||
&GlobalData.NdisDriverHandle
|
|
||||||
);
|
|
||||||
|
|
||||||
if (NDIS_STATUS_SUCCESS == status)
|
|
||||||
{
|
|
||||||
DEBUGP (("[TAP] Registered miniport successfully\n"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
DEBUGP(("[TAP] NdisMRegisterMiniportDriver failed: %8.8X\n", status));
|
|
||||||
TapDriverUnload(DriverObject);
|
|
||||||
status = NDIS_STATUS_FAILURE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} while(FALSE);
|
|
||||||
|
|
||||||
DEBUGP (("[TAP] <-- DriverEntry; status = %8.8X\n",status));
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
VOID
|
|
||||||
TapDriverUnload(
|
|
||||||
__in PDRIVER_OBJECT DriverObject
|
|
||||||
)
|
|
||||||
/*++
|
|
||||||
|
|
||||||
Routine Description:
|
|
||||||
|
|
||||||
The unload handler is called during driver unload to free up resources
|
|
||||||
acquired in DriverEntry. This handler is registered in DriverEntry through
|
|
||||||
NdisMRegisterMiniportDriver. Note that an unload handler differs from
|
|
||||||
a MiniportHalt function in that this unload handler releases resources that
|
|
||||||
are global to the driver, while the halt handler releases resource for a
|
|
||||||
particular adapter.
|
|
||||||
|
|
||||||
Runs at IRQL = PASSIVE_LEVEL.
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
|
|
||||||
DriverObject Not used
|
|
||||||
|
|
||||||
Return Value:
|
|
||||||
|
|
||||||
None.
|
|
||||||
|
|
||||||
--*/
|
|
||||||
{
|
|
||||||
PDEVICE_OBJECT deviceObject = DriverObject->DeviceObject;
|
|
||||||
UNICODE_STRING uniWin32NameString;
|
|
||||||
|
|
||||||
DEBUGP (("[TAP] --> TapDriverUnload; version [%d.%d] %s %s unloaded\n",
|
|
||||||
TAP_DRIVER_MAJOR_VERSION,
|
|
||||||
TAP_DRIVER_MINOR_VERSION,
|
|
||||||
__DATE__,
|
|
||||||
__TIME__
|
|
||||||
));
|
|
||||||
|
|
||||||
PAGED_CODE();
|
|
||||||
|
|
||||||
//
|
|
||||||
// Clean up all globals that were allocated in DriverEntry
|
|
||||||
//
|
|
||||||
|
|
||||||
ASSERT(IsListEmpty(&GlobalData.AdapterList));
|
|
||||||
|
|
||||||
if(GlobalData.NdisDriverHandle != NULL )
|
|
||||||
{
|
|
||||||
NdisMDeregisterMiniportDriver(GlobalData.NdisDriverHandle);
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUGP (("[TAP] <-- TapDriverUnload\n"));
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,90 +0,0 @@
|
||||||
/*
|
|
||||||
* TAP-Windows -- A kernel driver to provide virtual tap
|
|
||||||
* device functionality on Windows.
|
|
||||||
*
|
|
||||||
* This code was inspired by the CIPE-Win32 driver by Damion K. Wilson.
|
|
||||||
*
|
|
||||||
* This source code is Copyright (C) 2002-2014 OpenVPN Technologies, Inc.,
|
|
||||||
* and is released under the GPL version 2 (see below).
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License version 2
|
|
||||||
* as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program (see the file COPYING included with this
|
|
||||||
* distribution); if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef TAP_TYPES_DEFINED
|
|
||||||
#define TAP_TYPES_DEFINED
|
|
||||||
|
|
||||||
//typedef
|
|
||||||
//struct _Queue
|
|
||||||
//{
|
|
||||||
// ULONG base;
|
|
||||||
// ULONG size;
|
|
||||||
// ULONG capacity;
|
|
||||||
// ULONG max_size;
|
|
||||||
// PVOID data[];
|
|
||||||
//} Queue;
|
|
||||||
|
|
||||||
//typedef struct _TAP_PACKET;
|
|
||||||
|
|
||||||
//typedef struct _TapExtension
|
|
||||||
//{
|
|
||||||
// // TAP device object and packet queues
|
|
||||||
// Queue *m_PacketQueue, *m_IrpQueue;
|
|
||||||
// PDEVICE_OBJECT m_TapDevice;
|
|
||||||
// NDIS_HANDLE m_TapDeviceHandle;
|
|
||||||
// ULONG TapFileIsOpen;
|
|
||||||
//
|
|
||||||
// // Used to lock packet queues
|
|
||||||
// NDIS_SPIN_LOCK m_QueueLock;
|
|
||||||
// BOOLEAN m_AllocatedSpinlocks;
|
|
||||||
//
|
|
||||||
// // Used to bracket open/close
|
|
||||||
// // state changes.
|
|
||||||
// MUTEX m_OpenCloseMutex;
|
|
||||||
//
|
|
||||||
// // True if device has been permanently halted
|
|
||||||
// BOOLEAN m_Halt;
|
|
||||||
//
|
|
||||||
// // TAP device name
|
|
||||||
// unsigned char *m_TapName;
|
|
||||||
// UNICODE_STRING m_UnicodeLinkName;
|
|
||||||
// BOOLEAN m_CreatedUnicodeLinkName;
|
|
||||||
//
|
|
||||||
// // Used for device status ioctl only
|
|
||||||
// const char *m_LastErrorFilename;
|
|
||||||
// int m_LastErrorLineNumber;
|
|
||||||
// LONG TapFileOpenCount;
|
|
||||||
//
|
|
||||||
// // Flags
|
|
||||||
// BOOLEAN TapDeviceCreated;
|
|
||||||
// BOOLEAN m_CalledTapDeviceFreeResources;
|
|
||||||
//
|
|
||||||
// // DPC queue for deferred packet injection
|
|
||||||
// BOOLEAN m_InjectDpcInitialized;
|
|
||||||
// KDPC m_InjectDpc;
|
|
||||||
// NDIS_SPIN_LOCK m_InjectLock;
|
|
||||||
// Queue *m_InjectQueue;
|
|
||||||
//}
|
|
||||||
//TapExtension, *TapExtensionPointer;
|
|
||||||
|
|
||||||
typedef struct _InjectPacket
|
|
||||||
{
|
|
||||||
# define INJECT_PACKET_SIZE(data_size) (sizeof (InjectPacket) + (data_size))
|
|
||||||
# define INJECT_PACKET_FREE(ib) NdisFreeMemory ((ib), INJECT_PACKET_SIZE ((ib)->m_Size), 0)
|
|
||||||
ULONG m_Size;
|
|
||||||
UCHAR m_Data []; // m_Data must be the last struct member
|
|
||||||
}
|
|
||||||
InjectPacket, *InjectPacketPointer;
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,143 +0,0 @@
|
||||||
;
|
|
||||||
; ZeroTier One Virtual Network Port NDIS6 Driver
|
|
||||||
;
|
|
||||||
; Based on the OpenVPN tap-windows6 driver version 9.21.1 git
|
|
||||||
; commit 48f027cfca52b16b5fd23d82e6016ed8a91fc4d3.
|
|
||||||
; See: https://github.com/OpenVPN/tap-windows6
|
|
||||||
;
|
|
||||||
; Modified by ZeroTier, Inc. - https://www.zerotier.com/
|
|
||||||
;
|
|
||||||
; (1) Comment out 'tun' functionality and related features such as DHCP
|
|
||||||
; emulation, since we don't use any of that. Just want straight 'tap'.
|
|
||||||
; (2) Added custom IOCTL to enumerate L2 multicast memberships.
|
|
||||||
; (3) Increase maximum number of multicast memberships to 128.
|
|
||||||
; (4) Set default and max device MTU to 2800.
|
|
||||||
; (5) Rename/rebrand driver as ZeroTier network port driver.
|
|
||||||
;
|
|
||||||
; Original copyright below. Modifications released under GPLv2 as well.
|
|
||||||
;
|
|
||||||
; ****************************************************************************
|
|
||||||
; * Copyright (C) 2002-2014 OpenVPN Technologies, Inc. *
|
|
||||||
; * This program is free software; you can redistribute it and/or modify *
|
|
||||||
; * it under the terms of the GNU General Public License version 2 *
|
|
||||||
; * as published by the Free Software Foundation. *
|
|
||||||
; ****************************************************************************
|
|
||||||
;
|
|
||||||
|
|
||||||
[Version]
|
|
||||||
Signature = "$Windows NT$"
|
|
||||||
CatalogFile = zttap300.cat
|
|
||||||
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
|
|
||||||
Provider = %Provider%
|
|
||||||
Class = Net
|
|
||||||
DriverVer=04/25/2015,3.00.00.0
|
|
||||||
|
|
||||||
[Strings]
|
|
||||||
DeviceDescription = "ZeroTier One Virtual Port"
|
|
||||||
Provider = "ZeroTier Networks LLC" ; We're ZeroTier, Inc. now but kernel mode certs are $300+ so fuqdat.
|
|
||||||
|
|
||||||
; To build for x86, take NTamd64 off this and off the named section manually, build, then put it back!
|
|
||||||
[Manufacturer]
|
|
||||||
%Provider%=zttap300,NTamd64
|
|
||||||
|
|
||||||
[zttap300]
|
|
||||||
%DeviceDescription% = zttap300.ndi, root\zttap300 ; Root enumerated
|
|
||||||
%DeviceDescription% = zttap300.ndi, zttap300 ; Legacy
|
|
||||||
|
|
||||||
[zttap300.NTamd64]
|
|
||||||
%DeviceDescription% = zttap300.ndi, root\zttap300 ; Root enumerated
|
|
||||||
%DeviceDescription% = zttap300.ndi, zttap300 ; Legacy
|
|
||||||
|
|
||||||
;----------------- Characteristics ------------
|
|
||||||
; NCF_PHYSICAL = 0x04
|
|
||||||
; NCF_VIRTUAL = 0x01
|
|
||||||
; NCF_SOFTWARE_ENUMERATED = 0x02
|
|
||||||
; NCF_HIDDEN = 0x08
|
|
||||||
; NCF_NO_SERVICE = 0x10
|
|
||||||
; NCF_HAS_UI = 0x80
|
|
||||||
;----------------- Characteristics ------------
|
|
||||||
[zttap300.ndi]
|
|
||||||
CopyFiles = zttap300.driver, zttap300.files
|
|
||||||
AddReg = zttap300.reg
|
|
||||||
AddReg = zttap300.params.reg
|
|
||||||
Characteristics = 0x81
|
|
||||||
*IfType = 0x6 ; IF_TYPE_ETHERNET_CSMACD
|
|
||||||
*MediaType = 0x0 ; NdisMedium802_3
|
|
||||||
*PhysicalMediaType = 14 ; NdisPhysicalMedium802_3
|
|
||||||
|
|
||||||
[zttap300.ndi.Services]
|
|
||||||
AddService = zttap300, 2, zttap300.service
|
|
||||||
|
|
||||||
[zttap300.reg]
|
|
||||||
HKR, Ndi, Service, 0, "zttap300"
|
|
||||||
HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" ; yes, 'ndis5' is correct... yup, Windows.
|
|
||||||
HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"
|
|
||||||
HKR, , Manufacturer, 0, "%Provider%"
|
|
||||||
HKR, , ProductName, 0, "%DeviceDescription%"
|
|
||||||
|
|
||||||
[zttap300.params.reg]
|
|
||||||
HKR, Ndi\params\MTU, ParamDesc, 0, "MTU"
|
|
||||||
HKR, Ndi\params\MTU, Type, 0, "int"
|
|
||||||
HKR, Ndi\params\MTU, Default, 0, "2800"
|
|
||||||
HKR, Ndi\params\MTU, Optional, 0, "0"
|
|
||||||
HKR, Ndi\params\MTU, Min, 0, "100"
|
|
||||||
HKR, Ndi\params\MTU, Max, 0, "2800"
|
|
||||||
HKR, Ndi\params\MTU, Step, 0, "1"
|
|
||||||
HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status"
|
|
||||||
HKR, Ndi\params\MediaStatus, Type, 0, "enum"
|
|
||||||
HKR, Ndi\params\MediaStatus, Default, 0, "0"
|
|
||||||
HKR, Ndi\params\MediaStatus, Optional, 0, "0"
|
|
||||||
HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled"
|
|
||||||
HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected"
|
|
||||||
HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address"
|
|
||||||
HKR, Ndi\params\MAC, Type, 0, "edit"
|
|
||||||
HKR, Ndi\params\MAC, Optional, 0, "1"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, Default, 0, "0"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed"
|
|
||||||
|
|
||||||
;---------- Service Type -------------
|
|
||||||
; SERVICE_KERNEL_DRIVER = 0x01
|
|
||||||
; SERVICE_WIN32_OWN_PROCESS = 0x10
|
|
||||||
;---------- Service Type -------------
|
|
||||||
|
|
||||||
;---------- Start Mode ---------------
|
|
||||||
; SERVICE_BOOT_START = 0x0
|
|
||||||
; SERVICE_SYSTEM_START = 0x1
|
|
||||||
; SERVICE_AUTO_START = 0x2
|
|
||||||
; SERVICE_DEMAND_START = 0x3
|
|
||||||
; SERVICE_DISABLED = 0x4
|
|
||||||
;---------- Start Mode ---------------
|
|
||||||
|
|
||||||
[zttap300.service]
|
|
||||||
DisplayName = %DeviceDescription%
|
|
||||||
ServiceType = 1
|
|
||||||
StartType = 3
|
|
||||||
ErrorControl = 1
|
|
||||||
LoadOrderGroup = NDIS
|
|
||||||
ServiceBinary = %12%\zttap300.sys
|
|
||||||
|
|
||||||
;----------------- Copy Flags ------------
|
|
||||||
; COPYFLG_NOSKIP = 0x02
|
|
||||||
; COPYFLG_NOVERSIONCHECK = 0x04
|
|
||||||
;----------------- Copy Flags ------------
|
|
||||||
|
|
||||||
[SourceDisksNames]
|
|
||||||
1 = %DeviceDescription%, zttap300.sys
|
|
||||||
|
|
||||||
[SourceDisksFiles]
|
|
||||||
zttap300.sys = 1
|
|
||||||
|
|
||||||
[DestinationDirs]
|
|
||||||
zttap300.files = 11
|
|
||||||
zttap300.driver = 12
|
|
||||||
|
|
||||||
[zttap300.files]
|
|
||||||
;
|
|
||||||
|
|
||||||
[zttap300.driver]
|
|
||||||
zttap300.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,143 +0,0 @@
|
||||||
;
|
|
||||||
; ZeroTier One Virtual Network Port NDIS6 Driver
|
|
||||||
;
|
|
||||||
; Based on the OpenVPN tap-windows6 driver version 9.21.1 git
|
|
||||||
; commit 48f027cfca52b16b5fd23d82e6016ed8a91fc4d3.
|
|
||||||
; See: https://github.com/OpenVPN/tap-windows6
|
|
||||||
;
|
|
||||||
; Modified by ZeroTier, Inc. - https://www.zerotier.com/
|
|
||||||
;
|
|
||||||
; (1) Comment out 'tun' functionality and related features such as DHCP
|
|
||||||
; emulation, since we don't use any of that. Just want straight 'tap'.
|
|
||||||
; (2) Added custom IOCTL to enumerate L2 multicast memberships.
|
|
||||||
; (3) Increase maximum number of multicast memberships to 128.
|
|
||||||
; (4) Set default and max device MTU to 2800.
|
|
||||||
; (5) Rename/rebrand driver as ZeroTier network port driver.
|
|
||||||
;
|
|
||||||
; Original copyright below. Modifications released under GPLv2 as well.
|
|
||||||
;
|
|
||||||
; ****************************************************************************
|
|
||||||
; * Copyright (C) 2002-2014 OpenVPN Technologies, Inc. *
|
|
||||||
; * This program is free software; you can redistribute it and/or modify *
|
|
||||||
; * it under the terms of the GNU General Public License version 2 *
|
|
||||||
; * as published by the Free Software Foundation. *
|
|
||||||
; ****************************************************************************
|
|
||||||
;
|
|
||||||
|
|
||||||
[Version]
|
|
||||||
Signature = "$Windows NT$"
|
|
||||||
CatalogFile = zttap300.cat
|
|
||||||
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
|
|
||||||
Provider = %Provider%
|
|
||||||
Class = Net
|
|
||||||
DriverVer=08/13/2015,6.2.9200.20557
|
|
||||||
|
|
||||||
[Strings]
|
|
||||||
DeviceDescription = "ZeroTier One Virtual Port"
|
|
||||||
Provider = "ZeroTier Networks LLC" ; We're ZeroTier, Inc. now but kernel mode certs are $300+ so fuqdat.
|
|
||||||
|
|
||||||
; To build for x86, take NTamd64 off this and off the named section manually, build, then put it back!
|
|
||||||
[Manufacturer]
|
|
||||||
%Provider%=zttap300,NTamd64
|
|
||||||
|
|
||||||
[zttap300]
|
|
||||||
%DeviceDescription% = zttap300.ndi, root\zttap300 ; Root enumerated
|
|
||||||
%DeviceDescription% = zttap300.ndi, zttap300 ; Legacy
|
|
||||||
|
|
||||||
[zttap300.NTamd64]
|
|
||||||
%DeviceDescription% = zttap300.ndi, root\zttap300 ; Root enumerated
|
|
||||||
%DeviceDescription% = zttap300.ndi, zttap300 ; Legacy
|
|
||||||
|
|
||||||
;----------------- Characteristics ------------
|
|
||||||
; NCF_PHYSICAL = 0x04
|
|
||||||
; NCF_VIRTUAL = 0x01
|
|
||||||
; NCF_SOFTWARE_ENUMERATED = 0x02
|
|
||||||
; NCF_HIDDEN = 0x08
|
|
||||||
; NCF_NO_SERVICE = 0x10
|
|
||||||
; NCF_HAS_UI = 0x80
|
|
||||||
;----------------- Characteristics ------------
|
|
||||||
[zttap300.ndi]
|
|
||||||
CopyFiles = zttap300.driver, zttap300.files
|
|
||||||
AddReg = zttap300.reg
|
|
||||||
AddReg = zttap300.params.reg
|
|
||||||
Characteristics = 0x81
|
|
||||||
*IfType = 0x6 ; IF_TYPE_ETHERNET_CSMACD
|
|
||||||
*MediaType = 0x0 ; NdisMedium802_3
|
|
||||||
*PhysicalMediaType = 14 ; NdisPhysicalMedium802_3
|
|
||||||
|
|
||||||
[zttap300.ndi.Services]
|
|
||||||
AddService = zttap300, 2, zttap300.service
|
|
||||||
|
|
||||||
[zttap300.reg]
|
|
||||||
HKR, Ndi, Service, 0, "zttap300"
|
|
||||||
HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" ; yes, 'ndis5' is correct... yup, Windows.
|
|
||||||
HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"
|
|
||||||
HKR, , Manufacturer, 0, "%Provider%"
|
|
||||||
HKR, , ProductName, 0, "%DeviceDescription%"
|
|
||||||
|
|
||||||
[zttap300.params.reg]
|
|
||||||
HKR, Ndi\params\MTU, ParamDesc, 0, "MTU"
|
|
||||||
HKR, Ndi\params\MTU, Type, 0, "int"
|
|
||||||
HKR, Ndi\params\MTU, Default, 0, "2800"
|
|
||||||
HKR, Ndi\params\MTU, Optional, 0, "0"
|
|
||||||
HKR, Ndi\params\MTU, Min, 0, "100"
|
|
||||||
HKR, Ndi\params\MTU, Max, 0, "2800"
|
|
||||||
HKR, Ndi\params\MTU, Step, 0, "1"
|
|
||||||
HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status"
|
|
||||||
HKR, Ndi\params\MediaStatus, Type, 0, "enum"
|
|
||||||
HKR, Ndi\params\MediaStatus, Default, 0, "0"
|
|
||||||
HKR, Ndi\params\MediaStatus, Optional, 0, "0"
|
|
||||||
HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled"
|
|
||||||
HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected"
|
|
||||||
HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address"
|
|
||||||
HKR, Ndi\params\MAC, Type, 0, "edit"
|
|
||||||
HKR, Ndi\params\MAC, Optional, 0, "1"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, Default, 0, "0"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed"
|
|
||||||
|
|
||||||
;---------- Service Type -------------
|
|
||||||
; SERVICE_KERNEL_DRIVER = 0x01
|
|
||||||
; SERVICE_WIN32_OWN_PROCESS = 0x10
|
|
||||||
;---------- Service Type -------------
|
|
||||||
|
|
||||||
;---------- Start Mode ---------------
|
|
||||||
; SERVICE_BOOT_START = 0x0
|
|
||||||
; SERVICE_SYSTEM_START = 0x1
|
|
||||||
; SERVICE_AUTO_START = 0x2
|
|
||||||
; SERVICE_DEMAND_START = 0x3
|
|
||||||
; SERVICE_DISABLED = 0x4
|
|
||||||
;---------- Start Mode ---------------
|
|
||||||
|
|
||||||
[zttap300.service]
|
|
||||||
DisplayName = %DeviceDescription%
|
|
||||||
ServiceType = 1
|
|
||||||
StartType = 3
|
|
||||||
ErrorControl = 1
|
|
||||||
LoadOrderGroup = NDIS
|
|
||||||
ServiceBinary = %12%\zttap300.sys
|
|
||||||
|
|
||||||
;----------------- Copy Flags ------------
|
|
||||||
; COPYFLG_NOSKIP = 0x02
|
|
||||||
; COPYFLG_NOVERSIONCHECK = 0x04
|
|
||||||
;----------------- Copy Flags ------------
|
|
||||||
|
|
||||||
[SourceDisksNames]
|
|
||||||
1 = %DeviceDescription%, zttap300.sys
|
|
||||||
|
|
||||||
[SourceDisksFiles]
|
|
||||||
zttap300.sys = 1
|
|
||||||
|
|
||||||
[DestinationDirs]
|
|
||||||
zttap300.files = 11
|
|
||||||
zttap300.driver = 12
|
|
||||||
|
|
||||||
[zttap300.files]
|
|
||||||
;
|
|
||||||
|
|
||||||
[zttap300.driver]
|
|
||||||
zttap300.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,143 +0,0 @@
|
||||||
;
|
|
||||||
; ZeroTier One Virtual Network Port NDIS6 Driver
|
|
||||||
;
|
|
||||||
; Based on the OpenVPN tap-windows6 driver version 9.21.1 git
|
|
||||||
; commit 48f027cfca52b16b5fd23d82e6016ed8a91fc4d3.
|
|
||||||
; See: https://github.com/OpenVPN/tap-windows6
|
|
||||||
;
|
|
||||||
; Modified by ZeroTier, Inc. - https://www.zerotier.com/
|
|
||||||
;
|
|
||||||
; (1) Comment out 'tun' functionality and related features such as DHCP
|
|
||||||
; emulation, since we don't use any of that. Just want straight 'tap'.
|
|
||||||
; (2) Added custom IOCTL to enumerate L2 multicast memberships.
|
|
||||||
; (3) Increase maximum number of multicast memberships to 128.
|
|
||||||
; (4) Set default and max device MTU to 2800.
|
|
||||||
; (5) Rename/rebrand driver as ZeroTier network port driver.
|
|
||||||
;
|
|
||||||
; Original copyright below. Modifications released under GPLv2 as well.
|
|
||||||
;
|
|
||||||
; ****************************************************************************
|
|
||||||
; * Copyright (C) 2002-2014 OpenVPN Technologies, Inc. *
|
|
||||||
; * This program is free software; you can redistribute it and/or modify *
|
|
||||||
; * it under the terms of the GNU General Public License version 2 *
|
|
||||||
; * as published by the Free Software Foundation. *
|
|
||||||
; ****************************************************************************
|
|
||||||
;
|
|
||||||
|
|
||||||
[Version]
|
|
||||||
Signature = "$Windows NT$"
|
|
||||||
CatalogFile = zttap300.cat
|
|
||||||
ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318}
|
|
||||||
Provider = %Provider%
|
|
||||||
Class = Net
|
|
||||||
DriverVer=08/13/2015,6.2.9200.20557
|
|
||||||
|
|
||||||
[Strings]
|
|
||||||
DeviceDescription = "ZeroTier One Virtual Port"
|
|
||||||
Provider = "ZeroTier Networks LLC" ; We're ZeroTier, Inc. now but kernel mode certs are $300+ so fuqdat.
|
|
||||||
|
|
||||||
; To build for x86, take NTamd64 off this and off the named section manually, build, then put it back!
|
|
||||||
[Manufacturer]
|
|
||||||
%Provider%=zttap300,NTamd64
|
|
||||||
|
|
||||||
[zttap300]
|
|
||||||
%DeviceDescription% = zttap300.ndi, root\zttap300 ; Root enumerated
|
|
||||||
%DeviceDescription% = zttap300.ndi, zttap300 ; Legacy
|
|
||||||
|
|
||||||
[zttap300.NTamd64]
|
|
||||||
%DeviceDescription% = zttap300.ndi, root\zttap300 ; Root enumerated
|
|
||||||
%DeviceDescription% = zttap300.ndi, zttap300 ; Legacy
|
|
||||||
|
|
||||||
;----------------- Characteristics ------------
|
|
||||||
; NCF_PHYSICAL = 0x04
|
|
||||||
; NCF_VIRTUAL = 0x01
|
|
||||||
; NCF_SOFTWARE_ENUMERATED = 0x02
|
|
||||||
; NCF_HIDDEN = 0x08
|
|
||||||
; NCF_NO_SERVICE = 0x10
|
|
||||||
; NCF_HAS_UI = 0x80
|
|
||||||
;----------------- Characteristics ------------
|
|
||||||
[zttap300.ndi]
|
|
||||||
CopyFiles = zttap300.driver, zttap300.files
|
|
||||||
AddReg = zttap300.reg
|
|
||||||
AddReg = zttap300.params.reg
|
|
||||||
Characteristics = 0x81
|
|
||||||
*IfType = 0x6 ; IF_TYPE_ETHERNET_CSMACD
|
|
||||||
*MediaType = 0x0 ; NdisMedium802_3
|
|
||||||
*PhysicalMediaType = 14 ; NdisPhysicalMedium802_3
|
|
||||||
|
|
||||||
[zttap300.ndi.Services]
|
|
||||||
AddService = zttap300, 2, zttap300.service
|
|
||||||
|
|
||||||
[zttap300.reg]
|
|
||||||
HKR, Ndi, Service, 0, "zttap300"
|
|
||||||
HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" ; yes, 'ndis5' is correct... yup, Windows.
|
|
||||||
HKR, Ndi\Interfaces, LowerRange, 0, "ethernet"
|
|
||||||
HKR, , Manufacturer, 0, "%Provider%"
|
|
||||||
HKR, , ProductName, 0, "%DeviceDescription%"
|
|
||||||
|
|
||||||
[zttap300.params.reg]
|
|
||||||
HKR, Ndi\params\MTU, ParamDesc, 0, "MTU"
|
|
||||||
HKR, Ndi\params\MTU, Type, 0, "int"
|
|
||||||
HKR, Ndi\params\MTU, Default, 0, "2800"
|
|
||||||
HKR, Ndi\params\MTU, Optional, 0, "0"
|
|
||||||
HKR, Ndi\params\MTU, Min, 0, "100"
|
|
||||||
HKR, Ndi\params\MTU, Max, 0, "2800"
|
|
||||||
HKR, Ndi\params\MTU, Step, 0, "1"
|
|
||||||
HKR, Ndi\params\MediaStatus, ParamDesc, 0, "Media Status"
|
|
||||||
HKR, Ndi\params\MediaStatus, Type, 0, "enum"
|
|
||||||
HKR, Ndi\params\MediaStatus, Default, 0, "0"
|
|
||||||
HKR, Ndi\params\MediaStatus, Optional, 0, "0"
|
|
||||||
HKR, Ndi\params\MediaStatus\enum, "0", 0, "Application Controlled"
|
|
||||||
HKR, Ndi\params\MediaStatus\enum, "1", 0, "Always Connected"
|
|
||||||
HKR, Ndi\params\MAC, ParamDesc, 0, "MAC Address"
|
|
||||||
HKR, Ndi\params\MAC, Type, 0, "edit"
|
|
||||||
HKR, Ndi\params\MAC, Optional, 0, "1"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, ParamDesc, 0, "Non-Admin Access"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, Type, 0, "enum"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, Default, 0, "0"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin, Optional, 0, "0"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin\enum, "0", 0, "Not Allowed"
|
|
||||||
HKR, Ndi\params\AllowNonAdmin\enum, "1", 0, "Allowed"
|
|
||||||
|
|
||||||
;---------- Service Type -------------
|
|
||||||
; SERVICE_KERNEL_DRIVER = 0x01
|
|
||||||
; SERVICE_WIN32_OWN_PROCESS = 0x10
|
|
||||||
;---------- Service Type -------------
|
|
||||||
|
|
||||||
;---------- Start Mode ---------------
|
|
||||||
; SERVICE_BOOT_START = 0x0
|
|
||||||
; SERVICE_SYSTEM_START = 0x1
|
|
||||||
; SERVICE_AUTO_START = 0x2
|
|
||||||
; SERVICE_DEMAND_START = 0x3
|
|
||||||
; SERVICE_DISABLED = 0x4
|
|
||||||
;---------- Start Mode ---------------
|
|
||||||
|
|
||||||
[zttap300.service]
|
|
||||||
DisplayName = %DeviceDescription%
|
|
||||||
ServiceType = 1
|
|
||||||
StartType = 3
|
|
||||||
ErrorControl = 1
|
|
||||||
LoadOrderGroup = NDIS
|
|
||||||
ServiceBinary = %12%\zttap300.sys
|
|
||||||
|
|
||||||
;----------------- Copy Flags ------------
|
|
||||||
; COPYFLG_NOSKIP = 0x02
|
|
||||||
; COPYFLG_NOVERSIONCHECK = 0x04
|
|
||||||
;----------------- Copy Flags ------------
|
|
||||||
|
|
||||||
[SourceDisksNames]
|
|
||||||
1 = %DeviceDescription%, zttap300.sys
|
|
||||||
|
|
||||||
[SourceDisksFiles]
|
|
||||||
zttap300.sys = 1
|
|
||||||
|
|
||||||
[DestinationDirs]
|
|
||||||
zttap300.files = 11
|
|
||||||
zttap300.driver = 12
|
|
||||||
|
|
||||||
[zttap300.files]
|
|
||||||
;
|
|
||||||
|
|
||||||
[zttap300.driver]
|
|
||||||
zttap300.sys,,,6 ; COPYFLG_NOSKIP | COPYFLG_NOVERSIONCHECK
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
1
vendor/github.com/Microsoft/go-winio/.gitignore
generated
vendored
1
vendor/github.com/Microsoft/go-winio/.gitignore
generated
vendored
|
@ -1 +0,0 @@
|
||||||
*.exe
|
|
22
vendor/github.com/Microsoft/go-winio/LICENSE
generated
vendored
22
vendor/github.com/Microsoft/go-winio/LICENSE
generated
vendored
|
@ -1,22 +0,0 @@
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2015 Microsoft
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
22
vendor/github.com/Microsoft/go-winio/README.md
generated
vendored
22
vendor/github.com/Microsoft/go-winio/README.md
generated
vendored
|
@ -1,22 +0,0 @@
|
||||||
# go-winio
|
|
||||||
|
|
||||||
This repository contains utilities for efficiently performing Win32 IO operations in
|
|
||||||
Go. Currently, this is focused on accessing named pipes and other file handles, and
|
|
||||||
for using named pipes as a net transport.
|
|
||||||
|
|
||||||
This code relies on IO completion ports to avoid blocking IO on system threads, allowing Go
|
|
||||||
to reuse the thread to schedule another goroutine. This limits support to Windows Vista and
|
|
||||||
newer operating systems. This is similar to the implementation of network sockets in Go's net
|
|
||||||
package.
|
|
||||||
|
|
||||||
Please see the LICENSE file for licensing information.
|
|
||||||
|
|
||||||
This project has adopted the [Microsoft Open Source Code of
|
|
||||||
Conduct](https://opensource.microsoft.com/codeofconduct/). For more information
|
|
||||||
see the [Code of Conduct
|
|
||||||
FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact
|
|
||||||
[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional
|
|
||||||
questions or comments.
|
|
||||||
|
|
||||||
Thanks to natefinch for the inspiration for this library. See https://github.com/natefinch/npipe
|
|
||||||
for another named pipe implementation.
|
|
280
vendor/github.com/Microsoft/go-winio/backup.go
generated
vendored
280
vendor/github.com/Microsoft/go-winio/backup.go
generated
vendored
|
@ -1,280 +0,0 @@
|
||||||
// +build windows
|
|
||||||
|
|
||||||
package winio
|
|
||||||
|
|
||||||
import (
|
|
||||||
"encoding/binary"
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
|
||||||
"runtime"
|
|
||||||
"syscall"
|
|
||||||
"unicode/utf16"
|
|
||||||
)
|
|
||||||
|
|
||||||
//sys backupRead(h syscall.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupRead
|
|
||||||
//sys backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupWrite
|
|
||||||
|
|
||||||
const (
|
|
||||||
BackupData = uint32(iota + 1)
|
|
||||||
BackupEaData
|
|
||||||
BackupSecurity
|
|
||||||
BackupAlternateData
|
|
||||||
BackupLink
|
|
||||||
BackupPropertyData
|
|
||||||
BackupObjectId
|
|
||||||
BackupReparseData
|
|
||||||
BackupSparseBlock
|
|
||||||
BackupTxfsData
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
StreamSparseAttributes = uint32(8)
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
|
||||||
WRITE_DAC = 0x40000
|
|
||||||
WRITE_OWNER = 0x80000
|
|
||||||
ACCESS_SYSTEM_SECURITY = 0x1000000
|
|
||||||
)
|
|
||||||
|
|
||||||
// BackupHeader represents a backup stream of a file.
|
|
||||||
type BackupHeader struct {
|
|
||||||
Id uint32 // The backup stream ID
|
|
||||||
Attributes uint32 // Stream attributes
|
|
||||||
Size int64 // The size of the stream in bytes
|
|
||||||
Name string // The name of the stream (for BackupAlternateData only).
|
|
||||||
Offset int64 // The offset of the stream in the file (for BackupSparseBlock only).
|
|
||||||
}
|
|
||||||
|
|
||||||
type win32StreamId struct {
|
|
||||||
StreamId uint32
|
|
||||||
Attributes uint32
|
|
||||||
Size uint64
|
|
||||||
NameSize uint32
|
|
||||||
}
|
|
||||||
|
|
||||||
// BackupStreamReader reads from a stream produced by the BackupRead Win32 API and produces a series
|
|
||||||
// of BackupHeader values.
|
|
||||||
type BackupStreamReader struct {
|
|
||||||
r io.Reader
|
|
||||||
bytesLeft int64
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewBackupStreamReader produces a BackupStreamReader from any io.Reader.
|
|
||||||
func NewBackupStreamReader(r io.Reader) *BackupStreamReader {
|
|
||||||
return &BackupStreamReader{r, 0}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Next returns the next backup stream and prepares for calls to Read(). It skips the remainder of the current stream if
|
|
||||||
// it was not completely read.
|
|
||||||
func (r *BackupStreamReader) Next() (*BackupHeader, error) {
|
|
||||||
if r.bytesLeft > 0 {
|
|
||||||
if s, ok := r.r.(io.Seeker); ok {
|
|
||||||
// Make sure Seek on io.SeekCurrent sometimes succeeds
|
|
||||||
// before trying the actual seek.
|
|
||||||
if _, err := s.Seek(0, io.SeekCurrent); err == nil {
|
|
||||||
if _, err = s.Seek(r.bytesLeft, io.SeekCurrent); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
r.bytesLeft = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if _, err := io.Copy(ioutil.Discard, r); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var wsi win32StreamId
|
|
||||||
if err := binary.Read(r.r, binary.LittleEndian, &wsi); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
hdr := &BackupHeader{
|
|
||||||
Id: wsi.StreamId,
|
|
||||||
Attributes: wsi.Attributes,
|
|
||||||
Size: int64(wsi.Size),
|
|
||||||
}
|
|
||||||
if wsi.NameSize != 0 {
|
|
||||||
name := make([]uint16, int(wsi.NameSize/2))
|
|
||||||
if err := binary.Read(r.r, binary.LittleEndian, name); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
hdr.Name = syscall.UTF16ToString(name)
|
|
||||||
}
|
|
||||||
if wsi.StreamId == BackupSparseBlock {
|
|
||||||
if err := binary.Read(r.r, binary.LittleEndian, &hdr.Offset); err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
hdr.Size -= 8
|
|
||||||
}
|
|
||||||
r.bytesLeft = hdr.Size
|
|
||||||
return hdr, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read reads from the current backup stream.
|
|
||||||
func (r *BackupStreamReader) Read(b []byte) (int, error) {
|
|
||||||
if r.bytesLeft == 0 {
|
|
||||||
return 0, io.EOF
|
|
||||||
}
|
|
||||||
if int64(len(b)) > r.bytesLeft {
|
|
||||||
b = b[:r.bytesLeft]
|
|
||||||
}
|
|
||||||
n, err := r.r.Read(b)
|
|
||||||
r.bytesLeft -= int64(n)
|
|
||||||
if err == io.EOF {
|
|
||||||
err = io.ErrUnexpectedEOF
|
|
||||||
} else if r.bytesLeft == 0 && err == nil {
|
|
||||||
err = io.EOF
|
|
||||||
}
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// BackupStreamWriter writes a stream compatible with the BackupWrite Win32 API.
|
|
||||||
type BackupStreamWriter struct {
|
|
||||||
w io.Writer
|
|
||||||
bytesLeft int64
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewBackupStreamWriter produces a BackupStreamWriter on top of an io.Writer.
|
|
||||||
func NewBackupStreamWriter(w io.Writer) *BackupStreamWriter {
|
|
||||||
return &BackupStreamWriter{w, 0}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteHeader writes the next backup stream header and prepares for calls to Write().
|
|
||||||
func (w *BackupStreamWriter) WriteHeader(hdr *BackupHeader) error {
|
|
||||||
if w.bytesLeft != 0 {
|
|
||||||
return fmt.Errorf("missing %d bytes", w.bytesLeft)
|
|
||||||
}
|
|
||||||
name := utf16.Encode([]rune(hdr.Name))
|
|
||||||
wsi := win32StreamId{
|
|
||||||
StreamId: hdr.Id,
|
|
||||||
Attributes: hdr.Attributes,
|
|
||||||
Size: uint64(hdr.Size),
|
|
||||||
NameSize: uint32(len(name) * 2),
|
|
||||||
}
|
|
||||||
if hdr.Id == BackupSparseBlock {
|
|
||||||
// Include space for the int64 block offset
|
|
||||||
wsi.Size += 8
|
|
||||||
}
|
|
||||||
if err := binary.Write(w.w, binary.LittleEndian, &wsi); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if len(name) != 0 {
|
|
||||||
if err := binary.Write(w.w, binary.LittleEndian, name); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if hdr.Id == BackupSparseBlock {
|
|
||||||
if err := binary.Write(w.w, binary.LittleEndian, hdr.Offset); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
w.bytesLeft = hdr.Size
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write writes to the current backup stream.
|
|
||||||
func (w *BackupStreamWriter) Write(b []byte) (int, error) {
|
|
||||||
if w.bytesLeft < int64(len(b)) {
|
|
||||||
return 0, fmt.Errorf("too many bytes by %d", int64(len(b))-w.bytesLeft)
|
|
||||||
}
|
|
||||||
n, err := w.w.Write(b)
|
|
||||||
w.bytesLeft -= int64(n)
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
|
|
||||||
// BackupFileReader provides an io.ReadCloser interface on top of the BackupRead Win32 API.
|
|
||||||
type BackupFileReader struct {
|
|
||||||
f *os.File
|
|
||||||
includeSecurity bool
|
|
||||||
ctx uintptr
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewBackupFileReader returns a new BackupFileReader from a file handle. If includeSecurity is true,
|
|
||||||
// Read will attempt to read the security descriptor of the file.
|
|
||||||
func NewBackupFileReader(f *os.File, includeSecurity bool) *BackupFileReader {
|
|
||||||
r := &BackupFileReader{f, includeSecurity, 0}
|
|
||||||
return r
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read reads a backup stream from the file by calling the Win32 API BackupRead().
|
|
||||||
func (r *BackupFileReader) Read(b []byte) (int, error) {
|
|
||||||
var bytesRead uint32
|
|
||||||
err := backupRead(syscall.Handle(r.f.Fd()), b, &bytesRead, false, r.includeSecurity, &r.ctx)
|
|
||||||
if err != nil {
|
|
||||||
return 0, &os.PathError{"BackupRead", r.f.Name(), err}
|
|
||||||
}
|
|
||||||
runtime.KeepAlive(r.f)
|
|
||||||
if bytesRead == 0 {
|
|
||||||
return 0, io.EOF
|
|
||||||
}
|
|
||||||
return int(bytesRead), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close frees Win32 resources associated with the BackupFileReader. It does not close
|
|
||||||
// the underlying file.
|
|
||||||
func (r *BackupFileReader) Close() error {
|
|
||||||
if r.ctx != 0 {
|
|
||||||
backupRead(syscall.Handle(r.f.Fd()), nil, nil, true, false, &r.ctx)
|
|
||||||
runtime.KeepAlive(r.f)
|
|
||||||
r.ctx = 0
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// BackupFileWriter provides an io.WriteCloser interface on top of the BackupWrite Win32 API.
|
|
||||||
type BackupFileWriter struct {
|
|
||||||
f *os.File
|
|
||||||
includeSecurity bool
|
|
||||||
ctx uintptr
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewBackupFileWriter returns a new BackupFileWriter from a file handle. If includeSecurity is true,
|
|
||||||
// Write() will attempt to restore the security descriptor from the stream.
|
|
||||||
func NewBackupFileWriter(f *os.File, includeSecurity bool) *BackupFileWriter {
|
|
||||||
w := &BackupFileWriter{f, includeSecurity, 0}
|
|
||||||
return w
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write restores a portion of the file using the provided backup stream.
|
|
||||||
func (w *BackupFileWriter) Write(b []byte) (int, error) {
|
|
||||||
var bytesWritten uint32
|
|
||||||
err := backupWrite(syscall.Handle(w.f.Fd()), b, &bytesWritten, false, w.includeSecurity, &w.ctx)
|
|
||||||
if err != nil {
|
|
||||||
return 0, &os.PathError{"BackupWrite", w.f.Name(), err}
|
|
||||||
}
|
|
||||||
runtime.KeepAlive(w.f)
|
|
||||||
if int(bytesWritten) != len(b) {
|
|
||||||
return int(bytesWritten), errors.New("not all bytes could be written")
|
|
||||||
}
|
|
||||||
return len(b), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close frees Win32 resources associated with the BackupFileWriter. It does not
|
|
||||||
// close the underlying file.
|
|
||||||
func (w *BackupFileWriter) Close() error {
|
|
||||||
if w.ctx != 0 {
|
|
||||||
backupWrite(syscall.Handle(w.f.Fd()), nil, nil, true, false, &w.ctx)
|
|
||||||
runtime.KeepAlive(w.f)
|
|
||||||
w.ctx = 0
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// OpenForBackup opens a file or directory, potentially skipping access checks if the backup
|
|
||||||
// or restore privileges have been acquired.
|
|
||||||
//
|
|
||||||
// If the file opened was a directory, it cannot be used with Readdir().
|
|
||||||
func OpenForBackup(path string, access uint32, share uint32, createmode uint32) (*os.File, error) {
|
|
||||||
winPath, err := syscall.UTF16FromString(path)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
h, err := syscall.CreateFile(&winPath[0], access, share, nil, createmode, syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OPEN_REPARSE_POINT, 0)
|
|
||||||
if err != nil {
|
|
||||||
err = &os.PathError{Op: "open", Path: path, Err: err}
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return os.NewFile(uintptr(h), path), nil
|
|
||||||
}
|
|
137
vendor/github.com/Microsoft/go-winio/ea.go
generated
vendored
137
vendor/github.com/Microsoft/go-winio/ea.go
generated
vendored
|
@ -1,137 +0,0 @@
|
||||||
package winio
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"encoding/binary"
|
|
||||||
"errors"
|
|
||||||
)
|
|
||||||
|
|
||||||
type fileFullEaInformation struct {
|
|
||||||
NextEntryOffset uint32
|
|
||||||
Flags uint8
|
|
||||||
NameLength uint8
|
|
||||||
ValueLength uint16
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
fileFullEaInformationSize = binary.Size(&fileFullEaInformation{})
|
|
||||||
|
|
||||||
errInvalidEaBuffer = errors.New("invalid extended attribute buffer")
|
|
||||||
errEaNameTooLarge = errors.New("extended attribute name too large")
|
|
||||||
errEaValueTooLarge = errors.New("extended attribute value too large")
|
|
||||||
)
|
|
||||||
|
|
||||||
// ExtendedAttribute represents a single Windows EA.
|
|
||||||
type ExtendedAttribute struct {
|
|
||||||
Name string
|
|
||||||
Value []byte
|
|
||||||
Flags uint8
|
|
||||||
}
|
|
||||||
|
|
||||||
func parseEa(b []byte) (ea ExtendedAttribute, nb []byte, err error) {
|
|
||||||
var info fileFullEaInformation
|
|
||||||
err = binary.Read(bytes.NewReader(b), binary.LittleEndian, &info)
|
|
||||||
if err != nil {
|
|
||||||
err = errInvalidEaBuffer
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
nameOffset := fileFullEaInformationSize
|
|
||||||
nameLen := int(info.NameLength)
|
|
||||||
valueOffset := nameOffset + int(info.NameLength) + 1
|
|
||||||
valueLen := int(info.ValueLength)
|
|
||||||
nextOffset := int(info.NextEntryOffset)
|
|
||||||
if valueLen+valueOffset > len(b) || nextOffset < 0 || nextOffset > len(b) {
|
|
||||||
err = errInvalidEaBuffer
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ea.Name = string(b[nameOffset : nameOffset+nameLen])
|
|
||||||
ea.Value = b[valueOffset : valueOffset+valueLen]
|
|
||||||
ea.Flags = info.Flags
|
|
||||||
if info.NextEntryOffset != 0 {
|
|
||||||
nb = b[info.NextEntryOffset:]
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// DecodeExtendedAttributes decodes a list of EAs from a FILE_FULL_EA_INFORMATION
|
|
||||||
// buffer retrieved from BackupRead, ZwQueryEaFile, etc.
|
|
||||||
func DecodeExtendedAttributes(b []byte) (eas []ExtendedAttribute, err error) {
|
|
||||||
for len(b) != 0 {
|
|
||||||
ea, nb, err := parseEa(b)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
eas = append(eas, ea)
|
|
||||||
b = nb
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func writeEa(buf *bytes.Buffer, ea *ExtendedAttribute, last bool) error {
|
|
||||||
if int(uint8(len(ea.Name))) != len(ea.Name) {
|
|
||||||
return errEaNameTooLarge
|
|
||||||
}
|
|
||||||
if int(uint16(len(ea.Value))) != len(ea.Value) {
|
|
||||||
return errEaValueTooLarge
|
|
||||||
}
|
|
||||||
entrySize := uint32(fileFullEaInformationSize + len(ea.Name) + 1 + len(ea.Value))
|
|
||||||
withPadding := (entrySize + 3) &^ 3
|
|
||||||
nextOffset := uint32(0)
|
|
||||||
if !last {
|
|
||||||
nextOffset = withPadding
|
|
||||||
}
|
|
||||||
info := fileFullEaInformation{
|
|
||||||
NextEntryOffset: nextOffset,
|
|
||||||
Flags: ea.Flags,
|
|
||||||
NameLength: uint8(len(ea.Name)),
|
|
||||||
ValueLength: uint16(len(ea.Value)),
|
|
||||||
}
|
|
||||||
|
|
||||||
err := binary.Write(buf, binary.LittleEndian, &info)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = buf.Write([]byte(ea.Name))
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
err = buf.WriteByte(0)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = buf.Write(ea.Value)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = buf.Write([]byte{0, 0, 0}[0 : withPadding-entrySize])
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// EncodeExtendedAttributes encodes a list of EAs into a FILE_FULL_EA_INFORMATION
|
|
||||||
// buffer for use with BackupWrite, ZwSetEaFile, etc.
|
|
||||||
func EncodeExtendedAttributes(eas []ExtendedAttribute) ([]byte, error) {
|
|
||||||
var buf bytes.Buffer
|
|
||||||
for i := range eas {
|
|
||||||
last := false
|
|
||||||
if i == len(eas)-1 {
|
|
||||||
last = true
|
|
||||||
}
|
|
||||||
|
|
||||||
err := writeEa(&buf, &eas[i], last)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return buf.Bytes(), nil
|
|
||||||
}
|
|
323
vendor/github.com/Microsoft/go-winio/file.go
generated
vendored
323
vendor/github.com/Microsoft/go-winio/file.go
generated
vendored
|
@ -1,323 +0,0 @@
|
||||||
// +build windows
|
|
||||||
|
|
||||||
package winio
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"io"
|
|
||||||
"runtime"
|
|
||||||
"sync"
|
|
||||||
"sync/atomic"
|
|
||||||
"syscall"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
//sys cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) = CancelIoEx
|
|
||||||
//sys createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) = CreateIoCompletionPort
|
|
||||||
//sys getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) = GetQueuedCompletionStatus
|
|
||||||
//sys setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err error) = SetFileCompletionNotificationModes
|
|
||||||
//sys wsaGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult
|
|
||||||
|
|
||||||
type atomicBool int32
|
|
||||||
|
|
||||||
func (b *atomicBool) isSet() bool { return atomic.LoadInt32((*int32)(b)) != 0 }
|
|
||||||
func (b *atomicBool) setFalse() { atomic.StoreInt32((*int32)(b), 0) }
|
|
||||||
func (b *atomicBool) setTrue() { atomic.StoreInt32((*int32)(b), 1) }
|
|
||||||
func (b *atomicBool) swap(new bool) bool {
|
|
||||||
var newInt int32
|
|
||||||
if new {
|
|
||||||
newInt = 1
|
|
||||||
}
|
|
||||||
return atomic.SwapInt32((*int32)(b), newInt) == 1
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
|
||||||
cFILE_SKIP_COMPLETION_PORT_ON_SUCCESS = 1
|
|
||||||
cFILE_SKIP_SET_EVENT_ON_HANDLE = 2
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
ErrFileClosed = errors.New("file has already been closed")
|
|
||||||
ErrTimeout = &timeoutError{}
|
|
||||||
)
|
|
||||||
|
|
||||||
type timeoutError struct{}
|
|
||||||
|
|
||||||
func (e *timeoutError) Error() string { return "i/o timeout" }
|
|
||||||
func (e *timeoutError) Timeout() bool { return true }
|
|
||||||
func (e *timeoutError) Temporary() bool { return true }
|
|
||||||
|
|
||||||
type timeoutChan chan struct{}
|
|
||||||
|
|
||||||
var ioInitOnce sync.Once
|
|
||||||
var ioCompletionPort syscall.Handle
|
|
||||||
|
|
||||||
// ioResult contains the result of an asynchronous IO operation
|
|
||||||
type ioResult struct {
|
|
||||||
bytes uint32
|
|
||||||
err error
|
|
||||||
}
|
|
||||||
|
|
||||||
// ioOperation represents an outstanding asynchronous Win32 IO
|
|
||||||
type ioOperation struct {
|
|
||||||
o syscall.Overlapped
|
|
||||||
ch chan ioResult
|
|
||||||
}
|
|
||||||
|
|
||||||
func initIo() {
|
|
||||||
h, err := createIoCompletionPort(syscall.InvalidHandle, 0, 0, 0xffffffff)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
ioCompletionPort = h
|
|
||||||
go ioCompletionProcessor(h)
|
|
||||||
}
|
|
||||||
|
|
||||||
// win32File implements Reader, Writer, and Closer on a Win32 handle without blocking in a syscall.
|
|
||||||
// It takes ownership of this handle and will close it if it is garbage collected.
|
|
||||||
type win32File struct {
|
|
||||||
handle syscall.Handle
|
|
||||||
wg sync.WaitGroup
|
|
||||||
wgLock sync.RWMutex
|
|
||||||
closing atomicBool
|
|
||||||
socket bool
|
|
||||||
readDeadline deadlineHandler
|
|
||||||
writeDeadline deadlineHandler
|
|
||||||
}
|
|
||||||
|
|
||||||
type deadlineHandler struct {
|
|
||||||
setLock sync.Mutex
|
|
||||||
channel timeoutChan
|
|
||||||
channelLock sync.RWMutex
|
|
||||||
timer *time.Timer
|
|
||||||
timedout atomicBool
|
|
||||||
}
|
|
||||||
|
|
||||||
// makeWin32File makes a new win32File from an existing file handle
|
|
||||||
func makeWin32File(h syscall.Handle) (*win32File, error) {
|
|
||||||
f := &win32File{handle: h}
|
|
||||||
ioInitOnce.Do(initIo)
|
|
||||||
_, err := createIoCompletionPort(h, ioCompletionPort, 0, 0xffffffff)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
err = setFileCompletionNotificationModes(h, cFILE_SKIP_COMPLETION_PORT_ON_SUCCESS|cFILE_SKIP_SET_EVENT_ON_HANDLE)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
f.readDeadline.channel = make(timeoutChan)
|
|
||||||
f.writeDeadline.channel = make(timeoutChan)
|
|
||||||
return f, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func MakeOpenFile(h syscall.Handle) (io.ReadWriteCloser, error) {
|
|
||||||
// If we return the result of makeWin32File directly, it can result in an
|
|
||||||
// interface-wrapped nil, rather than a nil interface value.
|
|
||||||
f, err := makeWin32File(h)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
return f, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// closeHandle closes the resources associated with a Win32 handle
|
|
||||||
func (f *win32File) closeHandle() {
|
|
||||||
f.wgLock.Lock()
|
|
||||||
// Atomically set that we are closing, releasing the resources only once.
|
|
||||||
if !f.closing.swap(true) {
|
|
||||||
f.wgLock.Unlock()
|
|
||||||
// cancel all IO and wait for it to complete
|
|
||||||
cancelIoEx(f.handle, nil)
|
|
||||||
f.wg.Wait()
|
|
||||||
// at this point, no new IO can start
|
|
||||||
syscall.Close(f.handle)
|
|
||||||
f.handle = 0
|
|
||||||
} else {
|
|
||||||
f.wgLock.Unlock()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close closes a win32File.
|
|
||||||
func (f *win32File) Close() error {
|
|
||||||
f.closeHandle()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// prepareIo prepares for a new IO operation.
|
|
||||||
// The caller must call f.wg.Done() when the IO is finished, prior to Close() returning.
|
|
||||||
func (f *win32File) prepareIo() (*ioOperation, error) {
|
|
||||||
f.wgLock.RLock()
|
|
||||||
if f.closing.isSet() {
|
|
||||||
f.wgLock.RUnlock()
|
|
||||||
return nil, ErrFileClosed
|
|
||||||
}
|
|
||||||
f.wg.Add(1)
|
|
||||||
f.wgLock.RUnlock()
|
|
||||||
c := &ioOperation{}
|
|
||||||
c.ch = make(chan ioResult)
|
|
||||||
return c, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ioCompletionProcessor processes completed async IOs forever
|
|
||||||
func ioCompletionProcessor(h syscall.Handle) {
|
|
||||||
for {
|
|
||||||
var bytes uint32
|
|
||||||
var key uintptr
|
|
||||||
var op *ioOperation
|
|
||||||
err := getQueuedCompletionStatus(h, &bytes, &key, &op, syscall.INFINITE)
|
|
||||||
if op == nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
op.ch <- ioResult{bytes, err}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// asyncIo processes the return value from ReadFile or WriteFile, blocking until
|
|
||||||
// the operation has actually completed.
|
|
||||||
func (f *win32File) asyncIo(c *ioOperation, d *deadlineHandler, bytes uint32, err error) (int, error) {
|
|
||||||
if err != syscall.ERROR_IO_PENDING {
|
|
||||||
return int(bytes), err
|
|
||||||
}
|
|
||||||
|
|
||||||
if f.closing.isSet() {
|
|
||||||
cancelIoEx(f.handle, &c.o)
|
|
||||||
}
|
|
||||||
|
|
||||||
var timeout timeoutChan
|
|
||||||
if d != nil {
|
|
||||||
d.channelLock.Lock()
|
|
||||||
timeout = d.channel
|
|
||||||
d.channelLock.Unlock()
|
|
||||||
}
|
|
||||||
|
|
||||||
var r ioResult
|
|
||||||
select {
|
|
||||||
case r = <-c.ch:
|
|
||||||
err = r.err
|
|
||||||
if err == syscall.ERROR_OPERATION_ABORTED {
|
|
||||||
if f.closing.isSet() {
|
|
||||||
err = ErrFileClosed
|
|
||||||
}
|
|
||||||
} else if err != nil && f.socket {
|
|
||||||
// err is from Win32. Query the overlapped structure to get the winsock error.
|
|
||||||
var bytes, flags uint32
|
|
||||||
err = wsaGetOverlappedResult(f.handle, &c.o, &bytes, false, &flags)
|
|
||||||
}
|
|
||||||
case <-timeout:
|
|
||||||
cancelIoEx(f.handle, &c.o)
|
|
||||||
r = <-c.ch
|
|
||||||
err = r.err
|
|
||||||
if err == syscall.ERROR_OPERATION_ABORTED {
|
|
||||||
err = ErrTimeout
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// runtime.KeepAlive is needed, as c is passed via native
|
|
||||||
// code to ioCompletionProcessor, c must remain alive
|
|
||||||
// until the channel read is complete.
|
|
||||||
runtime.KeepAlive(c)
|
|
||||||
return int(r.bytes), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Read reads from a file handle.
|
|
||||||
func (f *win32File) Read(b []byte) (int, error) {
|
|
||||||
c, err := f.prepareIo()
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
defer f.wg.Done()
|
|
||||||
|
|
||||||
if f.readDeadline.timedout.isSet() {
|
|
||||||
return 0, ErrTimeout
|
|
||||||
}
|
|
||||||
|
|
||||||
var bytes uint32
|
|
||||||
err = syscall.ReadFile(f.handle, b, &bytes, &c.o)
|
|
||||||
n, err := f.asyncIo(c, &f.readDeadline, bytes, err)
|
|
||||||
runtime.KeepAlive(b)
|
|
||||||
|
|
||||||
// Handle EOF conditions.
|
|
||||||
if err == nil && n == 0 && len(b) != 0 {
|
|
||||||
return 0, io.EOF
|
|
||||||
} else if err == syscall.ERROR_BROKEN_PIPE {
|
|
||||||
return 0, io.EOF
|
|
||||||
} else {
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write writes to a file handle.
|
|
||||||
func (f *win32File) Write(b []byte) (int, error) {
|
|
||||||
c, err := f.prepareIo()
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
defer f.wg.Done()
|
|
||||||
|
|
||||||
if f.writeDeadline.timedout.isSet() {
|
|
||||||
return 0, ErrTimeout
|
|
||||||
}
|
|
||||||
|
|
||||||
var bytes uint32
|
|
||||||
err = syscall.WriteFile(f.handle, b, &bytes, &c.o)
|
|
||||||
n, err := f.asyncIo(c, &f.writeDeadline, bytes, err)
|
|
||||||
runtime.KeepAlive(b)
|
|
||||||
return n, err
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *win32File) SetReadDeadline(deadline time.Time) error {
|
|
||||||
return f.readDeadline.set(deadline)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *win32File) SetWriteDeadline(deadline time.Time) error {
|
|
||||||
return f.writeDeadline.set(deadline)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *win32File) Flush() error {
|
|
||||||
return syscall.FlushFileBuffers(f.handle)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *win32File) Fd() uintptr {
|
|
||||||
return uintptr(f.handle)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *deadlineHandler) set(deadline time.Time) error {
|
|
||||||
d.setLock.Lock()
|
|
||||||
defer d.setLock.Unlock()
|
|
||||||
|
|
||||||
if d.timer != nil {
|
|
||||||
if !d.timer.Stop() {
|
|
||||||
<-d.channel
|
|
||||||
}
|
|
||||||
d.timer = nil
|
|
||||||
}
|
|
||||||
d.timedout.setFalse()
|
|
||||||
|
|
||||||
select {
|
|
||||||
case <-d.channel:
|
|
||||||
d.channelLock.Lock()
|
|
||||||
d.channel = make(chan struct{})
|
|
||||||
d.channelLock.Unlock()
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
|
|
||||||
if deadline.IsZero() {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
timeoutIO := func() {
|
|
||||||
d.timedout.setTrue()
|
|
||||||
close(d.channel)
|
|
||||||
}
|
|
||||||
|
|
||||||
now := time.Now()
|
|
||||||
duration := deadline.Sub(now)
|
|
||||||
if deadline.After(now) {
|
|
||||||
// Deadline is in the future, set a timer to wait
|
|
||||||
d.timer = time.AfterFunc(duration, timeoutIO)
|
|
||||||
} else {
|
|
||||||
// Deadline is in the past. Cancel all pending IO now.
|
|
||||||
timeoutIO()
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
61
vendor/github.com/Microsoft/go-winio/fileinfo.go
generated
vendored
61
vendor/github.com/Microsoft/go-winio/fileinfo.go
generated
vendored
|
@ -1,61 +0,0 @@
|
||||||
// +build windows
|
|
||||||
|
|
||||||
package winio
|
|
||||||
|
|
||||||
import (
|
|
||||||
"os"
|
|
||||||
"runtime"
|
|
||||||
"syscall"
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
//sys getFileInformationByHandleEx(h syscall.Handle, class uint32, buffer *byte, size uint32) (err error) = GetFileInformationByHandleEx
|
|
||||||
//sys setFileInformationByHandle(h syscall.Handle, class uint32, buffer *byte, size uint32) (err error) = SetFileInformationByHandle
|
|
||||||
|
|
||||||
const (
|
|
||||||
fileBasicInfo = 0
|
|
||||||
fileIDInfo = 0x12
|
|
||||||
)
|
|
||||||
|
|
||||||
// FileBasicInfo contains file access time and file attributes information.
|
|
||||||
type FileBasicInfo struct {
|
|
||||||
CreationTime, LastAccessTime, LastWriteTime, ChangeTime syscall.Filetime
|
|
||||||
FileAttributes uint32
|
|
||||||
pad uint32 // padding
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetFileBasicInfo retrieves times and attributes for a file.
|
|
||||||
func GetFileBasicInfo(f *os.File) (*FileBasicInfo, error) {
|
|
||||||
bi := &FileBasicInfo{}
|
|
||||||
if err := getFileInformationByHandleEx(syscall.Handle(f.Fd()), fileBasicInfo, (*byte)(unsafe.Pointer(bi)), uint32(unsafe.Sizeof(*bi))); err != nil {
|
|
||||||
return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
|
|
||||||
}
|
|
||||||
runtime.KeepAlive(f)
|
|
||||||
return bi, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetFileBasicInfo sets times and attributes for a file.
|
|
||||||
func SetFileBasicInfo(f *os.File, bi *FileBasicInfo) error {
|
|
||||||
if err := setFileInformationByHandle(syscall.Handle(f.Fd()), fileBasicInfo, (*byte)(unsafe.Pointer(bi)), uint32(unsafe.Sizeof(*bi))); err != nil {
|
|
||||||
return &os.PathError{Op: "SetFileInformationByHandle", Path: f.Name(), Err: err}
|
|
||||||
}
|
|
||||||
runtime.KeepAlive(f)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// FileIDInfo contains the volume serial number and file ID for a file. This pair should be
|
|
||||||
// unique on a system.
|
|
||||||
type FileIDInfo struct {
|
|
||||||
VolumeSerialNumber uint64
|
|
||||||
FileID [16]byte
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetFileID retrieves the unique (volume, file ID) pair for a file.
|
|
||||||
func GetFileID(f *os.File) (*FileIDInfo, error) {
|
|
||||||
fileID := &FileIDInfo{}
|
|
||||||
if err := getFileInformationByHandleEx(syscall.Handle(f.Fd()), fileIDInfo, (*byte)(unsafe.Pointer(fileID)), uint32(unsafe.Sizeof(*fileID))); err != nil {
|
|
||||||
return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
|
|
||||||
}
|
|
||||||
runtime.KeepAlive(f)
|
|
||||||
return fileID, nil
|
|
||||||
}
|
|
9
vendor/github.com/Microsoft/go-winio/go.mod
generated
vendored
9
vendor/github.com/Microsoft/go-winio/go.mod
generated
vendored
|
@ -1,9 +0,0 @@
|
||||||
module github.com/Microsoft/go-winio
|
|
||||||
|
|
||||||
go 1.12
|
|
||||||
|
|
||||||
require (
|
|
||||||
github.com/pkg/errors v0.8.1
|
|
||||||
github.com/sirupsen/logrus v1.4.1
|
|
||||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b
|
|
||||||
)
|
|
16
vendor/github.com/Microsoft/go-winio/go.sum
generated
vendored
16
vendor/github.com/Microsoft/go-winio/go.sum
generated
vendored
|
@ -1,16 +0,0 @@
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
|
||||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
|
|
||||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
||||||
github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k=
|
|
||||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
|
||||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA=
|
|
||||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue