diff options
Diffstat (limited to '')
-rw-r--r-- | lib/ns/win32/DLLMain.c | 49 | ||||
-rw-r--r-- | lib/ns/win32/libns.def | 107 | ||||
-rw-r--r-- | lib/ns/win32/libns.vcxproj.filters | 114 | ||||
-rw-r--r-- | lib/ns/win32/libns.vcxproj.in | 156 | ||||
-rw-r--r-- | lib/ns/win32/libns.vcxproj.user | 3 | ||||
-rw-r--r-- | lib/ns/win32/version.c | 22 |
6 files changed, 451 insertions, 0 deletions
diff --git a/lib/ns/win32/DLLMain.c b/lib/ns/win32/DLLMain.c new file mode 100644 index 0000000..62c6e53 --- /dev/null +++ b/lib/ns/win32/DLLMain.c @@ -0,0 +1,49 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * SPDX-License-Identifier: MPL-2.0 + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, you can obtain one at https://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +#include <signal.h> +#include <windows.h> + +/* + * Called when we enter the DLL + */ +__declspec(dllexport) BOOL WINAPI + DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { + switch (fdwReason) { + /* + * The DLL is loading due to process + * initialization or a call to LoadLibrary. + */ + case DLL_PROCESS_ATTACH: + break; + + /* The attached process creates a new thread. */ + case DLL_THREAD_ATTACH: + break; + + /* The thread of the attached process terminates. */ + case DLL_THREAD_DETACH: + break; + + /* + * The DLL is unloading from a process due to + * process termination or a call to FreeLibrary. + */ + case DLL_PROCESS_DETACH: + break; + + default: + break; + } + return (TRUE); +} diff --git a/lib/ns/win32/libns.def b/lib/ns/win32/libns.def new file mode 100644 index 0000000..50edf86 --- /dev/null +++ b/lib/ns/win32/libns.def @@ -0,0 +1,107 @@ +LIBRARY libns + +; Exported Functions +EXPORTS + +ns__client_put_cb +ns__client_request +ns__client_reset_cb +ns__client_setup +ns__interfacemgr_getif +ns__interfacemgr_nextif +ns__query_sfcache +ns__query_start +ns__client_tcpconn +ns_client_aclmsg +ns_client_addopt +ns_client_checkacl +ns_client_checkaclsilent +ns_client_drop +ns_client_dumprecursing +ns_client_error +ns_client_findversion +ns_client_getdestaddr +ns_client_getnamebuf +ns_client_getsockaddr +ns_client_keepname +ns_client_killoldestquery +ns_client_log +ns_client_logv +ns_client_newdbversion +ns_client_newname +ns_client_newnamebuf +ns_client_newrdataset +ns_client_putrdataset +ns_client_qnamereplace +ns_client_recursing +ns_client_releasename +ns_client_send +ns_client_sendraw +ns_client_settimeout +ns_client_shuttingdown +ns_client_sourceip +ns_clientmgr_create +ns_clientmgr_destroy +ns_clientmgr_shutdown +ns_hook_add +ns_hooktable_create +ns_hooktable_free +ns_hooktable_init +ns_interface_attach +ns_interface_detach +ns_interface_shutdown +ns_interfacemgr_attach +ns_interfacemgr_create +ns_interfacemgr_detach +ns_interfacemgr_dumprecursing +ns_interfacemgr_getaclenv +ns_interfacemgr_getserver +ns_interfacemgr_islistening +ns_interfacemgr_listeningon +ns_interfacemgr_scan +ns_interfacemgr_setbacklog +ns_interfacemgr_setlistenon4 +ns_interfacemgr_setlistenon6 +ns_interfacemgr_shutdown +ns_lib_init +ns_lib_shutdown +ns_listenelt_create +ns_listenelt_destroy +ns_listenlist_attach +ns_listenlist_create +ns_listenlist_default +ns_listenlist_detach +ns_log_init +ns_log_setcontext +ns_notify_start +ns_plugin_check +ns_plugin_expandpath +ns_plugin_register +ns_plugins_create +ns_plugins_free +ns_query_cancel +ns_query_done +ns_query_free +ns_query_init +ns_query_recurse +ns_query_start +ns_server_attach +ns_server_create +ns_server_detach +ns_server_getoption +ns_server_setoption +ns_server_setserverid +ns_sortlist_addrorder1 +ns_sortlist_addrorder2 +ns_sortlist_byaddrsetup +ns_sortlist_setup +ns_stats_attach +ns_stats_create +ns_stats_decrement +ns_stats_detach +ns_stats_get +ns_stats_get_counter +ns_stats_increment +ns_stats_update_if_greater +ns_update_start +ns_xfr_start diff --git a/lib/ns/win32/libns.vcxproj.filters b/lib/ns/win32/libns.vcxproj.filters new file mode 100644 index 0000000..2931412 --- /dev/null +++ b/lib/ns/win32/libns.vcxproj.filters @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <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="Header Files"> + <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> + </Filter> + <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> + </ItemGroup> + <ItemGroup> + <None Include="libns.def" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\client.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\interfacemgr.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\hooks.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\lib.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\listenlist.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\log.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\notify.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\query.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\server.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\sortlist.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\stats.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\update.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\xfrout.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="DLLMain.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="version.c"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\include\ns\client.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\interfacemgr.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\hooks.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\lib.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\listenlist.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\log.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\notify.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\query.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\server.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\sortlist.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\stats.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\types.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\update.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\version.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\include\ns\xfrout.h"> + <Filter>Header Files</Filter> + </ClInclude> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/lib/ns/win32/libns.vcxproj.in b/lib/ns/win32/libns.vcxproj.in new file mode 100644 index 0000000..0249982 --- /dev/null +++ b/lib/ns/win32/libns.vcxproj.in @@ -0,0 +1,156 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|@PLATFORM@"> + <Configuration>Debug</Configuration> + <Platform>@PLATFORM@</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|@PLATFORM@"> + <Configuration>Release</Configuration> + <Platform>@PLATFORM@</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <ProjectGuid>{82ACD33C-E75F-45B8-BB6D-42643A10D7EE}</ProjectGuid> + <Keyword>Win32Proj</Keyword> + <RootNamespace>libns</RootNamespace> + @WINDOWS_TARGET_PLATFORM_VERSION@ + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <CharacterSet>MultiByte</CharacterSet> + @PLATFORM_TOOLSET@ + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <CharacterSet>MultiByte</CharacterSet> + @PLATFORM_TOOLSET@ + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> + <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)'=='Debug|@PLATFORM@'"> + <LinkIncremental>true</LinkIncremental> + <OutDir>..\..\..\Build\$(Configuration)\</OutDir> + <IntDir>.\$(Configuration)\</IntDir> + <IntDirSharingDetected>None</IntDirSharingDetected> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> + <LinkIncremental>false</LinkIncremental> + <OutDir>..\..\..\Build\$(Configuration)\</OutDir> + <IntDir>.\$(Configuration)\</IntDir> + <IntDirSharingDetected>None</IntDirSharingDetected> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'"> + <ClCompile> + <PrecompiledHeader> + </PrecompiledHeader> + <WarningLevel>Level4</WarningLevel> + <TreatWarningAsError>false</TreatWarningAsError> + <Optimization>Disabled</Optimization> + <PreprocessorDefinitions>WIN32;@USE_GSSAPI@_DEBUG;_USRDLL;LIBNS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles> + <AdditionalIncludeDirectories>.\;..\..\..\;include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\..\lib\dns\include;@LIBXML2_INC@@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <FunctionLevelLinking>true</FunctionLevelLinking> + <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> + <ObjectFileName>.\$(Configuration)\</ObjectFileName> + <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> + <BrowseInformation>true</BrowseInformation> + <CompileAs>CompileAsC</CompileAs> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>true</GenerateDebugInformation> + <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> + <AdditionalLibraryDirectories>..\..\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>@OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;@LIBXML2_LIB@@GSSAPI_LIB@@GEOIP_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <ModuleDefinitionFile>$(ProjectName).def</ModuleDefinitionFile> + <ImportLibrary>.\$(Configuration)\$(ProjectName).lib</ImportLibrary> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'"> + <ClCompile> + <WarningLevel>Level1</WarningLevel> + <TreatWarningAsError>true</TreatWarningAsError> + <PrecompiledHeader> + </PrecompiledHeader> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions> + <PreprocessorDefinitions>WIN32;@USE_GSSAPI@NDEBUG;_USRDLL;LIBNS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <ForcedIncludeFiles>..\..\..\config.h</ForcedIncludeFiles> + <AdditionalIncludeDirectories>.\;..\..\..\;include;..\include;..\..\isc\win32;..\..\isc\win32\include;..\..\isc\include;..\..\..\lib\dns\include;@LIBXML2_INC@@OPENSSL_INC@@GSSAPI_INC@@GEOIP_INC@%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <StringPooling>true</StringPooling> + <PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation> + <ObjectFileName>.\$(Configuration)\</ObjectFileName> + <ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName> + <WholeProgramOptimization>false</WholeProgramOptimization> + <CompileAs>CompileAsC</CompileAs> + </ClCompile> + <Link> + <SubSystem>Console</SubSystem> + <GenerateDebugInformation>false</GenerateDebugInformation> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + <OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile> + <AdditionalLibraryDirectories>..\..\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <AdditionalDependencies>@OPENSSL_LIBCRYPTO@@OPENSSL_LIBSSL@libisc.lib;libdns.lib;@LIBXML2_LIB@@GSSAPI_LIB@@GEOIP_LIB@ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <ModuleDefinitionFile>$(ProjectName).def</ModuleDefinitionFile> + <ImportLibrary>.\$(Configuration)\$(ProjectName).lib</ImportLibrary> + <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + <None Include="libns.def" /> + </ItemGroup> + <ItemGroup> + <ClCompile Include="..\client.c" /> + <ClCompile Include="..\interfacemgr.c" /> + <ClCompile Include="..\hooks.c" /> + <ClCompile Include="..\lib.c" /> + <ClCompile Include="..\listenlist.c" /> + <ClCompile Include="..\log.c" /> + <ClCompile Include="..\notify.c" /> + <ClCompile Include="..\query.c" /> + <ClCompile Include="..\server.c" /> + <ClCompile Include="..\sortlist.c" /> + <ClCompile Include="..\stats.c" /> + <ClCompile Include="..\update.c" /> + <ClCompile Include="..\xfrout.c" /> + <ClCompile Include="DLLMain.c" /> + <ClCompile Include="version.c" /> + </ItemGroup> + <ItemGroup> + <ClInclude Include="..\include\ns\client.h" /> + <ClInclude Include="..\include\ns\interfacemgr.h" /> + <ClInclude Include="..\include\ns\hooks.h" /> + <ClInclude Include="..\include\ns\lib.h" /> + <ClInclude Include="..\include\ns\listenlist.h" /> + <ClInclude Include="..\include\ns\log.h" /> + <ClInclude Include="..\include\ns\notify.h" /> + <ClInclude Include="..\include\ns\query.h" /> + <ClInclude Include="..\include\ns\server.h" /> + <ClInclude Include="..\include\ns\sortlist.h" /> + <ClInclude Include="..\include\ns\stats.h" /> + <ClInclude Include="..\include\ns\types.h" /> + <ClInclude Include="..\include\ns\update.h" /> + <ClInclude Include="..\include\ns\version.h" /> + <ClInclude Include="..\include\ns\xfrout.h" /> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project> diff --git a/lib/ns/win32/libns.vcxproj.user b/lib/ns/win32/libns.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/lib/ns/win32/libns.vcxproj.user @@ -0,0 +1,3 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +</Project>
\ No newline at end of file diff --git a/lib/ns/win32/version.c b/lib/ns/win32/version.c new file mode 100644 index 0000000..ac7a537 --- /dev/null +++ b/lib/ns/win32/version.c @@ -0,0 +1,22 @@ +/* + * Copyright (C) Internet Systems Consortium, Inc. ("ISC") + * + * SPDX-License-Identifier: MPL-2.0 + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, you can obtain one at https://mozilla.org/MPL/2.0/. + * + * See the COPYRIGHT file distributed with this work for additional + * information regarding copyright ownership. + */ + +/*! \file */ + +#include <versions.h> + +#include <ns/version.h> + +LIBNS_EXTERNAL_DATA const char ns_version[] = VERSION; +LIBNS_EXTERNAL_DATA const char ns_major[] = MAJOR; +LIBNS_EXTERNAL_DATA const char ns_mapapi[] = MAPAPI; |