aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build-msbuild.yml34
-rw-r--r--.github/workflows/build.yml8
-rw-r--r--.gitignore97
-rw-r--r--src/lib/ndpi_utils.c2
-rw-r--r--src/lib/third_party/src/gcrypt/digest.c2
-rw-r--r--src/lib/third_party/src/roaring.cc30
-rw-r--r--windows/nDPI.sln25
-rw-r--r--windows/nDPI.vcxproj454
-rw-r--r--windows/nDPI.vcxproj.filters298
-rw-r--r--windows/src/getopt.c117
-rw-r--r--windows/src/getopt.h6
-rw-r--r--windows/src/win-gettimeofday.c55
12 files changed, 1064 insertions, 64 deletions
diff --git a/.github/workflows/build-msbuild.yml b/.github/workflows/build-msbuild.yml
new file mode 100644
index 000000000..289c665ac
--- /dev/null
+++ b/.github/workflows/build-msbuild.yml
@@ -0,0 +1,34 @@
+name: MSBuild
+on:
+ push:
+ branches:
+ - dev
+ pull_request:
+ branches:
+ - dev
+ types: [opened, synchronize, reopened]
+ release:
+ types: [created]
+jobs:
+ test:
+ name: MSBuild
+ runs-on: windows-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Add msbuild to PATH
+ uses: microsoft/setup-msbuild@v1.1
+
+ - name: Build solution for release
+ run: msbuild windows/nDPI.sln -t:rebuild -property:Configuration=Release
+
+ - name: Build solution for debug
+ run: msbuild windows/nDPI.sln -t:rebuild -property:Configuration=Debug
+
+ - name: Upload artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: build-artifacts
+ path: x64
+ retention-days: 14
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6688322bb..c982c310f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -342,14 +342,14 @@ jobs:
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'clang')
run: |
sudo apt-get install ${{ matrix.compiler }}
- - name: Install Windows prerequisites
+ - name: Install Windows msys2 prerequisites
if: startsWith(matrix.os, 'windows')
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain automake1.16 automake-wrapper autoconf libtool make mingw-w64-x86_64-json-c mingw-w64-x86_64-crt-git mingw-w64-x86_64-pcre mingw-w64-x86_64-libpcap
- - name: Setup Windows prerequisites (libgcrypt)
+ - name: Setup Windows msys2 prerequisites (libgcrypt)
if: startsWith(matrix.os, 'windows') && startsWith(matrix.gcrypt, '--with-local-libgcrypt')
run: |
msys2 -c 'git clone --branch libgpg-error-1.42 https://github.com/gpg/libgpg-error'
@@ -395,11 +395,11 @@ jobs:
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'cc')
run: |
./autogen.sh --enable-option-checking=fatal --enable-debug-messages ${{ matrix.gcrypt }} ${{ matrix.msan }} ${{ matrix.pcre }} ${{ matrix.maxminddb }} --enable-tls-sigs
- - name: Configure nDPI on Windows
+ - name: Configure nDPI on Windows msys2
if: startsWith(matrix.os, 'windows') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'cc')
run: |
msys2 -c './autogen.sh --enable-option-checking=fatal --enable-debug-messages --enable-tls-sigs --disable-npcap ${{ matrix.gcrypt }}'
- - name: Build nDPI on Windows
+ - name: Build nDPI on Windows msys2
if: startsWith(matrix.os, 'windows') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'cc')
run: |
msys2 -c 'make all'
diff --git a/.gitignore b/.gitignore
index 1b4ccc971..74a832df7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,34 @@
+*.[o]
+*.db
+*.db-*
+*.dll
+*.ilk
+*.in
+*.ipch
+*.ko
+*.la
+*.lo
+*.log
+*.obj
+*.opendb
+*.pdb
+*.recipe
+*.suo
+*.swp
+*.tlog
+*.user
+*o.cmd
+*o.cmd
*~
+.autotools
+.cproject
+.dirstamp
+.libs
+.project
+.settings
+/Makefile
/aclocal.m4
/autom4te.cache/
-.autotools
-compile
/compile
/config.guess
/config.h
@@ -12,72 +38,57 @@ compile
/config.sub
/configure
/configure.tmp
-.cproject
/depcomp
-.dirstamp
+/doc/Doxyfile.cfg
/example/.deps/
/example/Makefile
-/example/ndpiReader
/example/Makefile.dpdk
/example/build
+/example/libndpiReader.a
+/example/ndpiReader
+/example/ndpiReader.exe
/example/ndpiSimpleIntegration
-*.in
+/fuzz/.deps/
+/fuzz/Makefile
+/fuzz/fuzz_ndpi_reader
+/fuzz/fuzz_ndpi_reader_with_main
+/fuzz/fuzz_process_packet
+/fuzz/fuzz_process_packet_with_main
+/influxdb/Makefile
/install-sh
-*.ko
-*.la
/libndpi.pc
-.libs
/libtool
-*.lo
/ltmain.sh
/m4/libtool.m4
-/m4/lt~obsolete.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
-/Makefile
+/m4/lt~obsolete.m4
/missing
-*.[o]
-*.obj
-*o.cmd
-*o.cmd
-.project
-.settings
+/rrdtool/Makefile
+/rrdtool/rrd_anomaly
+/rrdtool/rrd_similarity
/src/include/Makefile
-/src/include/ndpi_config.h
/src/include/ndpi_api.h
+/src/include/ndpi_config.h
/src/include/ndpi_define.h
/src/lib/.deps/
/src/lib/Makefile
+/src/lib/libndpi-*.dll
+/src/lib/libndpi.4
+/src/lib/libndpi.a
+/src/lib/libndpi.so*
/src/lib/protocols/.deps/
/src/lib/third_party/src/.deps/
-stamp-h1
-*.swp
+/tags
/test-driver
/tests/Makefile
-/fuzz/.deps/
-/fuzz/Makefile
-/fuzz/fuzz_ndpi_reader
-/fuzz/fuzz_ndpi_reader_with_main
-/fuzz/fuzz_process_packet
-/fuzz/fuzz_process_packet_with_main
/tests/dga/Makefile
-/tests/do.sh
-/tests/unit/Makefile
-/example/libndpiReader.a
-/example/ndpiReader.exe
-/src/lib/libndpi.a
-/src/lib/libndpi.so*
-/src/lib/libndpi
-/src/lib/libndpi-*.dll
-/src/lib/libndpi.4
/tests/dga/dga_evaluate
/tests/dga/dga_evaluate.exe
-/tests/unit/unit
-/tags
-/rrdtool/Makefile
-/rrdtool/rrd_anomaly
-/rrdtool/rrd_similarity
+/tests/do.sh
/tests/performance/Makefile
-/influxdb/Makefile
-/doc/Doxyfile.cfg
+/tests/unit/Makefile
+/tests/unit/unit
+compile
+stamp-h1
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c
index d7de4e713..2dc39dd3c 100644
--- a/src/lib/ndpi_utils.c
+++ b/src/lib/ndpi_utils.c
@@ -1538,7 +1538,7 @@ int ndpi_flow2json(struct ndpi_detection_module_struct *ndpi_struct,
u_int16_t src_port, u_int16_t dst_port,
ndpi_protocol l7_protocol,
ndpi_serializer *serializer) {
- char src_name[32] = {}, dst_name[32] = {};
+ char src_name[32] = {'\0'}, dst_name[32] = {'\0'};
if(ip_version == 4) {
inet_ntop(AF_INET, &src_v4, src_name, sizeof(src_name));
diff --git a/src/lib/third_party/src/gcrypt/digest.c b/src/lib/third_party/src/gcrypt/digest.c
index e68d905cf..48e6eea97 100644
--- a/src/lib/third_party/src/gcrypt/digest.c
+++ b/src/lib/third_party/src/gcrypt/digest.c
@@ -130,7 +130,7 @@ sha256_init(sha256_t *p)
static void
sha256_transform(uint32_t *state, const uint32_t *data)
{
- uint32_t W[16] = {};
+ uint32_t W[16] = {0};
unsigned j;
#ifdef _SHA256_UNROLL2
uint32_t a,b,c,d,e,f,g,h;
diff --git a/src/lib/third_party/src/roaring.cc b/src/lib/third_party/src/roaring.cc
index a2668fcda..36b96bed3 100644
--- a/src/lib/third_party/src/roaring.cc
+++ b/src/lib/third_party/src/roaring.cc
@@ -11983,7 +11983,7 @@ static void binarySearch2(const uint16_t *array, int32_t n, uint16_t target1,
* and binarySearch2. This approach can be slightly superior to a conventional
* galloping search in some instances.
*/
-static int32_t intersect_skewed_uint16(const uint16_t *small, size_t size_s,
+static int32_t intersect_skewed_uint16(const uint16_t *small_set, size_t size_s,
const uint16_t *large, size_t size_l,
uint16_t *buffer) {
size_t pos = 0, idx_l = 0, idx_s = 0;
@@ -11993,10 +11993,10 @@ static int32_t intersect_skewed_uint16(const uint16_t *small, size_t size_s,
}
int32_t index1 = 0, index2 = 0, index3 = 0, index4 = 0;
while ((idx_s + 4 <= size_s) && (idx_l < size_l)) {
- uint16_t target1 = small[idx_s];
- uint16_t target2 = small[idx_s + 1];
- uint16_t target3 = small[idx_s + 2];
- uint16_t target4 = small[idx_s + 3];
+ uint16_t target1 = small_set[idx_s];
+ uint16_t target2 = small_set[idx_s + 1];
+ uint16_t target3 = small_set[idx_s + 2];
+ uint16_t target4 = small_set[idx_s + 3];
binarySearch4(large + idx_l, (int32_t)(size_l - idx_l), target1, target2, target3,
target4, &index1, &index2, &index3, &index4);
if ((index1 + idx_l < size_l) && (large[idx_l + index1] == target1)) {
@@ -12015,8 +12015,8 @@ static int32_t intersect_skewed_uint16(const uint16_t *small, size_t size_s,
idx_l += index4;
}
if ((idx_s + 2 <= size_s) && (idx_l < size_l)) {
- uint16_t target1 = small[idx_s];
- uint16_t target2 = small[idx_s + 1];
+ uint16_t target1 = small_set[idx_s];
+ uint16_t target2 = small_set[idx_s + 1];
binarySearch2(large + idx_l, (int32_t)(size_l - idx_l), target1, target2, &index1,
&index2);
if ((index1 + idx_l < size_l) && (large[idx_l + index1] == target1)) {
@@ -12029,7 +12029,7 @@ static int32_t intersect_skewed_uint16(const uint16_t *small, size_t size_s,
idx_l += index2;
}
if ((idx_s < size_s) && (idx_l < size_l)) {
- uint16_t val_s = small[idx_s];
+ uint16_t val_s = small_set[idx_s];
int32_t index = binarySearch(large + idx_l, (int32_t)(size_l - idx_l), val_s);
if (index >= 0)
buffer[pos++] = val_s;
@@ -12040,7 +12040,7 @@ static int32_t intersect_skewed_uint16(const uint16_t *small, size_t size_s,
// TODO: this could be accelerated, possibly, by using binarySearch4 as above.
-static int32_t intersect_skewed_uint16_cardinality(const uint16_t *small,
+static int32_t intersect_skewed_uint16_cardinality(const uint16_t *small_set,
size_t size_s,
const uint16_t *large,
size_t size_l) {
@@ -12050,7 +12050,7 @@ static int32_t intersect_skewed_uint16_cardinality(const uint16_t *small,
return 0;
}
- uint16_t val_l = large[idx_l], val_s = small[idx_s];
+ uint16_t val_l = large[idx_l], val_s = small_set[idx_s];
while (true) {
if (val_l < val_s) {
@@ -12060,12 +12060,12 @@ static int32_t intersect_skewed_uint16_cardinality(const uint16_t *small,
} else if (val_s < val_l) {
idx_s++;
if (idx_s == size_s) break;
- val_s = small[idx_s];
+ val_s = small_set[idx_s];
} else {
pos++;
idx_s++;
if (idx_s == size_s) break;
- val_s = small[idx_s];
+ val_s = small_set[idx_s];
idx_l = advanceUntil(large, (int32_t)idx_l, (int32_t)size_l, val_s);
if (idx_l == size_l) break;
val_l = large[idx_l];
@@ -12075,7 +12075,7 @@ static int32_t intersect_skewed_uint16_cardinality(const uint16_t *small,
return (int32_t)pos;
}
-bool intersect_skewed_uint16_nonempty(const uint16_t *small, size_t size_s,
+bool intersect_skewed_uint16_nonempty(const uint16_t *small_set, size_t size_s,
const uint16_t *large, size_t size_l) {
size_t idx_l = 0, idx_s = 0;
@@ -12083,7 +12083,7 @@ bool intersect_skewed_uint16_nonempty(const uint16_t *small, size_t size_s,
return false;
}
- uint16_t val_l = large[idx_l], val_s = small[idx_s];
+ uint16_t val_l = large[idx_l], val_s = small_set[idx_s];
while (true) {
if (val_l < val_s) {
@@ -12093,7 +12093,7 @@ bool intersect_skewed_uint16_nonempty(const uint16_t *small, size_t size_s,
} else if (val_s < val_l) {
idx_s++;
if (idx_s == size_s) break;
- val_s = small[idx_s];
+ val_s = small_set[idx_s];
} else {
return true;
}
diff --git a/windows/nDPI.sln b/windows/nDPI.sln
new file mode 100644
index 000000000..e98141873
--- /dev/null
+++ b/windows/nDPI.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.32126.315
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nDPI", "nDPI.vcxproj", "{7331961B-A2B5-45B1-B144-AFDEFBB0EB01}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7331961B-A2B5-45B1-B144-AFDEFBB0EB01}.Debug|x64.ActiveCfg = Debug|x64
+ {7331961B-A2B5-45B1-B144-AFDEFBB0EB01}.Debug|x64.Build.0 = Debug|x64
+ {7331961B-A2B5-45B1-B144-AFDEFBB0EB01}.Release|x64.ActiveCfg = Release|x64
+ {7331961B-A2B5-45B1-B144-AFDEFBB0EB01}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {ED429DB6-BA49-4281-943C-0E57E33B5735}
+ EndGlobalSection
+EndGlobal
diff --git a/windows/nDPI.vcxproj b/windows/nDPI.vcxproj
new file mode 100644
index 000000000..9686f2be6
--- /dev/null
+++ b/windows/nDPI.vcxproj
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{7331961B-A2B5-45B1-B144-AFDEFBB0EB01}</ProjectGuid>
+ <RootNamespace>nDPIdev</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>nDPI</ProjectName>
+ <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v142</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" 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>
+ <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>$(ProjectDir)bin\$(Platform)_$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)obj\$(ProjectName)_$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ <IntDir>$(SolutionDir)obj\$(ProjectName)_$(Configuration)_$(Platform)\</IntDir>
+ <OutDir>$(ProjectDir)bin\$(Platform)_$(Configuration)\</OutDir>
+ <IncludePath>$(ProjectDir);$(ProjectDir)dummy\folder\;$(IncludePath)</IncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>$(ProjectDir)bin\$(Platform)_$(Configuration)\</OutDir>
+ <IntDir>$(SolutionDir)obj\$(ProjectName)_$(Configuration)_$(Platform)\</IntDir>
+ <LinkIncremental>false</LinkIncremental>
+ <IncludePath>$(ProjectDir);$(ProjectDir)dummy\folder\;$(IncludePath)</IncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ <IntDir>$(SolutionDir)obj\$(ProjectName)_$(Configuration)_$(Platform)\</IntDir>
+ <OutDir>$(ProjectDir)bin\$(Platform)_$(Configuration)\</OutDir>
+ <IncludePath>$(ProjectDir);$(ProjectDir)dummy\folder\;$(IncludePath)</IncludePath>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\src\lib\protocols\;$(ProjectDir)..\src\include\;$(ProjectDir)..\;$(ProjectDir)..\src\lib\third_party\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>false</MinimalRebuild>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader />
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <StringPooling>false</StringPooling>
+ <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <ExceptionHandling>false</ExceptionHandling>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <FullProgramDatabaseFile>true</FullProgramDatabaseFile>
+ <AssemblyDebug>true</AssemblyDebug>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>$(ProjectDir)src\;$(ProjectDir)..\src\lib\protocols\;$(ProjectDir)..\src\include\;$(ProjectDir)..\;$(ProjectDir)..\src\lib\third_party\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDPI_LIB_COMPILATION;WIN32;_WIN64;_DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>Default</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <StringPooling>false</StringPooling>
+ <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <ExceptionHandling>false</ExceptionHandling>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <AdditionalUsingDirectories>$(ProjectDir);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
+ <LanguageStandard_C>Default</LanguageStandard_C>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <FullProgramDatabaseFile>true</FullProgramDatabaseFile>
+ <AssemblyDebug>true</AssemblyDebug>
+ </Link>
+ <PostBuildEvent>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader />
+ <WarningLevel>TurnOffAllWarnings</WarningLevel>
+ <DebugInformationFormat>None</DebugInformationFormat>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\src\lib\protocols\;$(ProjectDir)..\src\include\;$(ProjectDir)..\;$(ProjectDir)..\src\lib\third_party\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
+ <AdditionalUsingDirectories>$(ProjectDir);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>TurnOffAllWarnings</WarningLevel>
+ <DebugInformationFormat>None</DebugInformationFormat>
+ <AdditionalIncludeDirectories>$(ProjectDir)..\src\lib\protocols\;$(ProjectDir)..\src\include\;$(ProjectDir)..\;$(ProjectDir)..\src\lib\third_party\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <ProgramDataBaseFileName>$(TargetDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <EnableParallelCodeGeneration>true</EnableParallelCodeGeneration>
+ <AdditionalUsingDirectories>$(ProjectDir);%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
+ <ExceptionHandling>Sync</ExceptionHandling>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <LanguageStandard_C>Default</LanguageStandard_C>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>false</GenerateDebugInformation>
+ <SubSystem>Console</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\src\lib\ndpi_analyze.c" />
+ <ClCompile Include="..\src\lib\ndpi_bitmap.c" />
+ <ClCompile Include="..\src\lib\ndpi_classify.c" />
+ <ClCompile Include="..\src\lib\ndpi_community_id.c" />
+ <ClCompile Include="..\src\lib\ndpi_geoip.c" />
+ <ClCompile Include="..\src\lib\ndpi_main.c" />
+ <ClCompile Include="..\src\lib\ndpi_serializer.c" />
+ <ClCompile Include="..\src\lib\ndpi_utils.c" />
+ <ClCompile Include="..\src\lib\protocols\activision.c" />
+ <ClCompile Include="..\src\lib\protocols\afp.c" />
+ <ClCompile Include="..\src\lib\protocols\ajp.c" />
+ <ClCompile Include="..\src\lib\protocols\alicloud.c" />
+ <ClCompile Include="..\src\lib\protocols\amazon_video.c" />
+ <ClCompile Include="..\src\lib\protocols\among_us.c" />
+ <ClCompile Include="..\src\lib\protocols\amqp.c" />
+ <ClCompile Include="..\src\lib\protocols\apple_push.c" />
+ <ClCompile Include="..\src\lib\protocols\avast.c" />
+ <ClCompile Include="..\src\lib\protocols\avast_securedns.c" />
+ <ClCompile Include="..\src\lib\protocols\bjnp.c" />
+ <ClCompile Include="..\src\lib\protocols\capwap.c" />
+ <ClCompile Include="..\src\lib\protocols\cassandra.c" />
+ <ClCompile Include="..\src\lib\protocols\checkmk.c" />
+ <ClCompile Include="..\src\lib\protocols\collectd.c" />
+ <ClCompile Include="..\src\lib\protocols\cpha.c" />
+ <ClCompile Include="..\src\lib\protocols\csgo.c" />
+ <ClCompile Include="..\src\lib\protocols\diameter.c" />
+ <ClCompile Include="..\src\lib\protocols\discord.c" />
+ <ClCompile Include="..\src\lib\protocols\dnp3.c" />
+ <ClCompile Include="..\src\lib\protocols\dnscrypt.c" />
+ <ClCompile Include="..\src\lib\protocols\ethernet_ip.c" />
+ <ClCompile Include="..\src\lib\protocols\fastcgi.c" />
+ <ClCompile Include="..\src\lib\protocols\fix.c" />
+ <ClCompile Include="..\src\lib\protocols\genshin_impact.c" />
+ <ClCompile Include="..\src\lib\protocols\hpvirtgrp.c" />
+ <ClCompile Include="..\src\lib\protocols\hsrp.c" />
+ <ClCompile Include="..\src\lib\protocols\i3d.c" />
+ <ClCompile Include="..\src\lib\protocols\iec60870-5-104.c" />
+ <ClCompile Include="..\src\lib\protocols\imo.c" />
+ <ClCompile Include="..\src\lib\protocols\ipsec.c" />
+ <ClCompile Include="..\src\lib\protocols\kismet.c" />
+ <ClCompile Include="..\src\lib\protocols\lisp.c" />
+ <ClCompile Include="..\src\lib\protocols\memcached.c" />
+ <ClCompile Include="..\src\lib\protocols\mining.c" />
+ <ClCompile Include="..\src\lib\protocols\modbus.c" />
+ <ClCompile Include="..\src\lib\protocols\mongodb.c" />
+ <ClCompile Include="..\src\lib\protocols\mpegdash.c" />
+ <ClCompile Include="..\src\lib\protocols\nats.c" />
+ <ClCompile Include="..\src\lib\protocols\nest_log_sink.c" />
+ <ClCompile Include="..\src\lib\protocols\nintendo.c" />
+ <ClCompile Include="..\src\lib\protocols\ookla.c" />
+ <ClCompile Include="..\src\lib\protocols\raknet.c" />
+ <ClCompile Include="..\src\lib\protocols\riotgames.c" />
+ <ClCompile Include="..\src\lib\protocols\rsh.c" />
+ <ClCompile Include="..\src\lib\protocols\s7comm.c" />
+ <ClCompile Include="..\src\lib\protocols\sd_rtn.c" />
+ <ClCompile Include="..\src\lib\protocols\smpp.c" />
+ <ClCompile Include="..\src\lib\protocols\snmp_proto.c" />
+ <ClCompile Include="..\src\lib\protocols\soap.c" />
+ <ClCompile Include="..\src\lib\protocols\softether.c" />
+ <ClCompile Include="..\src\lib\protocols\someip.c" />
+ <ClCompile Include="..\src\lib\protocols\threema.c" />
+ <ClCompile Include="..\src\lib\protocols\tinc.c" />
+ <ClCompile Include="..\src\lib\protocols\tivoconnect.c" />
+ <ClCompile Include="..\src\lib\protocols\tls.c" />
+ <ClCompile Include="..\src\lib\protocols\tocaboca.c" />
+ <ClCompile Include="..\src\lib\protocols\ultrasurf.c" />
+ <ClCompile Include="..\src\lib\protocols\vxlan.c" />
+ <ClCompile Include="..\src\lib\protocols\websocket.c" />
+ <ClCompile Include="..\src\lib\protocols\whatsapp.c" />
+ <ClCompile Include="..\src\lib\protocols\wireguard.c" />
+ <ClCompile Include="..\src\lib\protocols\wsd.c" />
+ <ClCompile Include="..\src\lib\protocols\xiaomi.c" />
+ <ClCompile Include="..\src\lib\protocols\z3950.c" />
+ <ClCompile Include="..\src\lib\protocols\zabbix.c" />
+ <ClCompile Include="..\src\lib\third_party\src\ahocorasick.c" />
+ <ClCompile Include="..\src\lib\protocols\aimini.c" />
+ <ClCompile Include="..\src\lib\protocols\applejuice.c" />
+ <ClCompile Include="..\src\lib\protocols\armagetron.c" />
+ <ClCompile Include="..\src\lib\protocols\ayiya.c" />
+ <ClCompile Include="..\src\lib\protocols\bgp.c" />
+ <ClCompile Include="..\src\lib\protocols\bittorrent.c" />
+ <ClCompile Include="..\src\lib\protocols\btlib.c" />
+ <ClCompile Include="..\src\lib\protocols\ciscovpn.c" />
+ <ClCompile Include="..\src\lib\protocols\citrix.c" />
+ <ClCompile Include="..\src\lib\protocols\coap.c" />
+ <ClCompile Include="..\src\lib\protocols\corba.c" />
+ <ClCompile Include="..\src\lib\protocols\crossfire.c" />
+ <ClCompile Include="..\src\lib\protocols\dcerpc.c" />
+ <ClCompile Include="..\src\lib\protocols\dhcp.c" />
+ <ClCompile Include="..\src\lib\protocols\dhcpv6.c" />
+ <ClCompile Include="..\src\lib\protocols\directconnect.c" />
+ <ClCompile Include="..\src\lib\protocols\directdownloadlink.c" />
+ <ClCompile Include="..\src\lib\protocols\dns.c" />
+ <ClCompile Include="..\src\lib\protocols\dofus.c" />
+ <ClCompile Include="..\src\lib\protocols\drda.c" />
+ <ClCompile Include="..\src\lib\protocols\dropbox.c" />
+ <ClCompile Include="..\src\lib\protocols\eaq.c" />
+ <ClCompile Include="..\src\lib\protocols\edonkey.c" />
+ <ClCompile Include="..\src\lib\protocols\fasttrack.c" />
+ <ClCompile Include="..\src\lib\protocols\fiesta.c" />
+ <ClCompile Include="..\src\lib\protocols\florensia.c" />
+ <ClCompile Include="..\src\lib\protocols\ftp_control.c" />
+ <ClCompile Include="..\src\lib\protocols\ftp_data.c" />
+ <ClCompile Include="..\src\lib\protocols\git.c" />
+ <ClCompile Include="..\src\lib\protocols\gnutella.c" />
+ <ClCompile Include="..\src\lib\protocols\gtp.c" />
+ <ClCompile Include="..\src\lib\protocols\guildwars.c" />
+ <ClCompile Include="..\src\lib\protocols\h323.c" />
+ <ClCompile Include="..\src\lib\protocols\halflife2_and_mods.c" />
+ <ClCompile Include="..\src\lib\protocols\hangout.c" />
+ <ClCompile Include="..\src\lib\protocols\http.c" />
+ <ClCompile Include="..\src\lib\protocols\iax.c" />
+ <ClCompile Include="..\src\lib\protocols\icecast.c" />
+ <ClCompile Include="..\src\lib\protocols\ipp.c" />
+ <ClCompile Include="..\src\lib\protocols\irc.c" />
+ <ClCompile Include="..\src\lib\protocols\jabber.c" />
+ <ClCompile Include="..\src\lib\protocols\kakaotalk_voice.c" />
+ <ClCompile Include="..\src\lib\protocols\kerberos.c" />
+ <ClCompile Include="..\src\lib\protocols\kontiki.c" />
+ <ClCompile Include="..\src\lib\protocols\ldap.c" />
+ <ClCompile Include="..\src\lib\protocols\lotus_notes.c" />
+ <ClCompile Include="..\src\lib\protocols\mail_imap.c" />
+ <ClCompile Include="..\src\lib\protocols\mail_pop.c" />
+ <ClCompile Include="..\src\lib\protocols\mail_smtp.c" />
+ <ClCompile Include="..\src\lib\protocols\maplestory.c" />
+ <ClCompile Include="..\src\lib\protocols\megaco.c" />
+ <ClCompile Include="..\src\lib\protocols\mgcp.c" />
+ <ClCompile Include="..\src\lib\protocols\mpegts.c" />
+ <ClCompile Include="..\src\lib\protocols\mqtt.c" />
+ <ClCompile Include="..\src\lib\protocols\mssql_tds.c" />
+ <ClCompile Include="..\src\lib\protocols\mysql.c" />
+ <ClCompile Include="..\src\lib\protocols\netbios.c" />
+ <ClCompile Include="..\src\lib\protocols\netflow.c" />
+ <ClCompile Include="..\src\lib\protocols\nfs.c" />
+ <ClCompile Include="..\src\lib\protocols\noe.c" />
+ <ClCompile Include="..\src\lib\protocols\non_tcp_udp.c" />
+ <ClCompile Include="..\src\lib\protocols\ntp.c" />
+ <ClCompile Include="..\src\lib\protocols\openft.c" />
+ <ClCompile Include="..\src\lib\protocols\openvpn.c" />
+ <ClCompile Include="..\src\lib\protocols\oracle.c" />
+ <ClCompile Include="..\src\lib\protocols\postgres.c" />
+ <ClCompile Include="..\src\lib\protocols\ppstream.c" />
+ <ClCompile Include="..\src\lib\protocols\pptp.c" />
+ <ClCompile Include="..\src\lib\protocols\qq.c" />
+ <ClCompile Include="..\src\lib\protocols\quic.c" />
+ <ClCompile Include="..\src\lib\protocols\radius.c" />
+ <ClCompile Include="..\src\lib\protocols\rdp.c" />
+ <ClCompile Include="..\src\lib\protocols\redis_net.c" />
+ <ClCompile Include="..\src\lib\protocols\rsync.c" />
+ <ClCompile Include="..\src\lib\protocols\rtcp.c" />
+ <ClCompile Include="..\src\lib\protocols\rtmp.c" />
+ <ClCompile Include="..\src\lib\protocols\rtp.c" />
+ <ClCompile Include="..\src\lib\protocols\rtsp.c" />
+ <ClCompile Include="..\src\lib\protocols\rx.c" />
+ <ClCompile Include="..\src\lib\protocols\sflow.c" />
+ <ClCompile Include="..\src\lib\protocols\shoutcast.c" />
+ <ClCompile Include="..\src\lib\protocols\sip.c" />
+ <ClCompile Include="..\src\lib\protocols\skinny.c" />
+ <ClCompile Include="..\src\lib\protocols\skype.c" />
+ <ClCompile Include="..\src\lib\protocols\smb.c" />
+ <ClCompile Include="..\src\lib\protocols\socks45.c" />
+ <ClCompile Include="..\src\lib\protocols\sopcast.c" />
+ <ClCompile Include="..\src\lib\protocols\spotify.c" />
+ <ClCompile Include="..\src\lib\protocols\ssdp.c" />
+ <ClCompile Include="..\src\lib\protocols\ssh.c" />
+ <ClCompile Include="..\src\lib\protocols\starcraft.c" />
+ <ClCompile Include="..\src\lib\protocols\stealthnet.c" />
+ <ClCompile Include="..\src\lib\protocols\steam.c" />
+ <ClCompile Include="..\src\lib\protocols\stun.c" />
+ <ClCompile Include="..\src\lib\protocols\syslog.c" />
+ <ClCompile Include="..\src\lib\protocols\tcp_udp.c" />
+ <ClCompile Include="..\src\lib\protocols\teamspeak.c" />
+ <ClCompile Include="..\src\lib\protocols\teamviewer.c" />
+ <ClCompile Include="..\src\lib\protocols\telegram.c" />
+ <ClCompile Include="..\src\lib\protocols\telnet.c" />
+ <ClCompile Include="..\src\lib\protocols\teredo.c" />
+ <ClCompile Include="..\src\lib\protocols\tftp.c" />
+ <ClCompile Include="..\src\lib\protocols\thunder.c" />
+ <ClCompile Include="..\src\lib\protocols\tvuplayer.c" />
+ <ClCompile Include="..\src\lib\protocols\ubntac2.c" />
+ <ClCompile Include="..\src\lib\protocols\usenet.c" />
+ <ClCompile Include="..\src\lib\protocols\vhua.c" />
+ <ClCompile Include="..\src\lib\protocols\viber.c" />
+ <ClCompile Include="..\src\lib\protocols\vmware.c" />
+ <ClCompile Include="..\src\lib\protocols\vnc.c" />
+ <ClCompile Include="..\src\lib\protocols\warcraft3.c" />
+ <ClCompile Include="..\src\lib\protocols\whoisdas.c" />
+ <ClCompile Include="..\src\lib\protocols\world_of_kung_fu.c" />
+ <ClCompile Include="..\src\lib\protocols\world_of_warcraft.c" />
+ <ClCompile Include="..\src\lib\protocols\xbox.c" />
+ <ClCompile Include="..\src\lib\protocols\xdmcp.c" />
+ <ClCompile Include="..\src\lib\protocols\zattoo.c" />
+ <ClCompile Include="..\src\lib\protocols\zeromq.c" />
+ <ClCompile Include="..\src\lib\third_party\src\gcrypt_light.c" />
+ <ClCompile Include="..\src\lib\third_party\src\libcache.c" />
+ <ClCompile Include="..\src\lib\third_party\src\libinjection_html5.c" />
+ <ClCompile Include="..\src\lib\third_party\src\libinjection_sqli.c" />
+ <ClCompile Include="..\src\lib\third_party\src\libinjection_xss.c" />
+ <ClCompile Include="..\src\lib\third_party\src\ndpi_md5.c" />
+ <ClCompile Include="..\src\lib\third_party\src\ndpi_patricia.c" />
+ <ClCompile Include="..\src\lib\third_party\src\ndpi_sha1.c" />
+ <ClCompile Include="..\src\lib\third_party\src\sha1-fast.c" />
+ <ClCompile Include="..\src\lib\third_party\src\strptime.c" />
+ <ClCompile Include="src\getopt.c" />
+ <ClCompile Include="src\win-gettimeofday.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\include\ndpi_api.h" />
+ <ClInclude Include="..\src\include\ndpi_config.h" />
+ <ClInclude Include="..\src\include\ndpi_encryption.h" />
+ <ClInclude Include="..\src\include\ndpi_main.h" />
+ <ClInclude Include="..\src\include\ndpi_patricia_typedefs.h" />
+ <ClInclude Include="..\src\include\ndpi_utils.h" />
+ <ClInclude Include="..\src\lib\protocols\btlib.h" />
+ <ClInclude Include="..\src\lib\third_party\include\ahocorasick.h" />
+ <ClInclude Include="..\src\include\ndpi_define.h" />
+ <ClInclude Include="..\src\include\ndpi_includes.h" />
+ <ClInclude Include="..\src\lib\third_party\include\gcrypt_light.h" />
+ <ClInclude Include="..\src\lib\third_party\include\hll.h" />
+ <ClInclude Include="..\src\lib\third_party\include\libcache.h" />
+ <ClInclude Include="..\src\lib\third_party\include\libinjection.h" />
+ <ClInclude Include="..\src\lib\third_party\include\libinjection_html5.h" />
+ <ClInclude Include="..\src\lib\third_party\include\libinjection_sqli.h" />
+ <ClInclude Include="..\src\lib\third_party\include\libinjection_sqli_data.h" />
+ <ClInclude Include="..\src\lib\third_party\include\libinjection_xss.h" />
+ <ClInclude Include="..\src\lib\third_party\include\MurmurHash3.h" />
+ <ClInclude Include="..\src\lib\third_party\include\ndpi_md5.h" />
+ <ClInclude Include="..\src\lib\third_party\include\ndpi_patricia.h" />
+ <ClInclude Include="..\src\include\ndpi_protocol_ids.h" />
+ <ClInclude Include="..\src\include\ndpi_protocols.h" />
+ <ClInclude Include="..\src\include\ndpi_typedefs.h" />
+ <ClInclude Include="..\src\include\ndpi_unix.h" />
+ <ClInclude Include="..\src\include\ndpi_win32.h" />
+ <ClInclude Include="..\src\lib\third_party\include\ndpi_sha1.h" />
+ <ClInclude Include="..\src\lib\third_party\include\rce_injection.h" />
+ <ClInclude Include="..\src\lib\third_party\include\roaring.h" />
+ <ClInclude Include="..\src\lib\third_party\include\uthash.h" />
+ <ClInclude Include="arpa\inet.h" />
+ <ClInclude Include="src\getopt.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\src\lib\ndpi_content_match.c.inc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/windows/nDPI.vcxproj.filters b/windows/nDPI.vcxproj.filters
new file mode 100644
index 000000000..f57d96502
--- /dev/null
+++ b/windows/nDPI.vcxproj.filters
@@ -0,0 +1,298 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\src\lib\protocols\afp.c" />
+ <ClCompile Include="..\src\lib\protocols\bjnp.c" />
+ <ClCompile Include="..\src\lib\protocols\aimini.c" />
+ <ClCompile Include="..\src\lib\protocols\applejuice.c" />
+ <ClCompile Include="..\src\lib\protocols\armagetron.c" />
+ <ClCompile Include="..\src\lib\protocols\ayiya.c" />
+ <ClCompile Include="..\src\lib\protocols\bgp.c" />
+ <ClCompile Include="..\src\lib\protocols\bittorrent.c" />
+ <ClCompile Include="..\src\lib\protocols\btlib.c" />
+ <ClCompile Include="..\src\lib\protocols\ciscovpn.c" />
+ <ClCompile Include="..\src\lib\protocols\citrix.c" />
+ <ClCompile Include="..\src\lib\protocols\coap.c" />
+ <ClCompile Include="..\src\lib\protocols\corba.c" />
+ <ClCompile Include="..\src\lib\protocols\crossfire.c" />
+ <ClCompile Include="..\src\lib\protocols\dcerpc.c" />
+ <ClCompile Include="..\src\lib\protocols\dhcp.c" />
+ <ClCompile Include="..\src\lib\protocols\dhcpv6.c" />
+ <ClCompile Include="..\src\lib\protocols\directconnect.c" />
+ <ClCompile Include="..\src\lib\protocols\directdownloadlink.c" />
+ <ClCompile Include="..\src\lib\protocols\dns.c" />
+ <ClCompile Include="..\src\lib\protocols\dofus.c" />
+ <ClCompile Include="..\src\lib\protocols\drda.c" />
+ <ClCompile Include="..\src\lib\protocols\dropbox.c" />
+ <ClCompile Include="..\src\lib\protocols\eaq.c" />
+ <ClCompile Include="..\src\lib\protocols\edonkey.c" />
+ <ClCompile Include="..\src\lib\protocols\fasttrack.c" />
+ <ClCompile Include="..\src\lib\protocols\fiesta.c" />
+ <ClCompile Include="..\src\lib\protocols\florensia.c" />
+ <ClCompile Include="..\src\lib\protocols\ftp_control.c" />
+ <ClCompile Include="..\src\lib\protocols\ftp_data.c" />
+ <ClCompile Include="..\src\lib\protocols\git.c" />
+ <ClCompile Include="..\src\lib\protocols\gnutella.c" />
+ <ClCompile Include="..\src\lib\protocols\gtp.c" />
+ <ClCompile Include="..\src\lib\protocols\guildwars.c" />
+ <ClCompile Include="..\src\lib\protocols\h323.c" />
+ <ClCompile Include="..\src\lib\protocols\halflife2_and_mods.c" />
+ <ClCompile Include="..\src\lib\protocols\hangout.c" />
+ <ClCompile Include="..\src\lib\protocols\http.c" />
+ <ClCompile Include="..\src\lib\protocols\iax.c" />
+ <ClCompile Include="..\src\lib\protocols\icecast.c" />
+ <ClCompile Include="..\src\lib\protocols\ipp.c" />
+ <ClCompile Include="..\src\lib\protocols\irc.c" />
+ <ClCompile Include="..\src\lib\protocols\jabber.c" />
+ <ClCompile Include="..\src\lib\protocols\kakaotalk_voice.c" />
+ <ClCompile Include="..\src\lib\protocols\kerberos.c" />
+ <ClCompile Include="..\src\lib\protocols\kontiki.c" />
+ <ClCompile Include="..\src\lib\protocols\ldap.c" />
+ <ClCompile Include="..\src\lib\protocols\lotus_notes.c" />
+ <ClCompile Include="..\src\lib\protocols\mail_imap.c" />
+ <ClCompile Include="..\src\lib\protocols\mail_pop.c" />
+ <ClCompile Include="..\src\lib\protocols\mail_smtp.c" />
+ <ClCompile Include="..\src\lib\protocols\maplestory.c" />
+ <ClCompile Include="..\src\lib\protocols\megaco.c" />
+ <ClCompile Include="..\src\lib\protocols\mgcp.c" />
+ <ClCompile Include="..\src\lib\protocols\mpegts.c" />
+ <ClCompile Include="..\src\lib\protocols\mqtt.c" />
+ <ClCompile Include="..\src\lib\protocols\mssql_tds.c" />
+ <ClCompile Include="..\src\lib\protocols\mysql.c" />
+ <ClCompile Include="..\src\lib\protocols\netbios.c" />
+ <ClCompile Include="..\src\lib\protocols\netflow.c" />
+ <ClCompile Include="..\src\lib\protocols\nfs.c" />
+ <ClCompile Include="..\src\lib\protocols\noe.c" />
+ <ClCompile Include="..\src\lib\protocols\non_tcp_udp.c" />
+ <ClCompile Include="..\src\lib\protocols\ntp.c" />
+ <ClCompile Include="..\src\lib\protocols\openft.c" />
+ <ClCompile Include="..\src\lib\protocols\openvpn.c" />
+ <ClCompile Include="..\src\lib\protocols\oracle.c" />
+ <ClCompile Include="..\src\lib\protocols\postgres.c" />
+ <ClCompile Include="..\src\lib\protocols\ppstream.c" />
+ <ClCompile Include="..\src\lib\protocols\pptp.c" />
+ <ClCompile Include="..\src\lib\protocols\qq.c" />
+ <ClCompile Include="..\src\lib\protocols\quic.c" />
+ <ClCompile Include="..\src\lib\protocols\radius.c" />
+ <ClCompile Include="..\src\lib\protocols\rdp.c" />
+ <ClCompile Include="..\src\lib\protocols\redis_net.c" />
+ <ClCompile Include="..\src\lib\protocols\rsync.c" />
+ <ClCompile Include="..\src\lib\protocols\rtcp.c" />
+ <ClCompile Include="..\src\lib\protocols\rtmp.c" />
+ <ClCompile Include="..\src\lib\protocols\rtp.c" />
+ <ClCompile Include="..\src\lib\protocols\rtsp.c" />
+ <ClCompile Include="..\src\lib\protocols\rx.c" />
+ <ClCompile Include="..\src\lib\protocols\sflow.c" />
+ <ClCompile Include="..\src\lib\protocols\shoutcast.c" />
+ <ClCompile Include="..\src\lib\protocols\sip.c" />
+ <ClCompile Include="..\src\lib\protocols\skinny.c" />
+ <ClCompile Include="..\src\lib\protocols\skype.c" />
+ <ClCompile Include="..\src\lib\protocols\smb.c" />
+ <ClCompile Include="..\src\lib\protocols\socks45.c" />
+ <ClCompile Include="..\src\lib\protocols\sopcast.c" />
+ <ClCompile Include="..\src\lib\protocols\spotify.c" />
+ <ClCompile Include="..\src\lib\protocols\ssdp.c" />
+ <ClCompile Include="..\src\lib\protocols\ssh.c" />
+ <ClCompile Include="..\src\lib\protocols\starcraft.c" />
+ <ClCompile Include="..\src\lib\protocols\stealthnet.c" />
+ <ClCompile Include="..\src\lib\protocols\steam.c" />
+ <ClCompile Include="..\src\lib\protocols\stun.c" />
+ <ClCompile Include="..\src\lib\protocols\syslog.c" />
+ <ClCompile Include="..\src\lib\protocols\tcp_udp.c" />
+ <ClCompile Include="..\src\lib\protocols\teamspeak.c" />
+ <ClCompile Include="..\src\lib\protocols\teamviewer.c" />
+ <ClCompile Include="..\src\lib\protocols\telegram.c" />
+ <ClCompile Include="..\src\lib\protocols\telnet.c" />
+ <ClCompile Include="..\src\lib\protocols\teredo.c" />
+ <ClCompile Include="..\src\lib\protocols\tftp.c" />
+ <ClCompile Include="..\src\lib\protocols\thunder.c" />
+ <ClCompile Include="..\src\lib\protocols\tvuplayer.c" />
+ <ClCompile Include="..\src\lib\protocols\ubntac2.c" />
+ <ClCompile Include="..\src\lib\protocols\usenet.c" />
+ <ClCompile Include="..\src\lib\protocols\vhua.c" />
+ <ClCompile Include="..\src\lib\protocols\viber.c" />
+ <ClCompile Include="..\src\lib\protocols\vmware.c" />
+ <ClCompile Include="..\src\lib\protocols\vnc.c" />
+ <ClCompile Include="..\src\lib\protocols\warcraft3.c" />
+ <ClCompile Include="..\src\lib\protocols\whoisdas.c" />
+ <ClCompile Include="..\src\lib\protocols\world_of_kung_fu.c" />
+ <ClCompile Include="..\src\lib\protocols\world_of_warcraft.c" />
+ <ClCompile Include="..\src\lib\protocols\xbox.c" />
+ <ClCompile Include="..\src\lib\protocols\xdmcp.c" />
+ <ClCompile Include="..\src\lib\protocols\zattoo.c" />
+ <ClCompile Include="..\src\lib\protocols\zeromq.c" />
+ <ClCompile Include="src\getopt.c" />
+ <ClCompile Include="src\win-gettimeofday.c" />
+ <ClCompile Include="..\src\lib\ndpi_analyze.c" />
+ <ClCompile Include="..\src\lib\ndpi_bitmap.c" />
+ <ClCompile Include="..\src\lib\ndpi_classify.c" />
+ <ClCompile Include="..\src\lib\ndpi_community_id.c" />
+ <ClCompile Include="..\src\lib\ndpi_geoip.c" />
+ <ClCompile Include="..\src\lib\ndpi_main.c" />
+ <ClCompile Include="..\src\lib\ndpi_serializer.c" />
+ <ClCompile Include="..\src\lib\ndpi_utils.c" />
+ <ClCompile Include="..\src\lib\protocols\ajp.c" />
+ <ClCompile Include="..\src\lib\protocols\amazon_video.c" />
+ <ClCompile Include="..\src\lib\protocols\among_us.c" />
+ <ClCompile Include="..\src\lib\protocols\amqp.c" />
+ <ClCompile Include="..\src\lib\protocols\apple_push.c" />
+ <ClCompile Include="..\src\lib\protocols\avast_securedns.c" />
+ <ClCompile Include="..\src\lib\protocols\capwap.c" />
+ <ClCompile Include="..\src\lib\protocols\cassandra.c" />
+ <ClCompile Include="..\src\lib\protocols\checkmk.c" />
+ <ClCompile Include="..\src\lib\protocols\cpha.c" />
+ <ClCompile Include="..\src\lib\protocols\csgo.c" />
+ <ClCompile Include="..\src\lib\protocols\diameter.c" />
+ <ClCompile Include="..\src\lib\protocols\dnp3.c" />
+ <ClCompile Include="..\src\lib\protocols\dnscrypt.c" />
+ <ClCompile Include="..\src\lib\protocols\ethernet_ip.c" />
+ <ClCompile Include="..\src\lib\protocols\fix.c" />
+ <ClCompile Include="..\src\lib\protocols\genshin_impact.c" />
+ <ClCompile Include="..\src\lib\protocols\hpvirtgrp.c" />
+ <ClCompile Include="..\src\lib\protocols\hsrp.c" />
+ <ClCompile Include="..\src\lib\protocols\iec60870-5-104.c" />
+ <ClCompile Include="..\src\lib\protocols\imo.c" />
+ <ClCompile Include="..\src\lib\protocols\lisp.c" />
+ <ClCompile Include="..\src\lib\protocols\memcached.c" />
+ <ClCompile Include="..\src\lib\protocols\mining.c" />
+ <ClCompile Include="..\src\lib\protocols\modbus.c" />
+ <ClCompile Include="..\src\lib\protocols\mongodb.c" />
+ <ClCompile Include="..\src\lib\protocols\nats.c" />
+ <ClCompile Include="..\src\lib\protocols\nest_log_sink.c" />
+ <ClCompile Include="..\src\lib\protocols\nintendo.c" />
+ <ClCompile Include="..\src\lib\protocols\ookla.c" />
+ <ClCompile Include="..\src\lib\protocols\s7comm.c" />
+ <ClCompile Include="..\src\lib\protocols\smpp.c" />
+ <ClCompile Include="..\src\lib\protocols\snmp_proto.c" />
+ <ClCompile Include="..\src\lib\protocols\soap.c" />
+ <ClCompile Include="..\src\lib\protocols\someip.c" />
+ <ClCompile Include="..\src\lib\protocols\tinc.c" />
+ <ClCompile Include="..\src\lib\protocols\tls.c" />
+ <ClCompile Include="..\src\lib\protocols\vxlan.c" />
+ <ClCompile Include="..\src\lib\protocols\websocket.c" />
+ <ClCompile Include="..\src\lib\protocols\whatsapp.c" />
+ <ClCompile Include="..\src\lib\protocols\wireguard.c" />
+ <ClCompile Include="..\src\lib\protocols\wsd.c" />
+ <ClCompile Include="..\src\lib\protocols\z3950.c" />
+ <ClCompile Include="..\src\lib\protocols\zabbix.c" />
+ <ClCompile Include="..\src\lib\third_party\src\ahocorasick.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\third_party\src\ndpi_sha1.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\third_party\src\ndpi_patricia.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\third_party\src\ndpi_md5.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\third_party\src\gcrypt_light.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\third_party\src\libcache.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\third_party\src\libinjection_html5.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\third_party\src\libinjection_sqli.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\third_party\src\libinjection_xss.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\third_party\src\sha1-fast.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\third_party\src\strptime.c">
+ <Filter>third_party</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\lib\protocols\tocaboca.c" />
+ <ClCompile Include="..\src\lib\protocols\raknet.c" />
+ <ClCompile Include="..\src\lib\protocols\sd_rtn.c" />
+ <ClCompile Include="..\src\lib\protocols\xiaomi.c" />
+ <ClCompile Include="..\src\lib\protocols\collectd.c" />
+ <ClCompile Include="..\src\lib\protocols\ipsec.c" />
+ <ClCompile Include="..\src\lib\protocols\mpegdash.c" />
+ <ClCompile Include="..\src\lib\protocols\rsh.c" />
+ <ClCompile Include="..\src\lib\protocols\i3d.c" />
+ <ClCompile Include="..\src\lib\protocols\riotgames.c" />
+ <ClCompile Include="..\src\lib\protocols\ultrasurf.c" />
+ <ClCompile Include="..\src\lib\protocols\activision.c" />
+ <ClCompile Include="..\src\lib\protocols\alicloud.c" />
+ <ClCompile Include="..\src\lib\protocols\avast.c" />
+ <ClCompile Include="..\src\lib\protocols\discord.c" />
+ <ClCompile Include="..\src\lib\protocols\softether.c" />
+ <ClCompile Include="..\src\lib\protocols\threema.c" />
+ <ClCompile Include="..\src\lib\protocols\tivoconnect.c" />
+ <ClCompile Include="..\src\lib\protocols\fastcgi.c" />
+ <ClCompile Include="..\src\lib\protocols\kismet.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\src\lib\protocols\btlib.h" />
+ <ClInclude Include="..\src\include\ndpi_define.h" />
+ <ClInclude Include="..\src\include\ndpi_includes.h" />
+ <ClInclude Include="..\src\include\ndpi_protocol_ids.h" />
+ <ClInclude Include="..\src\include\ndpi_protocols.h" />
+ <ClInclude Include="..\src\include\ndpi_typedefs.h" />
+ <ClInclude Include="..\src\include\ndpi_unix.h" />
+ <ClInclude Include="..\src\include\ndpi_win32.h" />
+ <ClInclude Include="arpa\inet.h" />
+ <ClInclude Include="src\getopt.h" />
+ <ClInclude Include="..\src\include\ndpi_api.h" />
+ <ClInclude Include="..\src\include\ndpi_config.h" />
+ <ClInclude Include="..\src\include\ndpi_encryption.h" />
+ <ClInclude Include="..\src\include\ndpi_main.h" />
+ <ClInclude Include="..\src\include\ndpi_utils.h" />
+ <ClInclude Include="..\src\lib\third_party\include\gcrypt_light.h" />
+ <ClInclude Include="..\src\lib\third_party\include\MurmurHash3.h" />
+ <ClInclude Include="..\src\lib\third_party\include\rce_injection.h" />
+ <ClInclude Include="..\src\lib\third_party\include\roaring.h" />
+ <ClInclude Include="..\src\lib\third_party\include\uthash.h" />
+ <ClInclude Include="..\src\lib\third_party\include\ahocorasick.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\third_party\include\ndpi_patricia.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\include\ndpi_patricia_typedefs.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\third_party\include\ndpi_sha1.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\third_party\include\ndpi_md5.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\third_party\include\hll.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\third_party\include\libcache.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\third_party\include\libinjection.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\third_party\include\libinjection_html5.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\third_party\include\libinjection_sqli.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\third_party\include\libinjection_sqli_data.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ <ClInclude Include="..\src\lib\third_party\include\libinjection_xss.h">
+ <Filter>third_party</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="..\src\lib\ndpi_content_match.c.inc" />
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="third_party">
+ <UniqueIdentifier>{51f8ee9e-a41d-4343-8115-937ed5a1ea19}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/windows/src/getopt.c b/windows/src/getopt.c
new file mode 100644
index 000000000..fbd86104a
--- /dev/null
+++ b/windows/src/getopt.c
@@ -0,0 +1,117 @@
+// Put this in a separate .h file (called "getopt.h").
+// The prototype for the header file is:
+/*
+#ifndef GETOPT_H
+#define GETOPT_H
+
+int getopt(int nargc, char * const nargv[], const char *ostr) ;
+
+#endif
+*/
+
+#include "getopt.h" // make sure you construct the header file as dictated above
+
+/*
+* Copyright (c) 1987, 1993, 1994
+* The Regents of the University of California. All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions
+* are met:
+* 1. Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+* 2. Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the distribution.
+* 3. All advertising materials mentioning features or use of this software
+* must display the following acknowledgement:
+* This product includes software developed by the University of
+* California, Berkeley and its contributors.
+* 4. Neither the name of the University nor the names of its contributors
+* may be used to endorse or promote products derived from this software
+* without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+* SUCH DAMAGE.
+*/
+
+#include <string.h>
+#include <stdio.h>
+
+int opterr = 1, /* if error message should be printed */
+optind = 1, /* index into parent argv vector */
+optopt, /* character checked for validity */
+optreset; /* reset getopt */
+char *optarg; /* argument associated with option */
+
+#define BADCH (int)'?'
+#define BADARG (int)':'
+#define EMSG ""
+
+ /*
+ * getopt --
+ * Parse argc/argv argument vector.
+ */
+int getopt(int nargc, char * const nargv[], const char *ostr)
+{
+ static char *place = EMSG; /* option letter processing */
+ const char *oli; /* option letter list index */
+
+ if (optreset || !*place) { /* update scanning pointer */
+ optreset = 0;
+ if (optind >= nargc || *(place = nargv[optind]) != '-') {
+ place = EMSG;
+ return (-1);
+ }
+ if (place[1] && *++place == '-') { /* found "--" */
+ ++optind;
+ place = EMSG;
+ return (-1);
+ }
+ } /* option letter okay? */
+ if ((optopt = (int)*place++) == (int)':' ||
+ !(oli = strchr(ostr, optopt))) {
+ /*
+ * if the user didn't specify '-' as an option,
+ * assume it means -1.
+ */
+ if (optopt == (int)'-')
+ return (-1);
+ if (!*place)
+ ++optind;
+ if (opterr && *ostr != ':')
+ (void)printf("illegal option -- %c\n", optopt);
+ return (BADCH);
+ }
+ if (*++oli != ':') { /* don't need argument */
+ optarg = NULL;
+ if (!*place)
+ ++optind;
+ }
+ else { /* need an argument */
+ if (*place) /* no white space */
+ optarg = place;
+ else if (nargc <= ++optind) { /* no arg */
+ place = EMSG;
+ if (*ostr == ':')
+ return (BADARG);
+ if (opterr)
+ (void)printf("option requires an argument -- %c\n", optopt);
+ return (BADCH);
+ }
+ else /* white space */
+ optarg = nargv[optind];
+ place = EMSG;
+ ++optind;
+ }
+ return (optopt); /* dump back option letter */
+}
diff --git a/windows/src/getopt.h b/windows/src/getopt.h
new file mode 100644
index 000000000..eb418c3ab
--- /dev/null
+++ b/windows/src/getopt.h
@@ -0,0 +1,6 @@
+#ifndef GETOPT_H
+#define GETOPT_H
+
+int getopt(int nargc, char * const nargv[], const char *ostr) ;
+
+#endif
diff --git a/windows/src/win-gettimeofday.c b/windows/src/win-gettimeofday.c
new file mode 100644
index 000000000..c921b3325
--- /dev/null
+++ b/windows/src/win-gettimeofday.c
@@ -0,0 +1,55 @@
+/*
+* Author: Ugo Varetto - ugovaretto@gmail.com
+* This code is distributed under the terms of the Apache Software License version 2.0
+* https://opensource.org/licenses/Apache-2.0
+*/
+
+#include <time.h>
+#include <windows.h>
+
+#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
+#define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64
+#else
+#define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL
+#endif
+
+struct timezone
+{
+ int tz_minuteswest; /* minutes W of Greenwich */
+ int tz_dsttime; /* type of dst correction */
+};
+
+int gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+ FILETIME ft;
+ unsigned __int64 tmpres = 0;
+ static int tzflag = 0;
+
+ if (NULL != tv)
+ {
+ GetSystemTimeAsFileTime(&ft);
+
+ tmpres |= ft.dwHighDateTime;
+ tmpres <<= 32;
+ tmpres |= ft.dwLowDateTime;
+
+ tmpres /= 10; /*convert into microseconds*/
+ /*converting file time to unix epoch*/
+ tmpres -= DELTA_EPOCH_IN_MICROSECS;
+ tv->tv_sec = (long)(tmpres / 1000000UL);
+ tv->tv_usec = (long)(tmpres % 1000000UL);
+ }
+
+ if (NULL != tz)
+ {
+ if (!tzflag)
+ {
+ _tzset();
+ tzflag++;
+ }
+ tz->tz_minuteswest = _timezone / 60;
+ tz->tz_dsttime = _daylight;
+ }
+
+ return 0;
+}