diff --git a/.gitignore b/.gitignore index 9e2d1a2a3..cc3d312b8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ *.ko *.obj *.elf +*.pdb +*.ipdb # Precompiled Headers *.gch @@ -82,3 +84,10 @@ callgrind.out* # cmake build /build + +# MSVC build and IDE artifacts +/bin +/lib +/obj +/msvc/.vs +/msvc/*.vcxproj.user diff --git a/fuzzer/fuzzer_connect.c b/fuzzer/fuzzer_connect.c index 0c9b0fde4..f56ceb845 100644 --- a/fuzzer/fuzzer_connect.c +++ b/fuzzer/fuzzer_connect.c @@ -157,7 +157,10 @@ initialize_fuzzer(void) { int -LLVMFuzzerTestOneInput(const uint8_t* data, size_t data_size) +#ifdef _MSC_VER + __cdecl +#endif +LLVMFuzzerTestOneInput (const uint8_t *data, size_t data_size) { static int initialized; char *fuzz_packet_buffer; diff --git a/fuzzer/fuzzer_fragment.c b/fuzzer/fuzzer_fragment.c index 9a04a2f70..465ffa848 100644 --- a/fuzzer/fuzzer_fragment.c +++ b/fuzzer/fuzzer_fragment.c @@ -123,7 +123,10 @@ initialize_fuzzer(void) { } int -LLVMFuzzerTestOneInput(const uint8_t* data, size_t data_size) +#ifdef _MSC_VER + __cdecl +#endif +LLVMFuzzerTestOneInput (const uint8_t *data, size_t data_size) { static int initialized; char *fuzz_packet_buffer; diff --git a/fuzzer/fuzzer_listen.c b/fuzzer/fuzzer_listen.c index ca1758246..ca592f91f 100644 --- a/fuzzer/fuzzer_listen.c +++ b/fuzzer/fuzzer_listen.c @@ -164,7 +164,10 @@ init_fuzzer(void) { } int -LLVMFuzzerTestOneInput(const uint8_t* data, size_t data_size) +#ifdef _MSC_VER + __cdecl +#endif +LLVMFuzzerTestOneInput (const uint8_t *data, size_t data_size) { init_fuzzer(); diff --git a/fuzzer/pcap2corpus.c b/fuzzer/pcap2corpus.c index 7419c7134..36e465878 100644 --- a/fuzzer/pcap2corpus.c +++ b/fuzzer/pcap2corpus.c @@ -196,6 +196,9 @@ get_filter(int argc, char *argv[]) } int +#ifdef _MSC_VER +__cdecl +#endif main(int argc, char *argv[]) { char errbuf[PCAP_ERRBUF_SIZE]; diff --git a/msvc/chargen_server_upcall.vcxproj b/msvc/chargen_server_upcall.vcxproj new file mode 100644 index 000000000..a691466dc --- /dev/null +++ b/msvc/chargen_server_upcall.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46b9f} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/chargen_server_upcall.vcxproj.user b/msvc/chargen_server_upcall.vcxproj.user new file mode 100644 index 000000000..88a550947 --- /dev/null +++ b/msvc/chargen_server_upcall.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/msvc/client.vcxproj b/msvc/client.vcxproj new file mode 100644 index 000000000..336028403 --- /dev/null +++ b/msvc/client.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46baf} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/client_upcall.vcxproj b/msvc/client_upcall.vcxproj new file mode 100644 index 000000000..0999fdfcd --- /dev/null +++ b/msvc/client_upcall.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46bbf} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/client_upcall.vcxproj.user b/msvc/client_upcall.vcxproj.user new file mode 100644 index 000000000..88a550947 --- /dev/null +++ b/msvc/client_upcall.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/msvc/daytime_server.vcxproj b/msvc/daytime_server.vcxproj new file mode 100644 index 000000000..82bd7d9d9 --- /dev/null +++ b/msvc/daytime_server.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46bcf} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/daytime_server.vcxproj.user b/msvc/daytime_server.vcxproj.user new file mode 100644 index 000000000..88a550947 --- /dev/null +++ b/msvc/daytime_server.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/msvc/daytime_server_upcall.vcxproj b/msvc/daytime_server_upcall.vcxproj new file mode 100644 index 000000000..0a7bbd6b8 --- /dev/null +++ b/msvc/daytime_server_upcall.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46bdf} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/discard_server.vcxproj b/msvc/discard_server.vcxproj new file mode 100644 index 000000000..4dca3b808 --- /dev/null +++ b/msvc/discard_server.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46bef} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/discard_server_upcall.vcxproj b/msvc/discard_server_upcall.vcxproj new file mode 100644 index 000000000..ba5cf93ae --- /dev/null +++ b/msvc/discard_server_upcall.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46bff} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/echo_server.vcxproj b/msvc/echo_server.vcxproj new file mode 100644 index 000000000..cb0c58777 --- /dev/null +++ b/msvc/echo_server.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c00} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/echo_server_upcall.vcxproj b/msvc/echo_server_upcall.vcxproj new file mode 100644 index 000000000..ec490a1c4 --- /dev/null +++ b/msvc/echo_server_upcall.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c01} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/ekr_client.vcxproj b/msvc/ekr_client.vcxproj new file mode 100644 index 000000000..1b89c2646 --- /dev/null +++ b/msvc/ekr_client.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c02} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/ekr_loop.vcxproj b/msvc/ekr_loop.vcxproj new file mode 100644 index 000000000..543e20ed3 --- /dev/null +++ b/msvc/ekr_loop.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c03} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/ekr_loop_upcall.vcxproj b/msvc/ekr_loop_upcall.vcxproj new file mode 100644 index 000000000..4dd754e52 --- /dev/null +++ b/msvc/ekr_loop_upcall.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c04} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/ekr_peer.vcxproj b/msvc/ekr_peer.vcxproj new file mode 100644 index 000000000..9b91a7cd6 --- /dev/null +++ b/msvc/ekr_peer.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c05} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/ekr_server.vcxproj b/msvc/ekr_server.vcxproj new file mode 100644 index 000000000..5044ab862 --- /dev/null +++ b/msvc/ekr_server.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c06} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_connect.vcxproj b/msvc/fuzzer_connect.vcxproj new file mode 100644 index 000000000..e23fcd491 --- /dev/null +++ b/msvc/fuzzer_connect.vcxproj @@ -0,0 +1,210 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0F} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions); + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions); + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_connect_cookie_echoed.vcxproj b/msvc/fuzzer_connect_cookie_echoed.vcxproj new file mode 100644 index 000000000..1b676d88c --- /dev/null +++ b/msvc/fuzzer_connect_cookie_echoed.vcxproj @@ -0,0 +1,229 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C15} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=2 + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=2 + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_connect_cookie_wait.vcxproj b/msvc/fuzzer_connect_cookie_wait.vcxproj new file mode 100644 index 000000000..2a43a892d --- /dev/null +++ b/msvc/fuzzer_connect_cookie_wait.vcxproj @@ -0,0 +1,229 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C14} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=1 + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=1 + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_connect_data_received.vcxproj b/msvc/fuzzer_connect_data_received.vcxproj new file mode 100644 index 000000000..d8fee8c3c --- /dev/null +++ b/msvc/fuzzer_connect_data_received.vcxproj @@ -0,0 +1,229 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C18} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=5 + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=5 + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_connect_data_sent.vcxproj b/msvc/fuzzer_connect_data_sent.vcxproj new file mode 100644 index 000000000..f2ffb6382 --- /dev/null +++ b/msvc/fuzzer_connect_data_sent.vcxproj @@ -0,0 +1,229 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C17} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=4 + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=4 + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_connect_established.vcxproj b/msvc/fuzzer_connect_established.vcxproj new file mode 100644 index 000000000..2b43e86d8 --- /dev/null +++ b/msvc/fuzzer_connect_established.vcxproj @@ -0,0 +1,229 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C16} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=3 + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=3 + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_connect_multi.vcxproj b/msvc/fuzzer_connect_multi.vcxproj new file mode 100644 index 000000000..77c50f001 --- /dev/null +++ b/msvc/fuzzer_connect_multi.vcxproj @@ -0,0 +1,229 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C12} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=0 + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=0 + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_connect_multi_verbose.vcxproj b/msvc/fuzzer_connect_multi_verbose.vcxproj new file mode 100644 index 000000000..2267200c4 --- /dev/null +++ b/msvc/fuzzer_connect_multi_verbose.vcxproj @@ -0,0 +1,230 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C13} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=0;FUZZ_VERBOSE + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZING_STAGE=0;FUZZ_VERBOSE + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_connect_verbose.vcxproj b/msvc/fuzzer_connect_verbose.vcxproj new file mode 100644 index 000000000..eed58ad6e --- /dev/null +++ b/msvc/fuzzer_connect_verbose.vcxproj @@ -0,0 +1,163 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C11} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\fuzzer\ + false + $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\fuzzer\ + false + $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;INET;INET6;SCTP_DEBUG;SCTP_SIMPLE_ALLOCATOR;SCTP_PROCESS_LEVEL_LOCKS;__Userspace__;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;INET;INET6;SCTP_SIMPLE_ALLOCATOR;SCTP_PROCESS_LEVEL_LOCKS;__Userspace__;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_fragment.vcxproj b/msvc/fuzzer_fragment.vcxproj new file mode 100644 index 000000000..facc0af52 --- /dev/null +++ b/msvc/fuzzer_fragment.vcxproj @@ -0,0 +1,229 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C10} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions); + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions); + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_listen.vcxproj b/msvc/fuzzer_listen.vcxproj new file mode 100644 index 000000000..fb4136a15 --- /dev/null +++ b/msvc/fuzzer_listen.vcxproj @@ -0,0 +1,229 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C11} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions); + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions); + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/fuzzer_listen_verbose.vcxproj b/msvc/fuzzer_listen_verbose.vcxproj new file mode 100644 index 000000000..6d125dd80 --- /dev/null +++ b/msvc/fuzzer_listen_verbose.vcxproj @@ -0,0 +1,230 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C19} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + true + + + Application + false + v143 + true + Unicode + true + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZ_VERBOSE + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PRIVATE;FUZZ_VERBOSE + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + false + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + if exist $(TargetPath) copy /D /Y $(TargetPath) $(SolutionDir)..\fuzzer\$(TargetFileName) + Copying executable to $(SolutionDir)..\fuzzer\$(TargetFileName) + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/msvc/http_client.vcxproj b/msvc/http_client.vcxproj new file mode 100644 index 000000000..5ac333574 --- /dev/null +++ b/msvc/http_client.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c07} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/http_client_upcall.vcxproj b/msvc/http_client_upcall.vcxproj new file mode 100644 index 000000000..ad889b862 --- /dev/null +++ b/msvc/http_client_upcall.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c08} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/rtcweb.vcxproj b/msvc/rtcweb.vcxproj new file mode 100644 index 000000000..51b12a9c4 --- /dev/null +++ b/msvc/rtcweb.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c09} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/st_client.vcxproj b/msvc/st_client.vcxproj new file mode 100644 index 000000000..158c20824 --- /dev/null +++ b/msvc/st_client.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c0a} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/test_libmgmt.vcxproj b/msvc/test_libmgmt.vcxproj new file mode 100644 index 000000000..edfec30fb --- /dev/null +++ b/msvc/test_libmgmt.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c0b} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/test_timer.vcxproj b/msvc/test_timer.vcxproj new file mode 100644 index 000000000..2e808dadb --- /dev/null +++ b/msvc/test_timer.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c0c} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/tsctp.vcxproj b/msvc/tsctp.vcxproj new file mode 100644 index 000000000..c3150513e --- /dev/null +++ b/msvc/tsctp.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c0d} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/tsctp_upcall.vcxproj b/msvc/tsctp_upcall.vcxproj new file mode 100644 index 000000000..5d92d137d --- /dev/null +++ b/msvc/tsctp_upcall.vcxproj @@ -0,0 +1,166 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 17.0 + Win32Proj + {6f50aa5b-3ed7-46b9-b4eb-cb41f9e46c0e} + chargenserverupcall + 10.0 + + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + Application + true + v143 + Unicode + + + Application + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + false + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + $(SolutionDir)..\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;SCTP_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + VectorCall + ProgramDatabase + + + Console + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + VectorCall + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + AdvancedVectorExtensions + + + Console + true + true + true + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\usrsctp.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + + + + + + + + + + \ No newline at end of file diff --git a/msvc/usrsctp.sln b/msvc/usrsctp.sln new file mode 100644 index 000000000..19f387d8a --- /dev/null +++ b/msvc/usrsctp.sln @@ -0,0 +1,484 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34414.90 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "usrsctplib", "usrsctplib.vcxproj", "{13BFBE39-9D94-4DE0-8360-73FCAE9D6B04}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "programs", "programs", "{EA7C6318-AAD0-4AF7-8FCD-4656071EFA76}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "fuzzer", "fuzzer", "{953B4CE8-FC28-4C45-B4F1-75075C01AB81}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "chargen_server_upcall", "chargen_server_upcall.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46B9F}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client", "client.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BAF}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF} = {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF} = {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00} = {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client_upcall", "client_upcall.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BBF}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF} = {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF} = {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01} = {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "daytime_server", "daytime_server.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "daytime_server_upcall", "daytime_server_upcall.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "discard_server", "discard_server.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "discard_server_upcall", "discard_server_upcall.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echo_server", "echo_server.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echo_server_upcall", "echo_server_upcall.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ekr_client", "ekr_client.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C02}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06} = {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ekr_loop", "ekr_loop.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C03}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ekr_loop_upcall", "ekr_loop_upcall.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C04}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ekr_peer", "ekr_peer.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C05}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ekr_server", "ekr_server.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "http_client", "http_client.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C07}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "http_client_upcall", "http_client_upcall.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C08}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rtcweb", "rtcweb.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C09}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "st_client", "st_client.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0A}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libmgmt", "test_libmgmt.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0B}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_timer", "test_timer.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0C}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tsctp", "tsctp.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0D}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tsctp_upcall", "tsctp_upcall.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0E}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_connect", "fuzzer_connect.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0F}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_fragment", "fuzzer_fragment.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C10}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_listen", "fuzzer_listen.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C11}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_listen_verbose", "fuzzer_listen_verbose.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C19}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_connect_multi", "fuzzer_connect_multi.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C12}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_connect_multi_verbose", "fuzzer_connect_multi_verbose.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C13}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_connect_cookie_wait", "fuzzer_connect_cookie_wait.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C14}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_connect_cookie_echoed", "fuzzer_connect_cookie_echoed.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C15}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_connect_established", "fuzzer_connect_established.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C16}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_connect_data_sent", "fuzzer_connect_data_sent.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C17}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzzer_connect_data_received", "fuzzer_connect_data_received.vcxproj", "{6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C18}" + ProjectSection(ProjectDependencies) = postProject + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} = {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04}.Debug|x64.ActiveCfg = Debug|x64 + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04}.Debug|x64.Build.0 = Debug|x64 + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04}.Debug|x86.ActiveCfg = Debug|Win32 + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04}.Debug|x86.Build.0 = Debug|Win32 + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04}.Release|x64.ActiveCfg = Release|x64 + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04}.Release|x64.Build.0 = Release|x64 + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04}.Release|x86.ActiveCfg = Release|Win32 + {13BFBE39-9D94-4DE0-8360-73FCAE9D6B04}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46B9F}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46B9F}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46B9F}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46B9F}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46B9F}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46B9F}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46B9F}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46B9F}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BAF}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BAF}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BAF}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BAF}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BAF}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BAF}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BAF}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BAF}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BBF}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BBF}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BBF}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BBF}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BBF}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BBF}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BBF}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BBF}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C02}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C02}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C02}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C02}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C02}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C02}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C02}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C02}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C03}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C03}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C03}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C03}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C03}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C03}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C03}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C03}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C04}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C04}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C04}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C04}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C04}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C04}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C04}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C04}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C05}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C05}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C05}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C05}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C05}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C05}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C05}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C05}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C07}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C07}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C07}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C07}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C07}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C07}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C07}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C07}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C08}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C08}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C08}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C08}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C08}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C08}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C08}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C08}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C09}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C09}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C09}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C09}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C09}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C09}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C09}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C09}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0A}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0A}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0A}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0A}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0A}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0A}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0A}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0A}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0B}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0B}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0B}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0B}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0B}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0B}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0B}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0B}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0C}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0C}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0C}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0C}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0C}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0C}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0C}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0C}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0D}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0D}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0D}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0D}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0D}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0D}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0D}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0D}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0E}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0E}.Debug|x64.Build.0 = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0E}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0E}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0E}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0E}.Release|x64.Build.0 = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0E}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0E}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0F}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0F}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0F}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0F}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0F}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0F}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C10}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C10}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C10}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C10}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C10}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C10}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C11}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C11}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C11}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C11}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C11}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C11}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C19}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C19}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C19}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C19}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C19}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C19}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C12}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C12}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C12}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C12}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C12}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C12}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C13}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C13}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C13}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C13}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C13}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C13}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C14}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C14}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C14}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C14}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C14}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C14}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C15}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C15}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C15}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C15}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C15}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C15}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C16}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C16}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C16}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C16}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C16}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C16}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C17}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C17}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C17}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C17}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C17}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C17}.Release|x86.Build.0 = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C18}.Debug|x64.ActiveCfg = Debug|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C18}.Debug|x86.ActiveCfg = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C18}.Debug|x86.Build.0 = Debug|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C18}.Release|x64.ActiveCfg = Release|x64 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C18}.Release|x86.ActiveCfg = Release|Win32 + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C18}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46B9F} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BAF} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BBF} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BCF} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BDF} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BEF} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46BFF} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C00} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C01} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C02} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C03} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C04} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C05} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C06} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C07} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C08} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C09} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0A} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0B} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0C} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0D} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0E} = {EA7C6318-AAD0-4AF7-8FCD-4656071EFA76} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C0F} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C10} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C11} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C19} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C12} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C13} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C14} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C15} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C16} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C17} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + {6F50AA5B-3ED7-46B9-B4EB-CB41F9E46C18} = {953B4CE8-FC28-4C45-B4F1-75075C01AB81} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {835C5C5F-992D-4AE6-8CFD-0B142D7BB6B2} + EndGlobalSection +EndGlobal diff --git a/msvc/usrsctplib.vcxproj b/msvc/usrsctplib.vcxproj new file mode 100644 index 000000000..c19b86873 --- /dev/null +++ b/msvc/usrsctplib.vcxproj @@ -0,0 +1,270 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 17.0 + Win32Proj + {13bfbe39-9d94-4de0-8360-73fcae9d6b04} + usrsctp + 10.0 + usrsctplib + + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + StaticLibrary + true + v143 + Unicode + + + StaticLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\ + true + usrsctp + AllRules.ruleset + -*,clang-analyzer-core*,-clang-analyzer-deadcode*,-clang-analyzer-nullability*,-clang-analyzer-alpha.clone*,-clang-analyzer-alpha.core*,-clang-analyzer-alpha.deadcode*,-clang-analyzer-alpha.security* + false + + + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\ + true + usrsctp + AllRules.ruleset + -*,clang-analyzer-core*,-clang-analyzer-deadcode*,-clang-analyzer-nullability*,-clang-analyzer-alpha.clone*,-clang-analyzer-alpha.core*,-clang-analyzer-alpha.deadcode*,-clang-analyzer-alpha.security* + false + + + usrsctp + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + true + AllRules.ruleset + -*,clang-analyzer-core*,-clang-analyzer-deadcode*,-clang-analyzer-nullability*,-clang-analyzer-alpha.clone*,-clang-analyzer-alpha.core*,-clang-analyzer-alpha.deadcode*,-clang-analyzer-alpha.security* + false + + + usrsctp + $(SolutionDir)..\lib\$(Platform)\$(Configuration)\ + $(SolutionDir)..\obj\$(Platform)\$(Configuration)\$(ProjectName)\ + true + AllRules.ruleset + -*,clang-analyzer-core*,-clang-analyzer-deadcode*,-clang-analyzer-nullability*,-clang-analyzer-alpha.clone*,-clang-analyzer-alpha.core*,-clang-analyzer-alpha.deadcode*,-clang-analyzer-alpha.security* + false + + + + Level3 + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + true + + + Console + true + true + true + + + + + Level4 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions);SCTP_SIMPLE_ALLOCATOR;SCTP_PROCESS_LEVEL_LOCKS;__Userspace__;INET;INET6;_LIB;SCTP_DEBUG;INVARIANTS + true + MultiThreadedDebug + true + AdvancedVectorExtensions + VectorCall + true + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + ProgramDatabase + Guard + true + 4100;4127;4200;4706 + true + true + + + Console + true + + + + Ws2_32.lib + + + + + Level4 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions);SCTP_SIMPLE_ALLOCATOR;SCTP_PROCESS_LEVEL_LOCKS;__Userspace__;INET;INET6;_LIB + true + MultiThreaded + AnySuitable + Speed + true + true + true + AdvancedVectorExtensions + VectorCall + true + $(SolutionDir)..\usrsctplib;%(AdditionalIncludeDirectories) + Guard + true + 4100;4127;4200;4706 + true + true + + + Console + true + true + true + + + Ws2_32.lib + + + + + + \ No newline at end of file diff --git a/msvc/usrsctplib.vcxproj.filters b/msvc/usrsctplib.vcxproj.filters new file mode 100644 index 000000000..43023f4d7 --- /dev/null +++ b/msvc/usrsctplib.vcxproj.filters @@ -0,0 +1,214 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {6c3c8198-b1ad-4431-99c0-a78888c785e3} + + + {143a47f3-d7b2-4b99-b56f-b442cad030ec} + + + {548e4a89-d6ec-435e-a30d-0fdc3ec7dc92} + + + + + {6100795b-a1d7-4838-9e87-0bdd38f4d3b4} + + + + + Source Files\netinet6 + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files\netinet + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet\Header Files + + + Source Files\netinet6\Header Files + + + \ No newline at end of file diff --git a/msvc/usrsctplib.vcxproj.user b/msvc/usrsctplib.vcxproj.user new file mode 100644 index 000000000..88a550947 --- /dev/null +++ b/msvc/usrsctplib.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/programs/chargen_server_upcall.c b/programs/chargen_server_upcall.c index 152d40591..77edf5ca6 100644 --- a/programs/chargen_server_upcall.c +++ b/programs/chargen_server_upcall.c @@ -150,7 +150,10 @@ handle_upcall(struct socket *upcall_socket, void *upcall_data, int upcall_flags) } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *listening_socket; struct sockaddr_in6 addr; diff --git a/programs/client.c b/programs/client.c index 8a15a7be8..6ff6a9f58 100644 --- a/programs/client.c +++ b/programs/client.c @@ -86,6 +86,9 @@ receive_cb(struct socket *sock, union sctp_sockstore addr, void *data, } int +#ifdef _MSC_VER +__cdecl +#endif main(int argc, char *argv[]) { struct socket *sock; diff --git a/programs/client_upcall.c b/programs/client_upcall.c index e29d8fa22..5e22bc42a 100644 --- a/programs/client_upcall.c +++ b/programs/client_upcall.c @@ -130,7 +130,10 @@ handle_upcall(struct socket *sock, void *arg, int flgs) } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *sock; struct sockaddr *addr, *addrs; diff --git a/programs/daytime_server.c b/programs/daytime_server.c index c3b157a50..9fdf306f4 100644 --- a/programs/daytime_server.c +++ b/programs/daytime_server.c @@ -59,7 +59,10 @@ #define SLEEP 1 int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *sock, *conn_sock; struct sockaddr_in addr; diff --git a/programs/daytime_server_upcall.c b/programs/daytime_server_upcall.c index 3d83963cf..8da5067c7 100644 --- a/programs/daytime_server_upcall.c +++ b/programs/daytime_server_upcall.c @@ -86,7 +86,10 @@ handle_accept(struct socket *sock, void *data, int flags) } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *sock; struct sockaddr_in addr; diff --git a/programs/discard_server.c b/programs/discard_server.c index f8c2a721f..e02938aac 100644 --- a/programs/discard_server.c +++ b/programs/discard_server.c @@ -116,7 +116,10 @@ receive_cb(struct socket *sock, union sctp_sockstore addr, void *data, } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *sock; struct sockaddr_in6 addr; diff --git a/programs/discard_server_upcall.c b/programs/discard_server_upcall.c index 31d84b387..d370d09b2 100644 --- a/programs/discard_server_upcall.c +++ b/programs/discard_server_upcall.c @@ -138,7 +138,10 @@ handle_upcall(struct socket *sock, void *data, int flgs) } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *sock; struct sockaddr_in6 addr; diff --git a/programs/echo_server.c b/programs/echo_server.c index 9351447a3..6327f2f99 100644 --- a/programs/echo_server.c +++ b/programs/echo_server.c @@ -131,7 +131,10 @@ receive_cb(struct socket *sock, union sctp_sockstore addr, void *data, } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *sock; struct sockaddr_in6 addr; diff --git a/programs/echo_server_upcall.c b/programs/echo_server_upcall.c index 073437851..d8dab8d42 100644 --- a/programs/echo_server_upcall.c +++ b/programs/echo_server_upcall.c @@ -155,7 +155,10 @@ handle_upcall(struct socket *sock, void *data, int flgs) } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *sock; struct sockaddr_in6 addr; diff --git a/programs/ekr_client.c b/programs/ekr_client.c index 50e553ede..f1a04c26c 100644 --- a/programs/ekr_client.c +++ b/programs/ekr_client.c @@ -30,6 +30,7 @@ #ifdef _WIN32 #define _CRT_SECURE_NO_WARNINGS +#include #endif #include #include @@ -86,6 +87,10 @@ handle_packets(void *arg) usrsctp_freedumpbuffer(dump_buf); } usrsctp_conninput(fdp, buf, (size_t)length, 0); +#ifdef _WIN32 + } else if (WSAGetLastError () == WSAEINTR) { + break; +#endif } } #ifdef _WIN32 @@ -154,7 +159,10 @@ receive_cb(struct socket *sock, union sctp_sockstore addr, void *data, } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct sockaddr_in sin; struct sockaddr_conn sconn; @@ -247,8 +255,8 @@ main(int argc, char *argv[]) usrsctp_sysctl_set_sctp_ecn_enable(0); usrsctp_register_address((void *)&fd); #ifdef _WIN32 - if ((tid = CreateThread(NULL, 0, &handle_packets, (void *)&fd, 0, NULL)) == NULL) { - fprintf(stderr, "CreateThread() failed with error: %lu\n", GetLastError()); + if ((tid = (HANDLE) _beginthreadex(NULL, 0, &handle_packets, (void *)&fd, 0, NULL)) == NULL) { + fprintf(stderr, "_beginthreadex() failed with error: %lu\n", errno); exit(EXIT_FAILURE); } #else @@ -302,11 +310,10 @@ main(int argc, char *argv[]) #endif } #ifdef _WIN32 - TerminateThread(tid, 0); - WaitForSingleObject(tid, INFINITE); if (closesocket(fd) == SOCKET_ERROR) { fprintf(stderr, "closesocket() failed with error: %d\n", WSAGetLastError()); } + WaitForSingleObject(tid, INFINITE); WSACleanup(); #else pthread_cancel(tid); diff --git a/programs/ekr_loop.c b/programs/ekr_loop.c index 65fdb4a70..07998b660 100644 --- a/programs/ekr_loop.c +++ b/programs/ekr_loop.c @@ -34,6 +34,7 @@ #ifdef _WIN32 #define _CRT_SECURE_NO_WARNINGS +#include #endif #include #include @@ -114,7 +115,11 @@ handle_packets(void *arg) } else { usrsctp_conninput(fdp, buf, (size_t)length, 0); } - } +#ifdef _WIN32 + } else if (WSAGetLastError () == WSAEINTR) { + break; +#endif + } } #ifdef _WIN32 return 0; @@ -326,7 +331,10 @@ print_addresses(struct socket *sock) } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct sockaddr_in sin_s, sin_c; struct sockaddr_conn sconn; @@ -456,14 +464,14 @@ main(int argc, char *argv[]) } #endif #ifdef _WIN32 - if ((tid_c = CreateThread(NULL, 0, &handle_packets, (void *)&fd_c, 0, NULL)) == NULL) { - debug_printf("CreateThread() failed with error: %d\n", GetLastError()); - exit(EXIT_FAILURE); - } - if ((tid_s = CreateThread(NULL, 0, &handle_packets, (void *)&fd_s, 0, NULL)) == NULL) { - debug_printf("CreateThread() failed with error: %d\n", GetLastError()); - exit(EXIT_FAILURE); - } + if ((tid_c = (HANDLE) _beginthreadex(NULL, 0, &handle_packets, (void *) &fd_c, 0, NULL)) == NULL) { + debug_printf ("_beginthreadex() failed with error: %d\n", errno); + exit (EXIT_FAILURE); + } + if ((tid_s = (HANDLE) _beginthreadex(NULL, 0, &handle_packets, (void *) &fd_s, 0, NULL)) == NULL) { + debug_printf ("_beginthreadex() failed with error: %d\n", errno); + exit (EXIT_FAILURE); + } #else if ((rc = pthread_create(&tid_c, NULL, &handle_packets, (void *)&fd_c)) != 0) { debug_printf_clean("pthread_create tid_c: %s\n", strerror(rc)); @@ -636,18 +644,16 @@ main(int argc, char *argv[]) #endif } #ifdef _WIN32 - TerminateThread(tid_c, 0); - WaitForSingleObject(tid_c, INFINITE); - TerminateThread(tid_s, 0); - WaitForSingleObject(tid_s, INFINITE); if (closesocket(fd_c) == SOCKET_ERROR) { debug_printf("closesocket() failed with error: %d\n", WSAGetLastError()); exit(EXIT_FAILURE); } + WaitForSingleObject(tid_c, INFINITE); if (closesocket(fd_s) == SOCKET_ERROR) { debug_printf("closesocket() failed with error: %d\n", WSAGetLastError()); exit(EXIT_FAILURE); } + WaitForSingleObject(tid_s, INFINITE); WSACleanup(); #else pthread_cancel(tid_c); diff --git a/programs/ekr_loop_upcall.c b/programs/ekr_loop_upcall.c index 3db480a72..55bb63b4e 100644 --- a/programs/ekr_loop_upcall.c +++ b/programs/ekr_loop_upcall.c @@ -35,6 +35,7 @@ #ifdef _WIN32 #define _CRT_SECURE_NO_WARNINGS +#include #endif #include #include @@ -120,7 +121,11 @@ handle_packets(void *arg) } else { usrsctp_conninput(fdp, buf, (size_t)length, 0); } - } +#ifdef _WIN32 + } else if (WSAGetLastError () == WSAEINTR) { + break; +#endif + } } #ifdef _WIN32 return 0; @@ -356,7 +361,10 @@ print_addresses(struct socket *sock) } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct sockaddr_in sin_s, sin_c; struct sockaddr_conn sconn; @@ -500,12 +508,12 @@ main(int argc, char *argv[]) } #endif #ifdef _WIN32 - if ((tid_c = CreateThread(NULL, 0, &handle_packets, (void *)&fd_c, 0, NULL)) == NULL) { - debug_printf("CreateThread() failed with error: %d\n", GetLastError()); + if ((tid_c = (HANDLE) _beginthreadex(NULL, 0, &handle_packets, (void *)&fd_c, 0, NULL)) == NULL) { + debug_printf("_beginthreadex() failed with error: %d\n", errno); exit(EXIT_FAILURE); } - if ((tid_s = CreateThread(NULL, 0, &handle_packets, (void *)&fd_s, 0, NULL)) == NULL) { - debug_printf("CreateThread() failed with error: %d\n", GetLastError()); + if ((tid_s = (HANDLE) _beginthreadex(NULL, 0, &handle_packets, (void *)&fd_s, 0, NULL)) == NULL) { + debug_printf("_beginthreadex() failed with error: %d\n", errno); exit(EXIT_FAILURE); } #else @@ -697,18 +705,16 @@ main(int argc, char *argv[]) #endif } #ifdef _WIN32 - TerminateThread(tid_c, 0); - WaitForSingleObject(tid_c, INFINITE); - TerminateThread(tid_s, 0); - WaitForSingleObject(tid_s, INFINITE); if (closesocket(fd_c) == SOCKET_ERROR) { debug_printf("closesocket() failed with error: %d\n", WSAGetLastError()); exit(EXIT_FAILURE); } + WaitForSingleObject(tid_c, INFINITE); if (closesocket(fd_s) == SOCKET_ERROR) { debug_printf("closesocket() failed with error: %d\n", WSAGetLastError()); exit(EXIT_FAILURE); } + WaitForSingleObject(tid_s, INFINITE); WSACleanup(); #else pthread_cancel(tid_c); diff --git a/programs/ekr_peer.c b/programs/ekr_peer.c index 6ed511333..7aa517a80 100644 --- a/programs/ekr_peer.c +++ b/programs/ekr_peer.c @@ -30,6 +30,7 @@ #ifdef _WIN32 #define _CRT_SECURE_NO_WARNINGS +#include #endif #include #include @@ -82,7 +83,11 @@ handle_packets(void *arg) length = recv(*fdp, buf, MAX_PACKET_SIZE, 0); if (length > 0) { usrsctp_conninput(fdp, buf, (size_t)length, 0); - } +#ifdef _WIN32 + } else if (WSAGetLastError () == WSAEINTR) { + break; +#endif + } } #ifdef _WIN32 return 0; @@ -144,7 +149,10 @@ receive_cb(struct socket *sock, union sctp_sockstore addr, void *data, } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct sockaddr_in sin; struct sockaddr_conn sconn; @@ -237,8 +245,8 @@ main(int argc, char *argv[]) } #endif #ifdef _WIN32 - if ((tid = CreateThread(NULL, 0, &handle_packets, (void *)&fd, 0, NULL)) == NULL) { - fprintf(stderr, "CreateThread() failed with error: %lu\n", GetLastError()); + if ((tid = (HANDLE) _beginthreadex(NULL, 0, &handle_packets, (void *)&fd, 0, NULL)) == NULL) { + fprintf(stderr, "_beginthreadex() failed with error: %lu\n", errno); exit(EXIT_FAILURE); } #else @@ -324,11 +332,10 @@ main(int argc, char *argv[]) #endif } #ifdef _WIN32 - TerminateThread(tid, 0); - WaitForSingleObject(tid, INFINITE); if (closesocket(fd) == SOCKET_ERROR) { fprintf(stderr, "closesocket() failed with error: %d\n", WSAGetLastError()); } + WaitForSingleObject(tid, INFINITE); WSACleanup(); #else pthread_cancel(tid); diff --git a/programs/ekr_server.c b/programs/ekr_server.c index a9dd85edd..8226a9cfc 100644 --- a/programs/ekr_server.c +++ b/programs/ekr_server.c @@ -30,8 +30,8 @@ #ifdef _WIN32 #define _CRT_SECURE_NO_WARNINGS +#include #endif - #include #include #include @@ -154,7 +154,10 @@ receive_cb(struct socket *s, union sctp_sockstore addr, void *data, } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct sockaddr_in sin; struct sockaddr_conn sconn; @@ -245,8 +248,8 @@ main(int argc, char *argv[]) usrsctp_sysctl_set_sctp_ecn_enable(0); usrsctp_register_address((void *)&fd); #ifdef _WIN32 - if ((tid = CreateThread(NULL, 0, &handle_packets, (void *)&fd, 0, NULL)) == NULL) { - fprintf(stderr, "CreateThread() failed with error: %lu\n", GetLastError()); + if ((tid = (HANDLE) _beginthreadex(NULL, 0, &handle_packets, (void *)&fd, 0, NULL)) == NULL) { + fprintf(stderr, "_beginthreadex() failed with error: %lu\n", errno); exit(EXIT_FAILURE); } #else diff --git a/programs/http_client.c b/programs/http_client.c index 03c92860a..52b7b45f0 100644 --- a/programs/http_client.c +++ b/programs/http_client.c @@ -98,7 +98,10 @@ receive_cb(struct socket *sock, union sctp_sockstore addr, void *data, } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *sock; struct sockaddr *addr; diff --git a/programs/http_client_upcall.c b/programs/http_client_upcall.c index 04221c259..1ac66b32e 100644 --- a/programs/http_client_upcall.c +++ b/programs/http_client_upcall.c @@ -138,7 +138,10 @@ static void handle_upcall(struct socket *sock, void *arg, int flgs) } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *sock; struct sockaddr *addr; diff --git a/programs/programs_helper.h b/programs/programs_helper.h index 97a471017..f0fc6243e 100644 --- a/programs/programs_helper.h +++ b/programs/programs_helper.h @@ -84,7 +84,10 @@ debug_printf_stack(const char *format, ...); void debug_set_target(FILE *fp); +#if !defined(__PRETTY_FUNCTION__) && !defined(__GNUC__) +#define __PRETTY_FUNCTION__ __FUNCSIG__ +#endif + #define FUZZER_ASSERT(x) if (!(x)) { printf("USRSCTP assertion failed: function %s, file %s, line %d.\n", __PRETTY_FUNCTION__, __FILE__, __LINE__); abort(); } - #endif /* __PROGRAMS_HELPER_H__ */ diff --git a/programs/rtcweb.c b/programs/rtcweb.c index 27a98ca62..6d9800dbb 100644 --- a/programs/rtcweb.c +++ b/programs/rtcweb.c @@ -1310,7 +1310,10 @@ receive_cb(struct socket *sock, union sctp_sockstore addr, void *data, } int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct socket *sock; struct sockaddr_in addr; diff --git a/programs/st_client.c b/programs/st_client.c index 8f2cc3382..aa38e4747 100644 --- a/programs/st_client.c +++ b/programs/st_client.c @@ -257,7 +257,10 @@ conn_output(void *addr, void *buf, size_t length, uint8_t tos, uint8_t set_df) /* Usage: st_client local_addr local_port remote_addr remote_port remote_sctp_port */ int -main(int argc, char *argv[]) +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char *argv[]) { struct sockaddr_in sin; struct sockaddr_conn sconn; diff --git a/programs/test_libmgmt.c b/programs/test_libmgmt.c index de5e0f02a..866949704 100644 --- a/programs/test_libmgmt.c +++ b/programs/test_libmgmt.c @@ -28,17 +28,19 @@ * SUCH DAMAGE. */ -#ifndef _WIN32 -#include -#endif -#include "usrsctp.h" +#include +#include int -main(void) +#ifdef _MSC_VER + __cdecl +#endif +main (void) { int i; - for (i = 0; i < 10000; i++) { + printf("Entering the loop\n"); + for (i = 0; i < 100; i++) { usrsctp_init(0, NULL, NULL); while (usrsctp_finish() != 0) { #ifdef _WIN32 @@ -48,5 +50,6 @@ main(void) #endif } } + printf("Exited the loop\n"); return (0); } diff --git a/programs/test_timer.c b/programs/test_timer.c index 90a93c845..95ad2d0e0 100644 --- a/programs/test_timer.c +++ b/programs/test_timer.c @@ -28,16 +28,14 @@ * SUCH DAMAGE. */ -#include #include -#include -#ifndef _WIN32 -#include -#endif #include int -main(void) +#ifdef _MSC_VER + __cdecl +#endif +main (void) { unsigned int i; diff --git a/programs/tsctp.c b/programs/tsctp.c index 53e1f8c29..efe619acd 100644 --- a/programs/tsctp.c +++ b/programs/tsctp.c @@ -36,6 +36,7 @@ #include #include #include +#include #else #include #include @@ -412,7 +413,11 @@ client_receive_cb(struct socket *sock, union sctp_sockstore addr, void *data, return (1); } -int main(int argc, char **argv) +int +#ifdef _MSC_VER +__cdecl +#endif +main (int argc, char **argv) { #ifndef _WIN32 int c, rc; @@ -757,8 +762,8 @@ int main(int argc, char **argv) continue; } #ifdef _WIN32 - if ((tid = CreateThread(NULL, 0, &handle_connection, (void *)conn_sock, 0, NULL)) == NULL) { - fprintf(stderr, "CreateThread() failed with error: %lu\n", GetLastError()); + if ((tid = (HANDLE) _beginthreadex(NULL, 0, &handle_connection, (void *)conn_sock, 0, NULL)) == NULL) { + fprintf(stderr, "_beginthreadex() failed with error: %lu\n", errno); #else if ((rc = pthread_create(&tid, NULL, &handle_connection, (void *)conn_sock)) != 0) { fprintf(stderr, "pthread_create: %s\n", strerror(rc)); diff --git a/programs/tsctp_upcall.c b/programs/tsctp_upcall.c index 2f5b488b5..7ed78daa4 100644 --- a/programs/tsctp_upcall.c +++ b/programs/tsctp_upcall.c @@ -159,7 +159,7 @@ static const char *bytes2human(uint64_t bytes) char *suffix[] = {"", "K", "M", "G", "T"}; char suffix_length = sizeof(suffix) / sizeof(suffix[0]); int i = 0; - double human_size = bytes; + double human_size = (double) bytes; static char output[200]; if (bytes > 1024) { @@ -295,7 +295,7 @@ handle_upcall(struct socket *upcall_socket, void *upcall_data, int upcall_flags) gettimeofday(&time_now, NULL); timersub(&time_now, &tsctp_meta->stat_start, &time_diff); - seconds = time_diff.tv_sec + (double)time_diff.tv_usec / 1000000.0; + seconds = time_diff.tv_sec + time_diff.tv_usec / 1000000.0f; if (tsctp_meta->par_stats_human) { printf("Connection closed - statistics\n"); @@ -306,7 +306,7 @@ handle_upcall(struct socket *upcall_socket, void *upcall_data, int upcall_flags) printf("\tnotifications : %" PRIu64 "\n", tsctp_meta->stat_notifications); printf("\ttransferred : %sByte\n", bytes2human(tsctp_meta->stat_message_length * tsctp_meta->stat_messages)); printf("\truntime : %.2f s\n", seconds); - printf("\tgoodput : %sBit/s\n", bytes2human((double) tsctp_meta->stat_message_length * (double) tsctp_meta->stat_messages / seconds * 8)); + printf("\tgoodput : %sBit/s\n", bytes2human((uint64_t) (tsctp_meta->stat_message_length * tsctp_meta->stat_messages / seconds * 8.0))); } else { printf("%" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %" PRIu64 ", %f, %f, %" PRIu64 "\n", @@ -360,7 +360,7 @@ handle_upcall(struct socket *upcall_socket, void *upcall_data, int upcall_flags) gettimeofday(&time_now, NULL); timersub(&time_now, &tsctp_meta->stat_start, &time_diff); - seconds = time_diff.tv_sec + (double)time_diff.tv_usec / 1000000.0; + seconds = time_diff.tv_sec + time_diff.tv_usec / 1000000.0f; if ((tsctp_meta->par_messages && tsctp_meta->par_messages == tsctp_meta->stat_messages) || (tsctp_meta->par_runtime && tsctp_meta->par_runtime <= seconds)) { @@ -380,7 +380,11 @@ handle_upcall(struct socket *upcall_socket, void *upcall_data, int upcall_flags) return; } -int main(int argc, char **argv) +int +#ifdef _MSC_VER + __cdecl +#endif +main (int argc, char **argv) { #ifndef _WIN32 int c; diff --git a/usrsctplib/CMakeLists.txt b/usrsctplib/CMakeLists.txt index 93f6f4dde..be4045c7b 100644 --- a/usrsctplib/CMakeLists.txt +++ b/usrsctplib/CMakeLists.txt @@ -216,5 +216,5 @@ install(FILES usrsctp.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) # GENERATE AND INSTALL PKG-CONFIG FILE ################################################# -configure_file("${PROJECT_SOURCE_DIR}/usrsctp.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/usrsctp.pc" @ONLY) +configure_file("${PROJECT_SOURCE_DIR}/../usrsctp.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/usrsctp.pc" @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/usrsctp.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") diff --git a/usrsctplib/netinet/sctp.h b/usrsctplib/netinet/sctp.h index 6129e77f9..6dedc5b33 100755 --- a/usrsctplib/netinet/sctp.h +++ b/usrsctplib/netinet/sctp.h @@ -292,8 +292,10 @@ struct sctp_paramhdr { /* workaround for Cygwin on Windows: returns the SOCKET handle */ #define SCTP_GET_HANDLE 0x0000800d #endif +#ifdef SCTP_DEBUG /* Debug things that need to be purged */ #define SCTP_SET_INITIAL_DBG_SEQ 0x00009f00 +#endif /* JRS - Supported congestion control modules for pluggable * congestion control diff --git a/usrsctplib/netinet/sctp_asconf.c b/usrsctplib/netinet/sctp_asconf.c index 5d9edd3e7..b80f66534 100755 --- a/usrsctplib/netinet/sctp_asconf.c +++ b/usrsctplib/netinet/sctp_asconf.c @@ -791,7 +791,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, if (m_result != NULL) { SCTP_BUF_NEXT(m_tail) = m_result; m_tail = m_result; - ack_cp->ch.chunk_length += SCTP_BUF_LEN(m_result); + ack_cp->ch.chunk_length += (uint16_t) SCTP_BUF_LEN(m_result); /* set flag to force success reports */ error = 1; } @@ -826,7 +826,7 @@ sctp_handle_asconf(struct mbuf *m, unsigned int offset, ack->data = m_ack; ack->len = 0; for (n = m_ack; n != NULL; n = SCTP_BUF_NEXT(n)) { - ack->len += SCTP_BUF_LEN(n); + ack->len += (uint16_t) SCTP_BUF_LEN(n); } TAILQ_INSERT_TAIL(&stcb->asoc.asconf_ack_sent, ack, next); @@ -1821,7 +1821,7 @@ sctp_handle_asconf_ack(struct mbuf *m, int offset, /* update remaining ASCONF-ACK message length to process */ if (ack_length > SCTP_SIZE32(param_length)) { - ack_length -= SCTP_SIZE32(param_length); + ack_length -= (uint16_t) SCTP_SIZE32(param_length); } else { break; } @@ -2280,7 +2280,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, struct sctp_tcb *stcb, if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_DO_ASCONF) && stcb->asoc.asconf_supported == 1) { /* queue an asconf for this addr */ - status = sctp_asconf_queue_add(stcb, ifa, type); + status = sctp_asconf_queue_add(stcb, ifa, (uint16_t) type); /* * if queued ok, and in the open state, update the * count of queued params. If in the non-open state, @@ -2438,7 +2438,7 @@ sctp_is_addr_pending(struct sctp_tcb *stcb, struct sctp_ifa *sctp_ifa) default: break; } - last_param_type = param_type; + last_param_type = (uint16_t) param_type; } offset += SCTP_SIZE32(param_length); @@ -2783,7 +2783,7 @@ sctp_compose_asconf(struct sctp_tcb *stcb, int *retlen, int addr_locked) /* chain it all together */ SCTP_BUF_NEXT(m_asconf_chk) = m_asconf; *retlen = SCTP_BUF_LEN(m_asconf_chk) + SCTP_BUF_LEN(m_asconf); - acp->ch.chunk_length = htons(*retlen); + acp->ch.chunk_length = htons((u_short) *retlen); return (m_asconf_chk); } diff --git a/usrsctplib/netinet/sctp_auth.c b/usrsctplib/netinet/sctp_auth.c index 6fc3807cc..5951aa7c5 100755 --- a/usrsctplib/netinet/sctp_auth.c +++ b/usrsctplib/netinet/sctp_auth.c @@ -163,7 +163,7 @@ sctp_serialize_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr) for (i = 0; i < 256; i++) { if (list->chunks[i] != 0) { - *ptr++ = i; + *ptr++ = (uint8_t) i; count++; } } @@ -182,7 +182,7 @@ sctp_pack_auth_chunks(const sctp_auth_chklist_t *list, uint8_t *ptr) /* just list them, one byte each */ for (i = 0; i < 256; i++) { if (list->chunks[i] != 0) { - *ptr++ = i; + *ptr++ = (uint8_t) i; size++; } } @@ -225,7 +225,8 @@ sctp_unpack_auth_chunks(const uint8_t *ptr, uint8_t num_chunks, for (index = 0; index < 32; index++) { for (offset = 0; offset < 8; offset++) { if (ptr[index] & (1 << offset)) { - (void)sctp_auth_add_chunk((index * 8) + offset, list); + (void) sctp_auth_add_chunk ( + (uint8_t) ((index * 8) + offset), list); } } } @@ -1973,22 +1974,22 @@ sctp_initialize_auth_params(struct sctp_inpcb *inp, struct sctp_tcb *stcb) ph = (struct sctp_paramhdr *)new_key->key; ph->param_type = htons(SCTP_RANDOM); plen = sizeof(*ph) + random_len; - ph->param_length = htons(plen); + ph->param_length = htons((u_short) plen); SCTP_READ_RANDOM(new_key->key + sizeof(*ph), random_len); - keylen = plen; + keylen = (uint16_t) plen; /* append in the AUTH chunks */ /* NOTE: currently we always have chunks to list */ ph = (struct sctp_paramhdr *)(new_key->key + keylen); ph->param_type = htons(SCTP_CHUNK_LIST); plen = sizeof(*ph) + chunks_len; - ph->param_length = htons(plen); + ph->param_length = htons((u_short) plen); keylen += sizeof(*ph); if (stcb->asoc.local_auth_chunks) { int i; for (i = 0; i < 256; i++) { if (stcb->asoc.local_auth_chunks->chunks[i]) - new_key->key[keylen++] = i; + new_key->key[keylen++] = (uint8_t) i; } } @@ -1996,7 +1997,7 @@ sctp_initialize_auth_params(struct sctp_inpcb *inp, struct sctp_tcb *stcb) ph = (struct sctp_paramhdr *)(new_key->key + keylen); ph->param_type = htons(SCTP_HMAC_LIST); plen = sizeof(*ph) + hmacs_len; - ph->param_length = htons(plen); + ph->param_length = htons((u_short) plen); keylen += sizeof(*ph); (void)sctp_serialize_hmaclist(stcb->asoc.local_hmacs, new_key->key + keylen); @@ -2282,7 +2283,10 @@ sctp_test_authkey(void) #if defined(STANDALONE_HMAC_TEST) int -main(void) +#ifdef _MSC_VER + __cdecl +#endif +main (void) { sctp_test_hmac_sha1(); sctp_test_authkey(); diff --git a/usrsctplib/netinet/sctp_bsd_addr.c b/usrsctplib/netinet/sctp_bsd_addr.c index d71426bf1..7cb670457 100755 --- a/usrsctplib/netinet/sctp_bsd_addr.c +++ b/usrsctplib/netinet/sctp_bsd_addr.c @@ -769,9 +769,11 @@ sctp_get_mbuf_for_msg(unsigned int space_needed, int want_header, struct mbuf *m = NULL; #if defined(__FreeBSD__) || defined(__Userspace__) #if defined(__Userspace__) - m = m_getm2(NULL, space_needed, how, type, want_header ? M_PKTHDR : 0, allonebuf); + m = m_getm2 (NULL, space_needed, how, (short) type, + want_header ? M_PKTHDR : 0, allonebuf); #else - m = m_getm2(NULL, space_needed, how, type, want_header ? M_PKTHDR : 0); + m = m_getm2 (NULL, space_needed, how, (short) type, + want_header ? M_PKTHDR : 0); #endif if (m == NULL) { /* bad, no memory */ diff --git a/usrsctplib/netinet/sctp_cc_functions.c b/usrsctplib/netinet/sctp_cc_functions.c index 176338a05..cd4e7c2f4 100755 --- a/usrsctplib/netinet/sctp_cc_functions.c +++ b/usrsctplib/netinet/sctp_cc_functions.c @@ -1514,9 +1514,12 @@ sctp_set_rtcc_initial_cc_param(struct sctp_tcb *stcb, net->cc_mod.rtcc.bw_tot_time = 0; net->cc_mod.rtcc.bw_bytes = 0; net->cc_mod.rtcc.tls_needs_set = 0; - net->cc_mod.rtcc.ret_from_eq = SCTP_BASE_SYSCTL(sctp_rttvar_eqret); - net->cc_mod.rtcc.steady_step = SCTP_BASE_SYSCTL(sctp_steady_step); - net->cc_mod.rtcc.use_dccc_ecn = SCTP_BASE_SYSCTL(sctp_use_dccc_ecn); + net->cc_mod.rtcc.ret_from_eq = + (uint8_t) SCTP_BASE_SYSCTL (sctp_rttvar_eqret); + net->cc_mod.rtcc.steady_step = + (uint16_t) SCTP_BASE_SYSCTL (sctp_steady_step); + net->cc_mod.rtcc.use_dccc_ecn = + (uint8_t) SCTP_BASE_SYSCTL (sctp_use_dccc_ecn); net->cc_mod.rtcc.step_cnt = 0; net->cc_mod.rtcc.last_step_state = 0; } @@ -1535,7 +1538,8 @@ sctp_cwnd_rtcc_socket_option(struct sctp_tcb *stcb, int setorget, return (EINVAL); } TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { - net->cc_mod.rtcc.ret_from_eq = cc_opt->aid_value.assoc_value; + net->cc_mod.rtcc.ret_from_eq = + (uint8_t) cc_opt->aid_value.assoc_value; } } else if (cc_opt->option == SCTP_CC_OPT_USE_DCCC_ECN) { if ((cc_opt->aid_value.assoc_value != 0) && @@ -1543,11 +1547,13 @@ sctp_cwnd_rtcc_socket_option(struct sctp_tcb *stcb, int setorget, return (EINVAL); } TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { - net->cc_mod.rtcc.use_dccc_ecn = cc_opt->aid_value.assoc_value; + net->cc_mod.rtcc.use_dccc_ecn = + (uint8_t) cc_opt->aid_value.assoc_value; } } else if (cc_opt->option == SCTP_CC_OPT_STEADY_STEP) { TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { - net->cc_mod.rtcc.steady_step = cc_opt->aid_value.assoc_value; + net->cc_mod.rtcc.steady_step = + (uint16_t) cc_opt->aid_value.assoc_value; } } else { return (EINVAL); @@ -1715,7 +1721,7 @@ sctp_hs_cwnd_increase(struct sctp_tcb *stcb, struct sctp_nets *net) break; } } - net->last_hs_used = indx; + net->last_hs_used = (uint8_t) indx; incr = (((int32_t)sctp_cwnd_adjust[indx].increase) << 10); net->cwnd += incr; } @@ -1757,7 +1763,7 @@ sctp_hs_cwnd_decrease(struct sctp_tcb *stcb, struct sctp_nets *net) break; } } - net->last_hs_used = indx; + net->last_hs_used = (uint8_t)indx; } } sctp_enforce_cwnd_limit(&stcb->asoc, net); @@ -1999,7 +2005,7 @@ measure_achieved_throughput(struct sctp_nets *net) uint32_t now = sctp_get_tick_count(); if (net->fast_retran_ip == 0) - net->cc_mod.htcp_ca.bytes_acked = net->net_ack; + net->cc_mod.htcp_ca.bytes_acked = (uint16_t) net->net_ack; if (!use_bandwidth_switch) return; @@ -2049,7 +2055,7 @@ htcp_beta_update(struct htcp *ca, uint32_t minRTT, uint32_t maxRTT) } if (ca->modeswitch && minRTT > sctp_msecs_to_ticks(10) && maxRTT) { - ca->beta = (minRTT<<7)/maxRTT; + ca->beta = (uint8_t) ((minRTT << 7) / maxRTT); if (ca->beta < BETA_MIN) ca->beta = BETA_MIN; else if (ca->beta > BETA_MAX) @@ -2080,7 +2086,7 @@ htcp_alpha_update(struct htcp *ca) factor = 1; } - ca->alpha = 2 * factor * ((1 << 7) - ca->beta); + ca->alpha = (uint16_t) (2 * factor * ((1 << 7) - ca->beta)); if (ca->alpha != 0) ca->alpha = ALPHA_BASE; } @@ -2174,7 +2180,7 @@ htcp_cong_avoid(struct sctp_tcb *stcb, struct sctp_nets *net) } } - net->cc_mod.htcp_ca.bytes_acked = net->mtu; + net->cc_mod.htcp_ca.bytes_acked = (uint16_t) net->mtu; } } @@ -2193,7 +2199,7 @@ htcp_init(struct sctp_nets *net) memset(&net->cc_mod.htcp_ca, 0, sizeof(struct htcp)); net->cc_mod.htcp_ca.alpha = ALPHA_BASE; net->cc_mod.htcp_ca.beta = BETA_MIN; - net->cc_mod.htcp_ca.bytes_acked = net->mtu; + net->cc_mod.htcp_ca.bytes_acked = (uint16_t) net->mtu; net->cc_mod.htcp_ca.last_cong = sctp_get_tick_count(); } diff --git a/usrsctplib/netinet/sctp_indata.c b/usrsctplib/netinet/sctp_indata.c index 91980d3a2..d7d5ab8b7 100755 --- a/usrsctplib/netinet/sctp_indata.c +++ b/usrsctplib/netinet/sctp_indata.c @@ -1008,7 +1008,7 @@ sctp_inject_old_unordered_data(struct sctp_tcb *stcb, control->data = chk->data; chk->data = tdata; /* Save the lengths */ - chk->send_size = control->length; + chk->send_size = (uint16_t) control->length; /* Recompute length of control and tail pointer */ sctp_setup_tail_pointer(control); /* Fix the FSN included */ @@ -2161,7 +2161,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, } SCTP_STAT_INCR(sctps_recvexpress); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_STR_LOGGING_ENABLE) { - sctp_log_strm_del_alt(stcb, tsn, mid, sid, + sctp_log_strm_del_alt(stcb, tsn, (uint16_t) mid, sid, SCTP_STR_LOG_FROM_EXPRS_DEL); } control = NULL; @@ -2190,7 +2190,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, chk->rec.data.doing_fast_retransmit = 0; chk->rec.data.rcv_flags = chk_flags; chk->asoc = asoc; - chk->send_size = the_len; + chk->send_size = (uint16_t) the_len; chk->whoTo = net; SCTPDBG(SCTP_DEBUG_XXX, "Building ck: %p for control: %p to be read (MID: %u)\n", chk, @@ -2309,7 +2309,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, SCTP_STAT_INCR(sctps_recvdata); /* Set it present please */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_STR_LOGGING_ENABLE) { - sctp_log_strm_del_alt(stcb, tsn, mid, sid, SCTP_STR_LOG_FROM_MARK_TSN); + sctp_log_strm_del_alt(stcb, tsn, (uint16_t) mid, sid, SCTP_STR_LOG_FROM_MARK_TSN); } if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) { sctp_log_map(asoc->mapping_array_base_tsn, asoc->cumulative_tsn, @@ -3317,7 +3317,7 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc, { struct sctp_tmit_chunk *tp1; int strike_flag = 0; - struct timeval now; + struct timeval now = { 0, 0 }; uint32_t sending_seq; struct sctp_nets *net; int num_dests_sacked = 0; @@ -3744,7 +3744,7 @@ sctp_try_advance_peer_ack_point(struct sctp_tcb *stcb, struct sctp_association *asoc) { struct sctp_tmit_chunk *tp1, *tp2, *a_adv = NULL; - struct timeval now; + struct timeval now = { 0, 0 }; int now_filled = 0; if (asoc->prsctp_supported == 0) { @@ -4853,8 +4853,8 @@ sctp_handle_sack(struct mbuf *m, int offset_seg, int offset_dup, #else SCTP_PRINTF("Warning flight size incorrect should be 0 is %d\n", asoc->total_flight); -#endif asoc->total_flight = 0; +#endif } #if defined(__Userspace__) diff --git a/usrsctplib/netinet/sctp_input.c b/usrsctplib/netinet/sctp_input.c index 361b8b22e..68643a95e 100755 --- a/usrsctplib/netinet/sctp_input.c +++ b/usrsctplib/netinet/sctp_input.c @@ -123,7 +123,8 @@ sctp_handle_init(struct mbuf *m, int iphlen, int offset, if (sctp_validate_init_auth_params(m, offset + sizeof(*cp), offset + ntohs(cp->ch.chunk_length))) { /* auth parameter(s) error... send abort */ - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause ( + (uint16_t) SCTP_BASE_SYSCTL (sctp_diag_info_code), "Problem with AUTH parameters"); sctp_send_abort(m, iphlen, src, dst, sh, init->initiate_tag, op_err, #if defined(__FreeBSD__) && !defined(__Userspace__) @@ -150,7 +151,7 @@ sctp_handle_init(struct mbuf *m, int iphlen, int offset, * this state :-) */ if (SCTP_BASE_SYSCTL(sctp_blackhole) == 0) { - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), "No listener"); sctp_send_abort(m, iphlen, src, dst, sh, 0, op_err, #if defined(__FreeBSD__) && !defined(__Userspace__) @@ -335,7 +336,7 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb) /* cut back the count */ asoc->pre_open_streams = newcnt; } - asoc->streamoutcnt = asoc->pre_open_streams; + asoc->streamoutcnt = (uint16_t) asoc->pre_open_streams; if (asoc->strmout) { for (i = 0; i < asoc->streamoutcnt; i++) { asoc->strmout[i].state = SCTP_STREAM_OPEN; @@ -366,7 +367,7 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb) if (asoc->max_inbound_streams > ntohs(init->num_outbound_streams)) { asoc->streamincnt = ntohs(init->num_outbound_streams); } else { - asoc->streamincnt = asoc->max_inbound_streams; + asoc->streamincnt = (uint16_t) asoc->max_inbound_streams; } SCTP_MALLOC(asoc->strmin, struct sctp_stream_in *, asoc->streamincnt * sizeof(struct sctp_stream_in), SCTP_M_STRMI); @@ -376,7 +377,7 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb) return (-1); } for (i = 0; i < asoc->streamincnt; i++) { - asoc->strmin[i].sid = i; + asoc->strmin[i].sid = (uint16_t) i; asoc->strmin[i].last_mid_delivered = 0xffffffff; TAILQ_INIT(&asoc->strmin[i].inqueue); TAILQ_INIT(&asoc->strmin[i].uno_inqueue); @@ -490,7 +491,7 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int offset, if (op_err != NULL) { sctp_m_freem(op_err); } - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), "Problem with address parameters"); SCTPDBG(SCTP_DEBUG_INPUT1, "Load addresses from INIT causes an abort %d\n", @@ -785,7 +786,6 @@ sctp_handle_nat_colliding_state(struct sctp_tcb *stcb) sctp_send_initiate(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED); return (1); } - return (0); } static int @@ -1662,7 +1662,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, initack_offset, src, dst, init_src, stcb->asoc.port)) < 0) { if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 4; - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), "Problem with address parameters"); SCTPDBG(SCTP_DEBUG_INPUT1, "Load addresses from INIT causes an abort %d\n", @@ -1809,7 +1809,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, initack_offset, src, dst, init_src, stcb->asoc.port)) < 0) { if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 10; - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), "Problem with address parameters"); SCTPDBG(SCTP_DEBUG_INPUT1, "Load addresses from INIT causes an abort %d\n", @@ -1983,7 +1983,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, #endif stcb->asoc.strmout[i].next_mid_ordered = 0; stcb->asoc.strmout[i].next_mid_unordered = 0; - stcb->asoc.strmout[i].sid = i; + stcb->asoc.strmout[i].sid = (uint16_t) i; stcb->asoc.strmout[i].last_msg_incomplete = 0; } TAILQ_FOREACH_SAFE(strrst, &asoc->resetHead, next_resp, nstrrst) { @@ -2088,7 +2088,7 @@ sctp_process_cookie_existing(struct mbuf *m, int iphlen, int offset, initack_offset, src, dst, init_src, stcb->asoc.port)) < 0) { if (how_indx < sizeof(asoc->cookie_how)) asoc->cookie_how[how_indx] = 14; - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), "Problem with address parameters"); SCTPDBG(SCTP_DEBUG_INPUT1, "Load addresses from INIT causes an abort %d\n", @@ -3908,7 +3908,7 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stcb, for (i = asoc->streamoutcnt; i < (asoc->streamoutcnt + num_stream); i++) { asoc->strmout[i].state = SCTP_STREAM_OPEN; } - asoc->streamoutcnt += num_stream; + asoc->streamoutcnt += (uint16_t) num_stream; sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_ADD, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); } else if (action == SCTP_STREAM_RESET_RESULT_DENIED) { sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_ADD, stcb, SCTP_STREAM_CHANGE_DENIED, NULL, SCTP_SO_NOT_LOCKED); @@ -4238,7 +4238,7 @@ sctp_handle_str_reset_add_strm(struct sctp_tcb *stcb, struct sctp_tmit_chunk *ch for (i = 0; i < stcb->asoc.streamincnt; i++) { TAILQ_INIT(&stcb->asoc.strmin[i].inqueue); TAILQ_INIT(&stcb->asoc.strmin[i].uno_inqueue); - stcb->asoc.strmin[i].sid = i; + stcb->asoc.strmin[i].sid = (uint16_t) i; stcb->asoc.strmin[i].last_mid_delivered = oldstrm[i].last_mid_delivered; stcb->asoc.strmin[i].delivery_started = oldstrm[i].delivery_started; stcb->asoc.strmin[i].pd_api_started = oldstrm[i].pd_api_started; @@ -4256,14 +4256,14 @@ sctp_handle_str_reset_add_strm(struct sctp_tcb *stcb, struct sctp_tmit_chunk *ch for (i = stcb->asoc.streamincnt; i < num_stream; i++) { TAILQ_INIT(&stcb->asoc.strmin[i].inqueue); TAILQ_INIT(&stcb->asoc.strmin[i].uno_inqueue); - stcb->asoc.strmin[i].sid = i; + stcb->asoc.strmin[i].sid = (uint16_t) i; stcb->asoc.strmin[i].last_mid_delivered = 0xffffffff; stcb->asoc.strmin[i].pd_api_started = 0; stcb->asoc.strmin[i].delivery_started = 0; } SCTP_FREE(oldstrm, SCTP_M_STRMI); /* update the size */ - stcb->asoc.streamincnt = num_stream; + stcb->asoc.streamincnt = (uint16_t) num_stream; stcb->asoc.last_reset_action[0] = SCTP_STREAM_RESET_RESULT_PERFORMED; sctp_ulp_notify(SCTP_NOTIFY_STR_RESET_ADD, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); } @@ -4850,7 +4850,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, } if (stcb == NULL) { SCTP_SNPRINTF(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); /* no association, so it's out of the blue... */ sctp_handle_ootb(m, iphlen, *offset, src, dst, sh, inp, op_err, @@ -5708,7 +5708,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt #if defined(__Userspace__) struct socket *upcall_socket = NULL; #endif - uint32_t high_tsn; + uint32_t high_tsn = 0; uint32_t cksum_in_hdr; int un_sent; int cnt_ctrl_ready = 0; @@ -5883,7 +5883,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt if ((SCTP_BASE_SYSCTL(sctp_blackhole) == 0) || ((SCTP_BASE_SYSCTL(sctp_blackhole) == 1) && (ch->chunk_type != SCTP_INIT))) { - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), "Out of the blue"); sctp_send_abort(m, iphlen, src, dst, sh, 0, op_err, @@ -5920,7 +5920,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt SCTP_PROBE5(receive, NULL, stcb, m, stcb, sh); #endif SCTP_SNPRINTF(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, op_err, #if defined(__FreeBSD__) && !defined(__Userspace__) @@ -6003,7 +6003,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt SCTP_PROBE5(receive, NULL, NULL, m, NULL, sh); #endif SCTP_SNPRINTF(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, op_err, #if defined(__FreeBSD__) && !defined(__Userspace__) @@ -6089,7 +6089,7 @@ sctp_common_input_processing(struct mbuf **mm, int iphlen, int offset, int lengt * We consider OOTB any data sent during asoc setup. */ SCTP_SNPRINTF(msg, sizeof(msg), "OOTB, %s:%d at %s", __FILE__, __LINE__, __func__); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_handle_ootb(m, iphlen, offset, src, dst, sh, inp, op_err, #if defined(__FreeBSD__) && !defined(__Userspace__) diff --git a/usrsctplib/netinet/sctp_os_userspace.h b/usrsctplib/netinet/sctp_os_userspace.h index 493ae0267..9a24c7dd4 100755 --- a/usrsctplib/netinet/sctp_os_userspace.h +++ b/usrsctplib/netinet/sctp_os_userspace.h @@ -668,14 +668,14 @@ MALLOC_DECLARE(SCTP_M_SOCKOPT); #define SCTP_MALLOC(var, type, size, name) \ do { \ MALLOC(var, type, size, name, M_NOWAIT); \ - } while (0) + } while (0,0) #define SCTP_FREE(var, type) FREE(var, type) #define SCTP_MALLOC_SONAME(var, type, size) \ do { \ MALLOC(var, type, size, M_SONAME, (M_WAITOK | M_ZERO)); \ - } while (0) + } while (0,0) #define SCTP_FREE_SONAME(var) FREE(var, M_SONAME) diff --git a/usrsctplib/netinet/sctp_output.c b/usrsctplib/netinet/sctp_output.c index 85b788640..f599389ee 100755 --- a/usrsctplib/netinet/sctp_output.c +++ b/usrsctplib/netinet/sctp_output.c @@ -3103,7 +3103,8 @@ sctp_choose_boundall(struct sctp_inpcb *inp, atomic_add_int(&sctp_ifa->refcount, 1); if (net) { /* save off where the next one we will want */ - net->indx_of_eligible_next_to_use = cur_addr_num + 1; + net->indx_of_eligible_next_to_use = + (uint8_t) (cur_addr_num + 1); } return (sctp_ifa); } @@ -3153,7 +3154,8 @@ sctp_choose_boundall(struct sctp_inpcb *inp, if (sifa == NULL) continue; if (net) { - net->indx_of_eligible_next_to_use = cur_addr_num + 1; + net->indx_of_eligible_next_to_use = + (uint8_t) (cur_addr_num + 1); SCTPDBG(SCTP_DEBUG_OUTPUT2, "we selected %d\n", cur_addr_num); SCTPDBG(SCTP_DEBUG_OUTPUT2, "Source:"); @@ -3724,7 +3726,7 @@ sctp_process_cmsgs_for_init(struct sctp_tcb *stcb, struct mbuf *control, int *er if (tmp_str != NULL) { SCTP_FREE(stcb->asoc.strmout, SCTP_M_STRMO); stcb->asoc.strmout = tmp_str; - stcb->asoc.strm_realoutsize = stcb->asoc.streamoutcnt = stcb->asoc.pre_open_streams; + stcb->asoc.strm_realoutsize = stcb->asoc.streamoutcnt = (uint16_t) stcb->asoc.pre_open_streams; } else { stcb->asoc.pre_open_streams = stcb->asoc.streamoutcnt; } @@ -3743,7 +3745,7 @@ sctp_process_cmsgs_for_init(struct sctp_tcb *stcb, struct mbuf *control, int *er #endif stcb->asoc.strmout[i].next_mid_ordered = 0; stcb->asoc.strmout[i].next_mid_unordered = 0; - stcb->asoc.strmout[i].sid = i; + stcb->asoc.strmout[i].sid = (uint16_t) i; stcb->asoc.strmout[i].last_msg_incomplete = 0; stcb->asoc.strmout[i].state = SCTP_STREAM_OPENING; } @@ -3975,21 +3977,21 @@ sctp_add_cookie(struct mbuf *init, int init_offset, /* tack the INIT and then the INIT-ACK onto the chain */ cookie_sz = 0; for (m_at = mret; m_at; m_at = SCTP_BUF_NEXT(m_at)) { - cookie_sz += SCTP_BUF_LEN(m_at); + cookie_sz += (uint16_t) SCTP_BUF_LEN(m_at); if (SCTP_BUF_NEXT(m_at) == NULL) { SCTP_BUF_NEXT(m_at) = copy_init; break; } } for (m_at = copy_init; m_at; m_at = SCTP_BUF_NEXT(m_at)) { - cookie_sz += SCTP_BUF_LEN(m_at); + cookie_sz += (uint16_t) SCTP_BUF_LEN(m_at); if (SCTP_BUF_NEXT(m_at) == NULL) { SCTP_BUF_NEXT(m_at) = copy_initack; break; } } for (m_at = copy_initack; m_at; m_at = SCTP_BUF_NEXT(m_at)) { - cookie_sz += SCTP_BUF_LEN(m_at); + cookie_sz += (uint16_t) SCTP_BUF_LEN(m_at); if (SCTP_BUF_NEXT(m_at) == NULL) { break; } @@ -4232,7 +4234,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, #if defined(__FreeBSD__) && !defined(__Userspace__) ip->ip_len = htons(packet_length); #else - ip->ip_len = packet_length; + ip->ip_len = (u_short) packet_length; #endif ip->ip_tos = tos_value; if (port) { @@ -4308,14 +4310,14 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, } } if (port) { - if (htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { + if (htons((u_short) SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { sctp_handle_no_route(stcb, net, so_locked); SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, EHOSTUNREACH); sctp_m_freem(m); return (EHOSTUNREACH); } udp = (struct udphdr *)((caddr_t)ip + sizeof(struct ip)); - udp->uh_sport = htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); + udp->uh_sport = htons((u_short) SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); udp->uh_dport = port; udp->uh_ulen = htons((uint16_t)(packet_length - sizeof(struct ip))); #if !defined(__Userspace__) @@ -4805,14 +4807,14 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, ip6h->ip6_src = lsa6->sin6_addr; if (port) { - if (htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { + if (htons((u_short) SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { sctp_handle_no_route(stcb, net, so_locked); SCTP_LTRACE_ERR_RET_PKT(m, inp, stcb, NULL, SCTP_FROM_SCTP_OUTPUT, EHOSTUNREACH); sctp_m_freem(m); return (EHOSTUNREACH); } udp = (struct udphdr *)((caddr_t)ip6h + sizeof(struct ip6_hdr)); - udp->uh_sport = htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); + udp->uh_sport = htons((u_short) SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); udp->uh_dport = port; udp->uh_ulen = htons((uint16_t)(packet_length - sizeof(struct ip6_hdr))); udp->uh_sum = 0; @@ -5041,7 +5043,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, /* Don't alloc/free for each packet */ if ((buffer = malloc(packet_length)) != NULL) { m_copydata(m, 0, packet_length, buffer); - ret = SCTP_BASE_VAR(conn_output)(sconn->sconn_addr, buffer, packet_length, tos_value, nofragment_flag); + ret = SCTP_BASE_VAR(conn_output)(sconn->sconn_addr, buffer, packet_length, tos_value, (uint8_t) nofragment_flag); free(buffer); } else { ret = ENOMEM; @@ -5135,8 +5137,8 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked) /* set up some of the credits. */ init->init.a_rwnd = htonl(max(inp->sctp_socket?SCTP_SB_LIMIT_RCV(inp->sctp_socket):0, SCTP_MINIMAL_RWND)); - init->init.num_outbound_streams = htons(stcb->asoc.pre_open_streams); - init->init.num_inbound_streams = htons(stcb->asoc.max_inbound_streams); + init->init.num_outbound_streams = htons((u_short) stcb->asoc.pre_open_streams); + init->init.num_inbound_streams = htons((u_short) stcb->asoc.max_inbound_streams); init->init.initial_tsn = htonl(stcb->asoc.init_seq_number); /* Adaptation layer indication parameter */ @@ -5233,7 +5235,7 @@ sctp_send_initiate(struct sctp_inpcb *inp, struct sctp_tcb *stcb, int so_locked) padding_len = 0; } randp = (struct sctp_auth_random *)(mtod(m, caddr_t) + chunk_len); - parameter_len = (uint16_t)sizeof(struct sctp_auth_random) + stcb->asoc.authinfo.random_len; + parameter_len = (uint16_t) (sizeof(struct sctp_auth_random) + stcb->asoc.authinfo.random_len); /* random key already contains the header */ memcpy(randp, stcb->asoc.authinfo.random->key, parameter_len); padding_len = SCTP_SIZE32(parameter_len) - parameter_len; @@ -5819,7 +5821,7 @@ sctp_are_there_new_addresses(struct sctp_association *asoc, * This looks no different than if no listener was * present. */ - *op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), "Address added"); + *op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), "Address added"); return (true); } } @@ -5927,7 +5929,7 @@ sctp_are_there_new_addresses(struct sctp_association *asoc, * This looks no different than if no listener * was present. */ - *op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), "Address added"); + *op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), "Address added"); return (true); } } @@ -6021,7 +6023,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, * This looks no different than if no listener * was present. */ - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), "Remote encapsulation port changed"); sctp_send_abort(init_pkt, iphlen, src, dst, sh, 0, op_err, #if defined(__FreeBSD__) && !defined(__Userspace__) @@ -6043,7 +6045,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, char msg[SCTP_DIAG_INFO_LEN]; SCTP_SNPRINTF(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); } sctp_send_abort(init_pkt, iphlen, src, dst, sh, @@ -6430,7 +6432,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, if (asoc->streamoutcnt > asoc->pre_open_streams) { i_want = asoc->streamoutcnt; } else { - i_want = asoc->pre_open_streams; + i_want = (uint16_t) asoc->pre_open_streams; } } else { i_want = inp->sctp_ep.pre_open_stream_count; @@ -6573,9 +6575,9 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, } /* add HMAC_ALGO parameter */ hmacs = (struct sctp_auth_hmac_algo *)(mtod(m, caddr_t) + chunk_len); - parameter_len = (uint16_t)sizeof(struct sctp_auth_hmac_algo) + + parameter_len = (uint16_t) (sizeof(struct sctp_auth_hmac_algo) + sctp_serialize_hmaclist(inp->sctp_ep.local_hmacs, - (uint8_t *)hmacs->hmac_ids); + (uint8_t *)hmacs->hmac_ids)); hmacs->ph.param_type = htons(SCTP_HMAC_LIST); hmacs->ph.param_length = htons(parameter_len); padding_len = SCTP_SIZE32(parameter_len) - parameter_len; @@ -6588,9 +6590,9 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, } /* add CHUNKS parameter */ chunks = (struct sctp_auth_chunk_list *)(mtod(m, caddr_t) + chunk_len); - parameter_len = (uint16_t)sizeof(struct sctp_auth_chunk_list) + + parameter_len = (uint16_t) (sizeof(struct sctp_auth_chunk_list) + sctp_serialize_auth_chunks(inp->sctp_ep.local_auth_chunks, - chunks->chunk_types); + chunks->chunk_types)); chunks->ph.param_type = htons(SCTP_CHUNK_LIST); chunks->ph.param_length = htons(parameter_len); padding_len = SCTP_SIZE32(parameter_len) - parameter_len; @@ -6629,7 +6631,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, if (op_err) { parameter_len = 0; for (m_tmp = op_err; m_tmp != NULL; m_tmp = SCTP_BUF_NEXT(m_tmp)) { - parameter_len += SCTP_BUF_LEN(m_tmp); + parameter_len += (uint16_t) SCTP_BUF_LEN(m_tmp); } padding_len = SCTP_SIZE32(parameter_len) - parameter_len; SCTP_BUF_NEXT(m_last) = op_err; @@ -6659,7 +6661,7 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb, SCTP_BUF_NEXT(m_last) = m_cookie; parameter_len = 0; for (m_tmp = m_cookie; m_tmp != NULL; m_tmp = SCTP_BUF_NEXT(m_tmp)) { - parameter_len += SCTP_BUF_LEN(m_tmp); + parameter_len += (uint16_t) SCTP_BUF_LEN(m_tmp); if (SCTP_BUF_NEXT(m_tmp) == NULL) { m_last = m_tmp; } @@ -7331,7 +7333,7 @@ sctp_sendall_iterator(struct sctp_inpcb *inp, struct sctp_tcb *stcb, void *ptr, abort_anyway: SCTP_SNPRINTF(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); atomic_add_int(&stcb->asoc.refcnt, 1); sctp_abort_an_association(stcb->sctp_ep, stcb, @@ -8074,10 +8076,10 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb, #else SCTP_PRINTF("prepend fails HELP?\n"); sctp_free_a_chunk(stcb, chk, so_locked); -#endif *bail = 1; to_move = 0; goto out_of; +#endif } sctp_snd_sb_alloc(stcb, SCTP_DATA_CHUNK_OVERHEAD(stcb)); chk->book_size = chk->send_size = (uint16_t)(to_move + SCTP_DATA_CHUNK_OVERHEAD(stcb)); @@ -8202,7 +8204,7 @@ sctp_move_to_outqueue(struct sctp_tcb *stcb, chk->last_mbuf = lm; chk->pad_inplace = 1; } - chk->send_size += pads; + chk->send_size += (uint16_t) pads; } if (PR_SCTP_ENABLED(chk->flags)) { asoc->pr_sctp_cnt++; @@ -9704,7 +9706,7 @@ sctp_send_heartbeat_ack(struct sctp_tcb *stcb, chk->rec.chunk_id.id = SCTP_HEARTBEAT_ACK; chk->rec.chunk_id.can_take_data = 1; chk->flags = 0; - chk->send_size = chk_length; + chk->send_size = (uint16_t) chk_length; chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; chk->asoc = &stcb->asoc; @@ -9907,7 +9909,7 @@ sctp_send_asconf(struct sctp_tcb *stcb, struct sctp_nets *net, int addr_locked) chk->rec.chunk_id.can_take_data = 0; chk->flags = CHUNK_FLAGS_FRAGMENT_OK; chk->data = m_asconf; - chk->send_size = len; + chk->send_size = (uint16_t) len; chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; chk->asoc = &stcb->asoc; @@ -10204,7 +10206,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp, SCTP_SNPRINTF(msg, sizeof(msg), "TSN %8.8x retransmitted %d times, giving up", chk->rec.data.tsn, chk->snd_count); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); atomic_add_int(&stcb->asoc.refcnt, 1); sctp_abort_an_association(stcb->sctp_ep, stcb, op_err, @@ -10612,7 +10614,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, */ struct sctp_association *asoc; struct sctp_nets *net; - int error = 0, num_out, tot_out = 0, ret = 0, reason_code; + int error = 0, num_out = 0, tot_out = 0, ret = 0, reason_code; unsigned int burst_cnt = 0; struct timeval now; int now_filled = 0; @@ -11057,7 +11059,7 @@ send_forward_tsn(struct sctp_tcb *stcb, cnt_of_skipped * sizeof(struct sctp_strseq); } } - chk->send_size = space_needed; + chk->send_size = (uint16_t) space_needed; /* Setup the chunk */ fwdtsn = mtod(chk->data, struct sctp_forward_tsn_chunk *); fwdtsn->ch.chunk_length = htons(chk->send_size); @@ -11366,9 +11368,9 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked) * side */ mergeable = 0; - gap_descriptor->start = htons((selector->gaps[j].start + offset)); + gap_descriptor->start = htons((u_short)(selector->gaps[j].start + offset)); } - gap_descriptor->end = htons((selector->gaps[j].end + offset)); + gap_descriptor->end = htons((u_short)(selector->gaps[j].end + offset)); num_gap_blocks++; gap_descriptor++; if (((caddr_t)gap_descriptor + sizeof(struct sctp_gap_ack_block)) > limit) { @@ -11439,9 +11441,9 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked) * side */ mergeable = 0; - gap_descriptor->start = htons((selector->gaps[j].start + offset)); + gap_descriptor->start = htons((u_short)(selector->gaps[j].start + offset)); } - gap_descriptor->end = htons((selector->gaps[j].end + offset)); + gap_descriptor->end = htons((u_short)(selector->gaps[j].end + offset)); num_nr_gap_blocks++; gap_descriptor++; if (((caddr_t)gap_descriptor + sizeof(struct sctp_gap_ack_block)) > limit) { @@ -11487,8 +11489,8 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked) SCTP_BUF_LEN(a_chk->data) = a_chk->send_size; sack->sack.cum_tsn_ack = htonl(asoc->cumulative_tsn); sack->sack.a_rwnd = htonl(asoc->my_rwnd); - sack->sack.num_gap_ack_blks = htons(num_gap_blocks); - sack->sack.num_dup_tsns = htons(num_dups); + sack->sack.num_gap_ack_blks = htons((u_short) num_gap_blocks); + sack->sack.num_dup_tsns = htons((u_short) num_dups); sack->ch.chunk_type = type; sack->ch.chunk_flags = flags; sack->ch.chunk_length = htons(a_chk->send_size); @@ -11499,9 +11501,9 @@ sctp_send_sack(struct sctp_tcb *stcb, int so_locked) SCTP_BUF_LEN(a_chk->data) = a_chk->send_size; nr_sack->nr_sack.cum_tsn_ack = htonl(asoc->cumulative_tsn); nr_sack->nr_sack.a_rwnd = htonl(asoc->my_rwnd); - nr_sack->nr_sack.num_gap_ack_blks = htons(num_gap_blocks); - nr_sack->nr_sack.num_nr_gap_ack_blks = htons(num_nr_gap_blocks); - nr_sack->nr_sack.num_dup_tsns = htons(num_dups); + nr_sack->nr_sack.num_gap_ack_blks = htons((u_short) num_gap_blocks); + nr_sack->nr_sack.num_nr_gap_ack_blks = htons((u_short) num_nr_gap_blocks); + nr_sack->nr_sack.num_dup_tsns = htons((u_short) num_dups); nr_sack->nr_sack.reserved = 0; nr_sack->ch.chunk_type = type; nr_sack->ch.chunk_flags = flags; @@ -11840,7 +11842,7 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockaddr *dst, #else ip->ip_id = ip_id++; #endif - ip->ip_ttl = MODULE_GLOBAL(ip_defttl); + ip->ip_ttl = (u_char) MODULE_GLOBAL(ip_defttl); if (port) { ip->ip_p = IPPROTO_UDP; } else { @@ -11887,12 +11889,12 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockaddr *dst, } #if defined(INET) || defined(INET6) if (port) { - if (htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { + if (htons((u_short) SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) == 0) { sctp_m_freem(mout); return; } udp = (struct udphdr *)shout; - udp->uh_sport = htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); + udp->uh_sport = htons((u_short) SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); udp->uh_dport = port; udp->uh_sum = 0; udp->uh_ulen = htons((uint16_t)(sizeof(struct udphdr) + @@ -11955,7 +11957,7 @@ sctp_send_resp_msg(struct sockaddr *src, struct sockaddr *dst, #if defined(__FreeBSD__) && !defined(__Userspace__) ip->ip_len = htons(len); #elif defined(__APPLE__) || defined(__Userspace__) - ip->ip_len = len; + ip->ip_len = (u_short) len; #else ip->ip_len = htons(len); #endif @@ -12345,7 +12347,7 @@ sctp_send_packet_dropped(struct sctp_tcb *stcb, struct sctp_nets *net, chk->rec.chunk_id.can_take_data = 1; chk->flags = 0; len -= iphlen; - chk->send_size = len; + chk->send_size = (uint16_t) len; /* Validate that we do not have an ABORT in here. */ offset = iphlen + sizeof(struct sctphdr); ch = (struct sctp_chunkhdr *)sctp_m_getptr(m, offset, @@ -12404,7 +12406,7 @@ sctp_send_packet_dropped(struct sctp_tcb *stcb, struct sctp_nets *net, chk->book_size_scale = 0; if (was_trunc) { drp->ch.chunk_flags = SCTP_PACKET_TRUNCATED; - drp->trunc_len = htons(fullsz); + drp->trunc_len = htons((u_short) fullsz); /* Len is already adjusted to size minus overhead above * take out the pkt_drop chunk itself from it. */ @@ -13052,7 +13054,7 @@ sctp_send_str_reset_req(struct sctp_tcb *stcb, stcb->asoc.strmout[i].next_mid_ordered = oldstream[i].next_mid_ordered; stcb->asoc.strmout[i].next_mid_unordered = oldstream[i].next_mid_unordered; stcb->asoc.strmout[i].last_msg_incomplete = oldstream[i].last_msg_incomplete; - stcb->asoc.strmout[i].sid = i; + stcb->asoc.strmout[i].sid = (uint16_t) i; stcb->asoc.strmout[i].state = oldstream[i].state; /* now anything on those queues? */ TAILQ_FOREACH_SAFE(sp, &oldstream[i].outqueue, next, nsp) { @@ -13076,7 +13078,7 @@ sctp_send_str_reset_req(struct sctp_tcb *stcb, #endif stcb->asoc.strmout[i].next_mid_ordered = 0; stcb->asoc.strmout[i].next_mid_unordered = 0; - stcb->asoc.strmout[i].sid = i; + stcb->asoc.strmout[i].sid = (uint16_t) i; stcb->asoc.strmout[i].last_msg_incomplete = 0; stcb->asoc.ss_functions.sctp_ss_init_stream(stcb, &stcb->asoc.strmout[i], NULL); stcb->asoc.strmout[i].state = SCTP_STREAM_CLOSED; @@ -13529,10 +13531,10 @@ sctp_lower_sosend(struct socket *so, #endif struct timeval now; struct sctp_block_entry be; - struct sctp_inpcb *inp; + struct sctp_inpcb *inp = NULL; struct sctp_tcb *stcb = NULL; struct sctp_nets *net; - struct sctp_association *asoc; + struct sctp_association *asoc = NULL; struct sctp_inpcb *t_inp; struct sctp_nonpad_sndrcvinfo *sndrcvninfo; ssize_t sndlen = 0, max_len, local_add_more; @@ -14731,7 +14733,7 @@ sctp_lower_sosend(struct socket *so, } SCTP_SNPRINTF(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); #if defined(__FreeBSD__) && !defined(__Userspace__) NET_EPOCH_ENTER(et); @@ -14932,7 +14934,7 @@ sctp_add_auth_chunk(struct mbuf *m, struct mbuf **m_end, auth->ch.chunk_flags = 0; chunk_len = sizeof(*auth) + sctp_get_hmac_digest_len(stcb->asoc.peer_hmac_id); - auth->ch.chunk_length = htons(chunk_len); + auth->ch.chunk_length = htons((u_short) chunk_len); auth->hmac_id = htons(stcb->asoc.peer_hmac_id); /* key id and hmac digest will be computed and filled in upon send */ diff --git a/usrsctplib/netinet/sctp_pcb.c b/usrsctplib/netinet/sctp_pcb.c index f4429e751..7e7eef53c 100755 --- a/usrsctplib/netinet/sctp_pcb.c +++ b/usrsctplib/netinet/sctp_pcb.c @@ -215,8 +215,9 @@ sctp_allocate_vrf(int vrf_id) /* No memory */ #ifdef INVARIANTS panic("No memory for VRF:%d", vrf_id); -#endif +#else return (NULL); +#endif } /* setup the VRF */ memset(vrf, 0, sizeof(struct sctp_vrf)); @@ -233,9 +234,10 @@ sctp_allocate_vrf(int vrf_id) /* No memory */ #ifdef INVARIANTS panic("No memory for VRF:%d", vrf_id); -#endif +#else SCTP_FREE(vrf, SCTP_M_VRF); return (NULL); +#endif } /* Add it to the hash table */ @@ -548,16 +550,18 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, if (new_sctp_ifnp == NULL) { #ifdef INVARIANTS panic("No memory for IFN"); -#endif +#else return (NULL); +#endif } SCTP_MALLOC(new_sctp_ifap, struct sctp_ifa *, sizeof(struct sctp_ifa), SCTP_M_IFA); if (new_sctp_ifap == NULL) { #ifdef INVARIANTS panic("No memory for IFA"); -#endif +#else SCTP_FREE(new_sctp_ifnp, SCTP_M_IFN); return (NULL); +#endif } SCTP_IPI_ADDR_WLOCK(); @@ -2264,7 +2268,7 @@ sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock, } head = &SCTP_BASE_INFO(sctp_ephash)[SCTP_PCBHASH_ALLADDR(lport, SCTP_BASE_INFO(hashmark))]; - inp = sctp_endpoint_probe(nam, head, lport, vrf_id); + inp = sctp_endpoint_probe(nam, head, (uint16_t) lport, vrf_id); /* * If the TCP model exists it could be that the main listening @@ -2279,7 +2283,7 @@ sctp_pcb_findep(struct sockaddr *nam, int find_tcp_pool, int have_lock, if (inp == NULL && find_tcp_pool) { for (i = 0; i < SCTP_BASE_INFO(hashtcpmark) + 1; i++) { head = &SCTP_BASE_INFO(sctp_tcpephash)[i]; - inp = sctp_endpoint_probe(nam, head, lport, vrf_id); + inp = sctp_endpoint_probe(nam, head, (uint16_t) lport, vrf_id); if (inp) { break; } @@ -2816,7 +2820,7 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) return (ENOBUFS); } SCTP_INCR_EP_COUNT(); - inp->ip_inp.inp.inp_ip_ttl = MODULE_GLOBAL(ip_defttl); + inp->ip_inp.inp.inp_ip_ttl = (u_char) MODULE_GLOBAL(ip_defttl); SCTP_INP_INFO_WUNLOCK(); so->so_pcb = (caddr_t)inp; @@ -2963,10 +2967,10 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) m->initial_rto = SCTP_BASE_SYSCTL(sctp_rto_initial_default); m->initial_init_rto_max = SCTP_BASE_SYSCTL(sctp_init_rto_max_default); m->sctp_sack_freq = SCTP_BASE_SYSCTL(sctp_sack_freq_default); - m->max_init_times = SCTP_BASE_SYSCTL(sctp_init_rtx_max_default); - m->max_send_times = SCTP_BASE_SYSCTL(sctp_assoc_rtx_max_default); - m->def_net_failure = SCTP_BASE_SYSCTL(sctp_path_rtx_max_default); - m->def_net_pf_threshold = SCTP_BASE_SYSCTL(sctp_path_pf_threshold); + m->max_init_times = (uint16_t) SCTP_BASE_SYSCTL(sctp_init_rtx_max_default); + m->max_send_times = (uint16_t) SCTP_BASE_SYSCTL(sctp_assoc_rtx_max_default); + m->def_net_failure = (uint16_t) SCTP_BASE_SYSCTL(sctp_path_rtx_max_default); + m->def_net_pf_threshold = (uint16_t) SCTP_BASE_SYSCTL(sctp_path_pf_threshold); m->sctp_sws_sender = SCTP_SWS_SENDER_DEF; m->sctp_sws_receiver = SCTP_SWS_RECEIVER_DEF; m->max_burst = SCTP_BASE_SYSCTL(sctp_max_burst_default); @@ -2974,19 +2978,18 @@ sctp_inpcb_alloc(struct socket *so, uint32_t vrf_id) m->sctp_default_cc_module = SCTP_BASE_SYSCTL(sctp_default_cc_module); m->sctp_default_ss_module = SCTP_BASE_SYSCTL(sctp_default_ss_module); - m->max_open_streams_intome = SCTP_BASE_SYSCTL(sctp_nr_incoming_streams_default); + m->max_open_streams_intome = (uint16_t) SCTP_BASE_SYSCTL(sctp_nr_incoming_streams_default); /* number of streams to pre-open on a association */ - m->pre_open_stream_count = SCTP_BASE_SYSCTL(sctp_nr_outgoing_streams_default); + m->pre_open_stream_count = (uint16_t) SCTP_BASE_SYSCTL(sctp_nr_outgoing_streams_default); m->default_mtu = 0; /* Add adaptation cookie */ m->adaptation_layer_indicator = 0; m->adaptation_layer_indicator_provided = 0; - /* seed random number generator */ - m->random_counter = 1; - m->store_at = SCTP_SIGNATURE_SIZE; - SCTP_READ_RANDOM(m->random_numbers, sizeof(m->random_numbers)); + /* Seed random number generator */ + SCTP_EP_RANDOM_STORE_LOCK_INIT(m); + m->random_store_index = 0; sctp_fill_random_store(m); /* Minimum cookie size */ @@ -3550,8 +3553,8 @@ sctp_inpcb_bind_locked(struct sctp_inpcb *inp, struct sockaddr *addr, uint16_t count; #if defined(__Userspace__) - first = MODULE_GLOBAL(ipport_firstauto); - last = MODULE_GLOBAL(ipport_lastauto); + first = (uint16_t) MODULE_GLOBAL(ipport_firstauto); + last = (uint16_t) MODULE_GLOBAL(ipport_lastauto); #elif defined(_WIN32) first = 1; last = 0xffff; @@ -4276,6 +4279,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, int from) SCTP_INP_LOCK_DESTROY(inp); SCTP_INP_READ_LOCK_DESTROY(inp); SCTP_ASOC_CREATE_LOCK_DESTROY(inp); + SCTP_EP_RANDOM_STORE_LOCK_DESTROY (&inp->sctp_ep); #if !(defined(__APPLE__) && !defined(__Userspace__)) SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_ep), inp); SCTP_DECR_EP_COUNT(); @@ -4495,7 +4499,7 @@ sctp_add_remote_addr(struct sctp_tcb *stcb, struct sockaddr *newaddr, default: break; } - net->addr_is_local = sctp_is_address_on_local_host(newaddr, stcb->asoc.vrf_id); + net->addr_is_local = (uint8_t) sctp_is_address_on_local_host(newaddr, stcb->asoc.vrf_id); if (net->addr_is_local && ((set_scope || (from == SCTP_ADDR_IS_CONFIRMED)))) { stcb->asoc.scope.loopback_scope = 1; stcb->asoc.scope.ipv4_local_scope = 1; @@ -7214,7 +7218,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, /* in setup state we abort this guy */ SCTP_SNPRINTF(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_abort_an_association(stcb_tmp->sctp_ep, stcb_tmp, op_err, false, @@ -7308,7 +7312,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, /* in setup state we abort this guy */ SCTP_SNPRINTF(msg, sizeof(msg), "%s:%d at %s", __FILE__, __LINE__, __func__); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t) SCTP_BASE_SYSCTL(sctp_diag_info_code), msg); sctp_abort_an_association(stcb_tmp->sctp_ep, stcb_tmp, op_err, false, @@ -7944,7 +7948,7 @@ sctp_drain_mbufs(struct sctp_tcb *stcb) * Now do we need to find a new * asoc->highest_tsn_inside_map? */ - asoc->last_revoke_count = cnt; + asoc->last_revoke_count = (uint16_t) cnt; sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb->sctp_ep, stcb, NULL, SCTP_FROM_SCTP_PCB + SCTP_LOC_11); /*sa_ignore NO_NULL_CHK*/ diff --git a/usrsctplib/netinet/sctp_pcb.h b/usrsctplib/netinet/sctp_pcb.h index 5298afc2a..2f5196795 100755 --- a/usrsctplib/netinet/sctp_pcb.h +++ b/usrsctplib/netinet/sctp_pcb.h @@ -343,7 +343,7 @@ struct sctp_base_info { /*- * Here we have all the relevant information for each SCTP entity created. We - * will need to modify this as approprate. We also need to figure out how to + * will need to modify this as appropriate. We also need to figure out how to * access /dev/random. */ struct sctp_pcb { @@ -387,9 +387,9 @@ struct sctp_pcb { uint16_t max_open_streams_intome; /* random number generator */ - uint32_t random_counter; - uint8_t random_numbers[SCTP_SIGNATURE_ALOC_SIZE]; - uint8_t random_store[SCTP_SIGNATURE_ALOC_SIZE]; + userland_mutex_t random_store_mtx; + uint32_t random_store_index; + uint32_t random_store[1024]; // *MUST* be a power of two! /* * This timer is kept running per endpoint. When it fires it will @@ -400,10 +400,11 @@ struct sctp_pcb { uint32_t def_cookie_life; /* defaults to 0 */ uint32_t auto_close_time; +#ifdef SCTP_DEBUG uint32_t initial_sequence_debug; +#endif uint32_t adaptation_layer_indicator; uint8_t adaptation_layer_indicator_provided; - uint32_t store_at; uint32_t max_burst; uint32_t fr_max_burst; #ifdef INET6 diff --git a/usrsctplib/netinet/sctp_process_lock.h b/usrsctplib/netinet/sctp_process_lock.h index feaa2c6ac..7441b066a 100755 --- a/usrsctplib/netinet/sctp_process_lock.h +++ b/usrsctplib/netinet/sctp_process_lock.h @@ -104,6 +104,11 @@ #define SCTP_INP_READ_UNLOCK(_inp) #define SCTP_INP_READ_LOCK_ASSERT(_inp) +#define SCTP_EP_RANDOM_STORE_LOCK_INIT(_ep) +#define SCTP_EP_RANDOM_STORE_LOCK_DESTROY(_ep) +#define SCTP_EP_RANDOM_STORE_LOCK(_ep) +#define SCTP_EP_RANDOM_STORE_UNLOCK(_ep) + /* Lock for TCB */ #define SCTP_TCB_LOCK_INIT(_tcb) #define SCTP_TCB_LOCK_DESTROY(_tcb) @@ -191,6 +196,15 @@ LeaveCriticalSection(&(_inp)->inp_rdata_mtx) #define SCTP_INP_READ_LOCK_ASSERT(_inp) +#define SCTP_EP_RANDOM_STORE_LOCK_INIT(_ep) \ + InitializeCriticalSection (&(_ep)->random_store_mtx) +#define SCTP_EP_RANDOM_STORE_LOCK_DESTROY(_ep) \ + DeleteCriticalSection (&(_ep)->random_store_mtx) +#define SCTP_EP_RANDOM_STORE_LOCK(_ep) \ + EnterCriticalSection (&(_ep)->random_store_mtx) +#define SCTP_EP_RANDOM_STORE_UNLOCK(_ep) \ + LeaveCriticalSection (&(_ep)->random_store_mtx) + #define SCTP_INP_LOCK_INIT(_inp) \ InitializeCriticalSection(&(_inp)->inp_mtx) #define SCTP_INP_LOCK_DESTROY(_inp) \ @@ -355,6 +369,15 @@ #define SCTP_INP_READ_LOCK_ASSERT(_inp) \ KASSERT(pthread_mutex_trylock(&(_inp)->inp_rdata_mtx) == EBUSY, ("%s:%d: inp_rdata_mtx not locked", __FILE__, __LINE__)) +#define SCTP_EP_RANDOM_STORE_LOCK_INIT(_ep) \ + (void)pthread_mutex_init(&(_ep)->random_store_mtx, NULL) +#define SCTP_EP_RANDOM_STORE_LOCK_DESTROY(_ep) \ + (void)pthread_mutex_destroy(&(_ep)->random_store_mtx) +#define SCTP_EP_RANDOM_STORE_LOCK(_ep) \ + (void)pthread_mutex_lock(&(_ep)->random_store_mtx) +#define SCTP_EP_RANDOM_STORE_UNLOCK(_ep) \ + (void)pthread_mutex_unlock(&(_ep)->random_store_mtx) + #define SCTP_INP_LOCK_INIT(_inp) \ (void)pthread_mutex_init(&(_inp)->inp_mtx, &SCTP_BASE_VAR(mtx_attr)) #define SCTP_INP_LOCK_DESTROY(_inp) \ diff --git a/usrsctplib/netinet/sctp_sha1.c b/usrsctplib/netinet/sctp_sha1.c index db0e7533f..f0a21e90c 100755 --- a/usrsctplib/netinet/sctp_sha1.c +++ b/usrsctplib/netinet/sctp_sha1.c @@ -82,13 +82,29 @@ sctp_sha1_final(unsigned char *digest, struct sctp_sha1_context *ctx) } #else - -#include #if defined(_WIN32) && defined(__Userspace__) -#include +void sctp_sha1_init (struct sctp_sha1_context *ctx) +{ + (void) CryptCreateHash (crypto_provider, CALG_SHA1, 0, 0, &ctx->hash); +} + +void sctp_sha1_update (struct sctp_sha1_context *ctx, + const unsigned char *ptr, + unsigned int siz) +{ + (void) CryptHashData (ctx->hash, ptr, siz, 0); +} + +void sctp_sha1_final (unsigned char *digest, struct sctp_sha1_context *ctx) +{ + DWORD digest_size = 20; + (void) CryptGetHashParam (ctx->hash, HP_HASHVAL, digest, &digest_size, 0); + (void) CryptDestroyHash (ctx->hash); + ctx->hash = 0; +} #elif !(defined(_WIN32) && !defined(__Userspace__)) +#include #include -#endif #define F1(B,C,D) (((B & C) | ((~B) & D))) /* 0 <= t <= 19 */ #define F2(B,C,D) (B ^ C ^ D) /* 20 <= t <= 39 */ @@ -327,3 +343,4 @@ sctp_sha1_final(unsigned char *digest, struct sctp_sha1_context *ctx) } #endif +#endif diff --git a/usrsctplib/netinet/sctp_sha1.h b/usrsctplib/netinet/sctp_sha1.h index 8e136045f..8b7c81f5a 100755 --- a/usrsctplib/netinet/sctp_sha1.h +++ b/usrsctplib/netinet/sctp_sha1.h @@ -42,6 +42,16 @@ #include #endif +#if defined(_WIN32) && defined(__Userspace__) +#include +#include +#include +struct sctp_sha1_context +{ + HCRYPTHASH hash; +}; +extern HCRYPTPROV crypto_provider; +#else struct sctp_sha1_context { #if defined(SCTP_USE_NSS_SHA1) struct PK11Context *pk11_ctx; @@ -67,6 +77,7 @@ struct sctp_sha1_context { unsigned int running_total; #endif }; +#endif #if (defined(__APPLE__) && !defined(__Userspace__) && defined(KERNEL)) #ifndef _KERNEL diff --git a/usrsctplib/netinet/sctp_timer.c b/usrsctplib/netinet/sctp_timer.c index 497f2f0bd..664e2c76d 100755 --- a/usrsctplib/netinet/sctp_timer.c +++ b/usrsctplib/netinet/sctp_timer.c @@ -154,7 +154,7 @@ sctp_threshold_management(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* Abort notification sends a ULP notify */ struct mbuf *op_err; - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t)SCTP_BASE_SYSCTL(sctp_diag_info_code), "Association error counter exceeded"); inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_2; sctp_abort_an_association(inp, stcb, op_err, true, SCTP_SO_NOT_LOCKED); @@ -1077,7 +1077,7 @@ sctp_cookie_timer(struct sctp_inpcb *inp, /* FOOBAR! */ struct mbuf *op_err; - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause((uint16_t)SCTP_BASE_SYSCTL(sctp_diag_info_code), "Cookie timer expired, but no cookie"); inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_3; sctp_abort_an_association(inp, stcb, op_err, false, SCTP_SO_NOT_LOCKED); diff --git a/usrsctplib/netinet/sctp_userspace.c b/usrsctplib/netinet/sctp_userspace.c index 71888901f..14a35ab19 100755 --- a/usrsctplib/netinet/sctp_userspace.c +++ b/usrsctplib/netinet/sctp_userspace.c @@ -31,6 +31,7 @@ #include #include #include +#include #if !defined(__MINGW32__) #pragma comment(lib, "iphlpapi.lib") #endif @@ -52,8 +53,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" #endif -static DWORD WINAPI -sctp_create_thread_adapter(void *arg) { + +static unsigned __stdcall sctp_create_thread_adapter (void *arg) +{ start_routine_t start_routine = (start_routine_t)arg; return start_routine(NULL) == NULL; } @@ -61,11 +63,13 @@ sctp_create_thread_adapter(void *arg) { int sctp_userspace_thread_create(userland_thread_t *thread, start_routine_t start_routine) { - *thread = CreateThread(NULL, 0, sctp_create_thread_adapter, - (void *)start_routine, 0, NULL); - if (*thread == NULL) - return GetLastError(); - return 0; + *thread = (HANDLE) _beginthreadex (NULL, 0, sctp_create_thread_adapter, + (void*) start_routine, 0, NULL); + if (*thread == NULL) { + return errno; + } + + return 0; } #if defined(__MINGW32__) @@ -80,17 +84,60 @@ sctp_userspace_thread_create(userland_thread_t *thread, start_routine_t start_ro } #endif +#if defined(_MSC_VER) + +// +// https://learn.microsoft.com/en-us/visualstudio/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2022 +// + +const DWORD MS_VC_EXCEPTION = 0x406D1388; + +#pragma pack(push, 8) +typedef struct tagTHREADNAME_INFO +{ + DWORD dwType; // Must be 0x1000. + LPCSTR szName; // Pointer to name (in user addr space). + DWORD dwThreadID; // Thread ID (-1=caller thread). + DWORD dwFlags; // Reserved for future use, must be zero. +} THREADNAME_INFO; +#pragma pack(pop) + +void SetThreadName (DWORD dwThreadID, const char *threadName) +{ + THREADNAME_INFO info; + info.dwType = 0x1000; + info.szName = threadName; + info.dwThreadID = dwThreadID; + info.dwFlags = 0; + +#pragma warning(push) +#pragma warning(disable : 6320 6322) + __try { + RaiseException (MS_VC_EXCEPTION, 0, sizeof (info) / sizeof (ULONG_PTR), + (ULONG_PTR *) &info); + } + __except (EXCEPTION_EXECUTE_HANDLER) { + } +#pragma warning(pop) +} + +#endif + void sctp_userspace_set_threadname(const char *name) { + const char *n = name ? name : ""; + #if defined(__APPLE__) - pthread_setname_np(name); -#endif -#if defined(__linux__) - prctl(PR_SET_NAME, name); -#endif -#if defined(__FreeBSD__) - pthread_set_name_np(pthread_self(), name); + pthread_setname_np(n); +#elif defined(__linux__) + prctl(PR_SET_NAME, n); +#elif defined(__FreeBSD__) + pthread_set_name_np(pthread_self(), n); +#elif defined(_MSC_VER) + if (IsDebuggerPresent ()) { + SetThreadName(GetCurrentThreadId(), n); + } #endif } diff --git a/usrsctplib/netinet/sctp_usrreq.c b/usrsctplib/netinet/sctp_usrreq.c index df4424e2f..59c73b0cb 100755 --- a/usrsctplib/netinet/sctp_usrreq.c +++ b/usrsctplib/netinet/sctp_usrreq.c @@ -123,12 +123,12 @@ sctp_init(void) #endif #endif #ifdef INET - SCTP_BASE_VAR(userspace_rawsctp) = -1; - SCTP_BASE_VAR(userspace_udpsctp) = -1; + SCTP_BASE_VAR(userspace_rawsctp) = (SOCKET) -1; + SCTP_BASE_VAR(userspace_udpsctp) = (SOCKET) -1; #endif #ifdef INET6 - SCTP_BASE_VAR(userspace_rawsctp6) = -1; - SCTP_BASE_VAR(userspace_udpsctp6) = -1; + SCTP_BASE_VAR(userspace_rawsctp6) = (SOCKET) -1; + SCTP_BASE_VAR(userspace_udpsctp6) = (SOCKET) -1; #endif SCTP_BASE_VAR(timer_thread_should_exit) = 0; SCTP_BASE_VAR(conn_output) = conn_output; @@ -760,7 +760,7 @@ sctp_attach(struct socket *so, int proto SCTP_UNUSED, struct proc *p SCTP_UNUSED inp->sctp_flags &= ~SCTP_PCB_FLAGS_BOUND_V6; /* I'm not v6! */ ip_inp = &inp->ip_inp.inp; ip_inp->inp_vflag |= INP_IPV4; - ip_inp->inp_ip_ttl = MODULE_GLOBAL(ip_defttl); + ip_inp->inp_ip_ttl = (u_char) MODULE_GLOBAL(ip_defttl); SCTP_INP_WUNLOCK(inp); return (0); } @@ -838,7 +838,7 @@ sctpconn_attach(struct socket *so, int proto SCTP_UNUSED, uint32_t vrf_id) inp->sctp_flags |= SCTP_PCB_FLAGS_BOUND_CONN; ip_inp = &inp->ip_inp.inp; ip_inp->inp_vflag |= INP_CONN; - ip_inp->inp_ip_ttl = MODULE_GLOBAL(ip_defttl); + ip_inp->inp_ip_ttl = (u_char) MODULE_GLOBAL(ip_defttl); SCTP_INP_WUNLOCK(inp); return (0); } @@ -2795,7 +2795,8 @@ sctp_getopt(struct socket *so, int optname, void *optval, size_t *optsize, *optsize = sizeof(uint32_t); break; } - case SCTP_SET_INITIAL_DBG_SEQ: +#ifdef SCTP_DEBUG + case SCTP_SET_INITIAL_DBG_SEQ: { uint32_t *value; @@ -2806,6 +2807,7 @@ sctp_getopt(struct socket *so, int optname, void *optval, size_t *optsize, *optsize = sizeof(uint32_t); break; } +#endif case SCTP_GET_LOCAL_ADDR_SIZE: { uint32_t *value; @@ -3312,12 +3314,12 @@ sctp_getopt(struct socket *so, int optname, void *optval, size_t *optsize, sstat->sstat_state = sctp_map_assoc_state(stcb->asoc.state); sstat->sstat_assoc_id = sctp_get_associd(stcb); sstat->sstat_rwnd = stcb->asoc.peers_rwnd; - sstat->sstat_unackdata = stcb->asoc.sent_queue_cnt; + sstat->sstat_unackdata = (uint16_t) stcb->asoc.sent_queue_cnt; /* * We can't include chunks that have been passed to * the socket layer. Only things in queue. */ - sstat->sstat_penddata = (stcb->asoc.cnt_on_reasm_queue + + sstat->sstat_penddata = (uint16_t) (stcb->asoc.cnt_on_reasm_queue + stcb->asoc.cnt_on_all_streams); sstat->sstat_instrms = stcb->asoc.streamincnt; sstat->sstat_outstrms = stcb->asoc.streamoutcnt; @@ -3466,7 +3468,7 @@ sctp_getopt(struct socket *so, int optname, void *optval, size_t *optsize, if (stcb) { sasoc->sasoc_cookie_life = sctp_ticks_to_msecs(stcb->asoc.cookie_life); sasoc->sasoc_asocmaxrxt = stcb->asoc.max_send_times; - sasoc->sasoc_number_peer_destinations = stcb->asoc.numnets; + sasoc->sasoc_number_peer_destinations = (uint16_t) stcb->asoc.numnets; sasoc->sasoc_peer_rwnd = stcb->asoc.peers_rwnd; sasoc->sasoc_local_rwnd = stcb->asoc.my_rwnd; SCTP_TCB_UNLOCK(stcb); @@ -3529,7 +3531,7 @@ sctp_getopt(struct socket *so, int optname, void *optval, size_t *optsize, sinit->sinit_num_ostreams = inp->sctp_ep.pre_open_stream_count; sinit->sinit_max_instreams = inp->sctp_ep.max_open_streams_intome; sinit->sinit_max_attempts = inp->sctp_ep.max_init_times; - sinit->sinit_max_init_timeo = inp->sctp_ep.initial_init_rto_max; + sinit->sinit_max_init_timeo = (uint16_t) inp->sctp_ep.initial_init_rto_max; SCTP_INP_RUNLOCK(inp); *optsize = sizeof(struct sctp_initmsg); break; @@ -4695,7 +4697,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize, } SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { - stcb->asoc.sctp_cmt_on_off = av->assoc_value; + stcb->asoc.sctp_cmt_on_off = (uint8_t) av->assoc_value; SCTP_TCB_UNLOCK(stcb); } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || @@ -4713,7 +4715,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize, SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); - stcb->asoc.sctp_cmt_on_off = av->assoc_value; + stcb->asoc.sctp_cmt_on_off = (uint8_t) av->assoc_value; SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); @@ -5589,7 +5591,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize, if (send_in) { error = sctp_send_str_reset_req(stcb, strrst->srs_number_streams, strrst->srs_stream_list, - send_in, 0, 0, 0, 0, 0); + (uint8_t) send_in, 0, 0, 0, 0, 0); } else { error = sctp_send_stream_reset_out_if_possible(stcb, SCTP_SO_LOCKED); } @@ -7795,7 +7797,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize, if ((*value == SCTP_EDMID_NONE) || (*value == SCTP_EDMID_LOWER_LAYER_DTLS)) { SCTP_INP_WLOCK(inp); - inp->rcv_edmid = *value; + inp->rcv_edmid = (uint8_t) *value; SCTP_INP_WUNLOCK(inp); } else { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); diff --git a/usrsctplib/netinet/sctputil.c b/usrsctplib/netinet/sctputil.c index af062001d..a5b01ebaa 100755 --- a/usrsctplib/netinet/sctputil.c +++ b/usrsctplib/netinet/sctputil.c @@ -1010,65 +1010,35 @@ sctp_get_next_mtu(uint32_t val) void sctp_fill_random_store(struct sctp_pcb *m) { - /* - * Here we use the MD5/SHA-1 to hash with our good randomNumbers and - * our counter. The result becomes our good random numbers and we - * then setup to give these out. Note that we do no locking to - * protect this. This is ok, since if competing folks call this we - * will get more gobbled gook in the random store which is what we - * want. There is a danger that two guys will use the same random - * numbers, but thats ok too since that is random as well :-> - */ - m->store_at = 0; -#if defined(__Userspace__) && defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION) - for (int i = 0; i < (int) (sizeof(m->random_store) / sizeof(m->random_store[0])); i++) { - m->random_store[i] = (uint8_t) rand(); - } -#else - (void)sctp_hmac(SCTP_HMAC, (uint8_t *)m->random_numbers, - sizeof(m->random_numbers), (uint8_t *)&m->random_counter, - sizeof(m->random_counter), (uint8_t *)m->random_store); -#endif - m->random_counter++; + read_random (m->random_store, sizeof(m->random_store)); } uint32_t -sctp_select_initial_TSN(struct sctp_pcb *inp) +sctp_select_initial_TSN(struct sctp_pcb *m) { - /* - * A true implementation should use random selection process to get - * the initial stream sequence number, using RFC1750 as a good - * guideline - */ - uint32_t x, *xp; - uint8_t *p; - int store_at, new_store; + uint32_t random_store_index; - if (inp->initial_sequence_debug != 0) { - uint32_t ret; - - ret = inp->initial_sequence_debug; - inp->initial_sequence_debug++; +#ifdef SCTP_DEBUG + if (m->initial_sequence_debug != 0) { + uint32_t ret = m->initial_sequence_debug; + m->initial_sequence_debug++; return (ret); } - retry: - store_at = inp->store_at; - new_store = store_at + sizeof(uint32_t); - if (new_store >= (SCTP_SIGNATURE_SIZE-3)) { - new_store = 0; - } - if (!atomic_cmpset_int(&inp->store_at, store_at, new_store)) { - goto retry; - } - if (new_store == 0) { - /* Refill the random store */ - sctp_fill_random_store(inp); - } - p = &inp->random_store[store_at]; - xp = (uint32_t *)p; - x = *xp; - return (x); -} +#endif + + SCTP_EP_RANDOM_STORE_LOCK(m); + { + random_store_index = ((++m->random_store_index) + & ((sizeof (m->random_store) / sizeof (uint32_t)) - 1)); + + if (random_store_index == 0) { + sctp_fill_random_store(m); + } + } + SCTP_EP_RANDOM_STORE_UNLOCK(m); + + return (m->random_store[random_store_index]); + } uint32_t sctp_select_a_tag(struct sctp_inpcb *inp, uint16_t lport, uint16_t rport, int check) @@ -1164,7 +1134,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, asoc->fr_max_burst = inp->sctp_ep.fr_max_burst; asoc->heart_beat_delay = sctp_ticks_to_msecs(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_HEARTBEAT]); asoc->cookie_life = inp->sctp_ep.def_cookie_life; - asoc->sctp_cmt_on_off = inp->sctp_cmt_on_off; + asoc->sctp_cmt_on_off = (uint8_t) inp->sctp_cmt_on_off; asoc->ecn_supported = inp->ecn_supported; asoc->prsctp_supported = inp->prsctp_supported; asoc->auth_supported = inp->auth_supported; @@ -1317,8 +1287,8 @@ sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, * Now the stream parameters, here we allocate space for all streams * that we request by default. */ - asoc->strm_realoutsize = asoc->streamoutcnt = asoc->pre_open_streams = - o_strms; + asoc->strm_realoutsize = asoc->streamoutcnt = + (uint16_t) (asoc->pre_open_streams = o_strms); SCTP_MALLOC(asoc->strmout, struct sctp_stream_out *, asoc->streamoutcnt * sizeof(struct sctp_stream_out), SCTP_M_STRMO); @@ -1351,7 +1321,7 @@ sctp_init_asoc(struct sctp_inpcb *inp, struct sctp_tcb *stcb, #endif asoc->strmout[i].next_mid_ordered = 0; asoc->strmout[i].next_mid_unordered = 0; - asoc->strmout[i].sid = i; + asoc->strmout[i].sid = (uint16_t) i; asoc->strmout[i].last_msg_incomplete = 0; asoc->strmout[i].state = SCTP_STREAM_OPENING; } @@ -1480,7 +1450,7 @@ sctp_expand_mapping_array(struct sctp_association *asoc, uint32_t needed) SCTP_FREE(asoc->nr_mapping_array, SCTP_M_MAP); asoc->mapping_array = new_array1; asoc->nr_mapping_array = new_array2; - asoc->mapping_array_size = new_size; + asoc->mapping_array_size = (uint16_t) new_size; return (0); } @@ -2081,7 +2051,8 @@ sctp_timeout_handler(void *t) ("timeout of type %d: inp = %p, stcb = %p, net = %p", type, inp, stcb, net)); SCTP_STAT_INCR(sctps_timoshutdownguard); - op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), + op_err = sctp_generate_cause ( + (uint16_t) SCTP_BASE_SYSCTL (sctp_diag_info_code), "Shutdown guard timer expired"); sctp_abort_an_association(inp, stcb, op_err, true, SCTP_SO_NOT_LOCKED); /* no need to unlock on tcb its gone */ @@ -3604,7 +3575,7 @@ sctp_notify_send_failed(struct sctp_tcb *stcb, uint8_t sent, uint32_t error, m_adj(chk->data, chkhdr_len); m_adj(chk->data, -padding_len); sctp_mbuf_crush(chk->data); - chk->send_size -= (chkhdr_len + padding_len); + chk->send_size -= (uint16_t) (chkhdr_len + padding_len); } } SCTP_BUF_NEXT(m_notify) = chk->data; @@ -4028,7 +3999,7 @@ sctp_notify_stream_reset_add(struct sctp_tcb *stcb, int flag, int so_locked) stradd = mtod(m_notify, struct sctp_stream_change_event *); memset(stradd, 0, sizeof(struct sctp_stream_change_event)); stradd->strchange_type = SCTP_STREAM_CHANGE_EVENT; - stradd->strchange_flags = flag; + stradd->strchange_flags = (uint16_t) flag; stradd->strchange_length = sizeof(struct sctp_stream_change_event); stradd->strchange_assoc_id = sctp_get_associd(stcb); stradd->strchange_instrms = stcb->asoc.streamincnt; @@ -4082,7 +4053,7 @@ sctp_notify_stream_reset_tsn(struct sctp_tcb *stcb, int flag, int so_locked) strasoc = mtod(m_notify, struct sctp_assoc_reset_event *); memset(strasoc, 0, sizeof(struct sctp_assoc_reset_event)); strasoc->assocreset_type = SCTP_ASSOC_RESET_EVENT; - strasoc->assocreset_flags = flag; + strasoc->assocreset_flags = (uint16_t) flag; strasoc->assocreset_length = sizeof(struct sctp_assoc_reset_event); strasoc->assocreset_assoc_id= sctp_get_associd(stcb); strasoc->assocreset_local_tsn = stcb->asoc.sending_seq; @@ -4144,7 +4115,7 @@ sctp_notify_stream_reset(struct sctp_tcb *stcb, strreset = mtod(m_notify, struct sctp_stream_reset_event *); memset(strreset, 0, len); strreset->strreset_type = SCTP_STREAM_RESET_EVENT; - strreset->strreset_flags = flag; + strreset->strreset_flags = (uint16_t) flag; strreset->strreset_length = len; strreset->strreset_assoc_id = sctp_get_associd(stcb); if (number_entries) { @@ -4293,7 +4264,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, switch (notification) { case SCTP_NOTIFY_ASSOC_UP: if (stcb->asoc.assoc_up_sent == 0) { - sctp_notify_assoc_change(SCTP_COMM_UP, stcb, error, NULL, false, false, so_locked); + sctp_notify_assoc_change(SCTP_COMM_UP, stcb, (uint16_t) error, NULL, false, false, so_locked); stcb->asoc.assoc_up_sent = 1; } if (stcb->asoc.adaptation_needed && (stcb->asoc.adaptation_sent == 0)) { @@ -4304,7 +4275,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, } break; case SCTP_NOTIFY_ASSOC_DOWN: - sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, error, NULL, false, false, so_locked); + sctp_notify_assoc_change(SCTP_SHUTDOWN_COMP, stcb, (uint16_t) error, NULL, false, false, so_locked); #if defined(__Userspace__) if (inp->recv_callback) { if (stcb->sctp_socket) { @@ -4357,29 +4328,29 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, case SCTP_NOTIFY_ASSOC_LOC_ABORTED: if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { - sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, false, false, so_locked); + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, (uint16_t) error, data, false, false, so_locked); } else { - sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, false, false, so_locked); + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, (uint16_t) error, data, false, false, so_locked); } break; case SCTP_NOTIFY_ASSOC_REM_ABORTED: if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { - sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, true, false, so_locked); + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, (uint16_t) error, data, true, false, so_locked); } else { - sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, true, false, so_locked); + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, (uint16_t) error, data, true, false, so_locked); } break; case SCTP_NOTIFY_ASSOC_TIMEDOUT: if ((SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_WAIT) || (SCTP_GET_STATE(stcb) == SCTP_STATE_COOKIE_ECHOED)) { - sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, error, data, false, true, so_locked); + sctp_notify_assoc_change(SCTP_CANT_STR_ASSOC, stcb, (uint16_t) error, data, false, true, so_locked); } else { - sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, error, data, false, true, so_locked); + sctp_notify_assoc_change(SCTP_COMM_LOST, stcb, (uint16_t) error, data, false, true, so_locked); } break; case SCTP_NOTIFY_ASSOC_RESTART: - sctp_notify_assoc_change(SCTP_RESTART, stcb, error, NULL, false, false, so_locked); + sctp_notify_assoc_change(SCTP_RESTART, stcb, (uint16_t) error, NULL, false, false, so_locked); if (stcb->asoc.auth_supported == 0) { sctp_notify_authentication(stcb, SCTP_AUTH_NO_AUTH, 0, so_locked); } @@ -4443,7 +4414,7 @@ sctp_ulp_notify(uint32_t notification, struct sctp_tcb *stcb, sctp_notify_sender_dry_event(stcb, so_locked); break; case SCTP_NOTIFY_REMOTE_ERROR: - sctp_notify_remote_error(stcb, error, data, so_locked); + sctp_notify_remote_error(stcb, (uint16_t) error, data, so_locked); break; default: SCTPDBG(SCTP_DEBUG_UTIL1, "%s: unknown notification %xh (%u)\n", @@ -4619,7 +4590,7 @@ sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, #endif struct sctp_gen_error_cause* cause; uint32_t vtag; - uint16_t cause_code; + uint16_t cause_code = 0; if (stcb != NULL) { vtag = stcb->asoc.peer_vtag; @@ -4628,8 +4599,6 @@ sctp_abort_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb, /* Read the cause code from the error cause. */ cause = mtod(op_err, struct sctp_gen_error_cause *); cause_code = ntohs(cause->code); - } else { - cause_code = 0; } } else { vtag = 0; @@ -6318,8 +6287,9 @@ sctp_sorecvmsg(struct socket *so, if ((control == NULL) && (SCTP_SBAVAIL(&so->so_rcv) > 0)) { #ifdef INVARIANTS panic("Huh, its non zero and nothing on control?"); -#endif +#else SCTP_SB_CLEAR(so->so_rcv); +#endif } SCTP_INP_READ_UNLOCK(inp); hold_rlock = 0; @@ -6985,12 +6955,13 @@ sctp_sorecvmsg(struct socket *so, /* big trouble.. we have the lock and its corrupt? */ #ifdef INVARIANTS panic ("Impossible data==NULL length !=0"); -#endif +#else out_flags |= MSG_EOR; out_flags |= MSG_TRUNC; control->length = 0; SCTP_INP_READ_UNLOCK(inp); goto done_with_control; +#endif } SCTP_INP_READ_UNLOCK(inp); /* We will fall around to get more data */ diff --git a/usrsctplib/netinet6/sctp6_usrreq.c b/usrsctplib/netinet6/sctp6_usrreq.c index e130b41ac..78ee581ab 100644 --- a/usrsctplib/netinet6/sctp6_usrreq.c +++ b/usrsctplib/netinet6/sctp6_usrreq.c @@ -774,7 +774,7 @@ sctp6_attach(struct socket *so, int proto SCTP_UNUSED, struct proc *p SCTP_UNUSE * socket as well, because the socket may be bound to an IPv6 * wildcard address, which may match an IPv4-mapped IPv6 address. */ - inp->ip_inp.inp.inp_ip_ttl = MODULE_GLOBAL(ip_defttl); + inp->ip_inp.inp.inp_ip_ttl = (u_char) MODULE_GLOBAL(ip_defttl); #endif SCTP_INP_WUNLOCK(inp); return (0); diff --git a/usrsctplib/user_atomic.h b/usrsctplib/user_atomic.h index 6a59587ef..11c242a08 100755 --- a/usrsctplib/user_atomic.h +++ b/usrsctplib/user_atomic.h @@ -51,7 +51,7 @@ #define SCTP_DECREMENT_AND_CHECK_REFCOUNT(addr) (InterlockedExchangeAdd((LPLONG)addr, (-1L)) == 1) #else #include -#define atomic_add_int(addr, val) OSAtomicAdd32Barrier(val, (int32_t *)addr) +#define atomic_add_int(addr, val) OSAtomicAdd32Barrier (val, (int32_t *) addr) #define atomic_fetchadd_int(addr, val) OSAtomicAdd32Barrier(val, (int32_t *)addr) #define atomic_subtract_int(addr, val) OSAtomicAdd32Barrier(-val, (int32_t *)addr) #define atomic_cmpset_int(dst, exp, src) OSAtomicCompareAndSwapIntBarrier(exp, src, (int *)dst) @@ -93,7 +93,7 @@ static inline void atomic_init(void) {} /* empty when we are not using atomic_mt /*Atomically add V to *P.*/ #define atomic_add_int(P, V) (void) __sync_fetch_and_add(P, V) -/*Atomically subtrace V from *P.*/ +/*Atomically subtract V from *P.*/ #define atomic_subtract_int(P, V) (void) __sync_fetch_and_sub(P, V) /* diff --git a/usrsctplib/user_environment.c b/usrsctplib/user_environment.c index ea52f0ada..4d433c9a6 100755 --- a/usrsctplib/user_environment.c +++ b/usrsctplib/user_environment.c @@ -142,37 +142,34 @@ finish_random(void) return; } #elif defined(_WIN32) -#include +#if (_WIN32_WINNT >= 0x0600) +#include +#pragma comment(lib, "bcrypt.lib") +#else +#include +#endif -void -init_random(void) +void init_random (void) { - return; + return; } -void -read_random(void *buf, size_t size) +void read_random (void *buf, size_t size) { - unsigned int randval; - size_t position, remaining; - - position = 0; - while (position < size) { - if (rand_s(&randval) == 0) { - remaining = MIN(size - position, sizeof(unsigned int)); - memcpy((char *)buf + position, &randval, remaining); - position += sizeof(unsigned int); - } - } - return; +#if (_WIN32_WINNT >= 0x0600) + (void) BCryptGenRandom (NULL, buf, (ULONG) size, + BCRYPT_USE_SYSTEM_PREFERRED_RNG); +#else + (void) RtlGenRandom (buf, (ULONG) size); +#endif } -void -finish_random(void) +void finish_random (void) { - return; + return; } -#elif (defined(__ANDROID__) && (__ANDROID_API__ < 28)) || defined(__QNX__) || defined(__EMSCRIPTEN__) +#elif (defined(__ANDROID__) && (__ANDROID_API__ < 28)) || defined(__QNX__) + || defined(__EMSCRIPTEN__) #include static int fd = -1; diff --git a/usrsctplib/user_malloc.h b/usrsctplib/user_malloc.h index c588e094a..212bcc061 100755 --- a/usrsctplib/user_malloc.h +++ b/usrsctplib/user_malloc.h @@ -192,12 +192,12 @@ Start copy: Copied code for __Userspace__ */ /* changed definitions of MALLOC and FREE */ /* Using memset if flag M_ZERO is specified. Todo: M_WAITOK and M_NOWAIT */ -#define MALLOC(space, cast, size, type, flags) \ - ((space) = (cast)malloc((u_long)(size))); \ - do { \ - if (flags & M_ZERO) { \ - memset(space,0,size); \ - } \ - } while (0); +#define MALLOC(space, cast, size, type, flags) \ + ((space) = (cast) malloc ((u_long) (size))); \ + do { \ + if ((flags & M_ZERO) != 0) { \ + memset (space, 0, size); \ + } \ + } while (0, 0) #endif /* !_SYS_MALLOC_H_ */ diff --git a/usrsctplib/user_mbuf.c b/usrsctplib/user_mbuf.c index 85badc0fa..f872c5fb1 100755 --- a/usrsctplib/user_mbuf.c +++ b/usrsctplib/user_mbuf.c @@ -473,8 +473,8 @@ static __inline void m_tag_setup(struct m_tag *t, uint32_t cookie, int type, int len) { - t->m_tag_id = type; - t->m_tag_len = len; + t->m_tag_id = (uint16_t) type; + t->m_tag_len = (uint16_t) len; t->m_tag_cookie = cookie; } diff --git a/usrsctplib/user_recv_thread.c b/usrsctplib/user_recv_thread.c index 66be13d74..48d0eb857 100755 --- a/usrsctplib/user_recv_thread.c +++ b/usrsctplib/user_recv_thread.c @@ -437,8 +437,8 @@ recv_function_raw(void *arg) (struct sockaddr *)&src, (struct sockaddr *)&dst, sh, ch, - compute_crc, - ecn, + (uint8_t) compute_crc, + (uint8_t) ecn, SCTP_DEFAULT_VRFID, port); if (recvmbuf[0]) { m_freem(recvmbuf[0]); @@ -474,7 +474,7 @@ recv_function_raw6(void *arg) GUID WSARecvMsg_GUID = WSAID_WSARECVMSG; LPFN_WSARECVMSG WSARecvMsg; WSACMSGHDR *cmsgptr; - WSAMSG msg; + WSAMSG msg = { 0 }; char ControlBuffer[1024]; #endif struct sockaddr_in6 src, dst; @@ -632,7 +632,7 @@ recv_function_raw6(void *arg) (struct sockaddr *)&src, (struct sockaddr *)&dst, sh, ch, - compute_crc, + (uint8_t) compute_crc, 0, SCTP_DEFAULT_VRFID, 0); if (recvmbuf6[0]) { @@ -848,7 +848,7 @@ recv_function_udp(void *arg) (struct sockaddr *)&src, (struct sockaddr *)&dst, sh, ch, - compute_crc, + (uint8_t) compute_crc, 0, SCTP_DEFAULT_VRFID, port); if (udprecvmbuf[0]) { @@ -1046,7 +1046,7 @@ recv_function_udp6(void *arg) (struct sockaddr *)&src, (struct sockaddr *)&dst, sh, ch, - compute_crc, + (uint8_t) compute_crc, 0, SCTP_DEFAULT_VRFID, port); if (udprecvmbuf6[0]) { @@ -1183,7 +1183,7 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't set IP_HDRINCL (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_rawsctp)); #endif - SCTP_BASE_VAR(userspace_rawsctp) = -1; + SCTP_BASE_VAR(userspace_rawsctp) = (SOCKET) -1; } else if (setsockopt(SCTP_BASE_VAR(userspace_rawsctp), SOL_SOCKET, SO_RCVTIMEO, (const void *)&timeout, sizeof(timeout)) < 0) { #if defined(_WIN32) SCTPDBG(SCTP_DEBUG_USR, "Can't set timeout on socket for SCTP/IPv4 (errno = %d).\n", WSAGetLastError()); @@ -1192,7 +1192,7 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't set timeout on socket for SCTP/IPv4 (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_rawsctp)); #endif - SCTP_BASE_VAR(userspace_rawsctp) = -1; + SCTP_BASE_VAR(userspace_rawsctp) = (SOCKET) -1; } else { memset((void *)&addr_ipv4, 0, sizeof(struct sockaddr_in)); #ifdef HAVE_SIN_LEN @@ -1209,7 +1209,7 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't bind socket for SCTP/IPv4 (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_rawsctp)); #endif - SCTP_BASE_VAR(userspace_rawsctp) = -1; + SCTP_BASE_VAR(userspace_rawsctp) = (SOCKET) -1; } else { setReceiveBufferSize(SCTP_BASE_VAR(userspace_rawsctp), SB_RAW); /* 128K */ setSendBufferSize(SCTP_BASE_VAR(userspace_rawsctp), SB_RAW); /* 128K Is this setting net.inet.raw.maxdgram value? Should it be set to 64K? */ @@ -1245,7 +1245,7 @@ recv_thread_init(void) #endif close(SCTP_BASE_VAR(userspace_udpsctp)); #endif - SCTP_BASE_VAR(userspace_udpsctp) = -1; + SCTP_BASE_VAR(userspace_udpsctp) = (SOCKET) -1; } else if (setsockopt(SCTP_BASE_VAR(userspace_udpsctp), SOL_SOCKET, SO_RCVTIMEO, (const void *)&timeout, sizeof(timeout)) < 0) { #if defined(_WIN32) SCTPDBG(SCTP_DEBUG_USR, "Can't set timeout on socket for SCTP/UDP/IPv4 (errno = %d).\n", WSAGetLastError()); @@ -1254,14 +1254,14 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't set timeout on socket for SCTP/UDP/IPv4 (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_udpsctp)); #endif - SCTP_BASE_VAR(userspace_udpsctp) = -1; + SCTP_BASE_VAR(userspace_udpsctp) = (SOCKET) -1; } else { memset((void *)&addr_ipv4, 0, sizeof(struct sockaddr_in)); #ifdef HAVE_SIN_LEN addr_ipv4.sin_len = sizeof(struct sockaddr_in); #endif addr_ipv4.sin_family = AF_INET; - addr_ipv4.sin_port = htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); + addr_ipv4.sin_port = htons((u_short) SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); addr_ipv4.sin_addr.s_addr = htonl(INADDR_ANY); if (bind(SCTP_BASE_VAR(userspace_udpsctp), (const struct sockaddr *)&addr_ipv4, sizeof(struct sockaddr_in)) < 0) { #if defined(_WIN32) @@ -1271,7 +1271,7 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't bind socket for SCTP/UDP/IPv4 (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_udpsctp)); #endif - SCTP_BASE_VAR(userspace_udpsctp) = -1; + SCTP_BASE_VAR(userspace_udpsctp) = (SOCKET) -1; } else { setReceiveBufferSize(SCTP_BASE_VAR(userspace_udpsctp), SB_RAW); /* 128K */ setSendBufferSize(SCTP_BASE_VAR(userspace_udpsctp), SB_RAW); /* 128K Is this setting net.inet.raw.maxdgram value? Should it be set to 64K? */ @@ -1310,7 +1310,7 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't set IPV6_PKTINFO on socket for SCTP/IPv6 (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_rawsctp6)); #endif - SCTP_BASE_VAR(userspace_rawsctp6) = -1; + SCTP_BASE_VAR(userspace_rawsctp6) = (SOCKET) -1; } else { #endif if (setsockopt(SCTP_BASE_VAR(userspace_rawsctp6), IPPROTO_IPV6, IPV6_V6ONLY, (const void*)&on, (socklen_t)sizeof(on)) < 0) { @@ -1328,7 +1328,7 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't set timeout on socket for SCTP/IPv6 (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_rawsctp6)); #endif - SCTP_BASE_VAR(userspace_rawsctp6) = -1; + SCTP_BASE_VAR(userspace_rawsctp6) = (SOCKET) -1; } else { memset((void *)&addr_ipv6, 0, sizeof(struct sockaddr_in6)); #ifdef HAVE_SIN6_LEN @@ -1345,7 +1345,7 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't bind socket for SCTP/IPv6 (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_rawsctp6)); #endif - SCTP_BASE_VAR(userspace_rawsctp6) = -1; + SCTP_BASE_VAR(userspace_rawsctp6) = (SOCKET) -1; } else { setReceiveBufferSize(SCTP_BASE_VAR(userspace_rawsctp6), SB_RAW); /* 128K */ setSendBufferSize(SCTP_BASE_VAR(userspace_rawsctp6), SB_RAW); /* 128K Is this setting net.inet.raw.maxdgram value? Should it be set to 64K? */ @@ -1382,7 +1382,7 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't set IPV6_PKTINFO on socket for SCTP/UDP/IPv6 (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_udpsctp6)); #endif - SCTP_BASE_VAR(userspace_udpsctp6) = -1; + SCTP_BASE_VAR(userspace_udpsctp6) = (SOCKET) -1; } else { #endif if (setsockopt(SCTP_BASE_VAR(userspace_udpsctp6), IPPROTO_IPV6, IPV6_V6ONLY, (const void *)&on, (socklen_t)sizeof(on)) < 0) { @@ -1400,14 +1400,14 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't set timeout on socket for SCTP/UDP/IPv6 (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_udpsctp6)); #endif - SCTP_BASE_VAR(userspace_udpsctp6) = -1; + SCTP_BASE_VAR(userspace_udpsctp6) = (SOCKET) -1; } else { memset((void *)&addr_ipv6, 0, sizeof(struct sockaddr_in6)); #ifdef HAVE_SIN6_LEN addr_ipv6.sin6_len = sizeof(struct sockaddr_in6); #endif addr_ipv6.sin6_family = AF_INET6; - addr_ipv6.sin6_port = htons(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); + addr_ipv6.sin6_port = htons((u_short) SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)); addr_ipv6.sin6_addr = in6addr_any; if (bind(SCTP_BASE_VAR(userspace_udpsctp6), (const struct sockaddr *)&addr_ipv6, sizeof(struct sockaddr_in6)) < 0) { #if defined(_WIN32) @@ -1417,7 +1417,7 @@ recv_thread_init(void) SCTPDBG(SCTP_DEBUG_USR, "Can't bind socket for SCTP/UDP/IPv6 (errno = %d).\n", errno); close(SCTP_BASE_VAR(userspace_udpsctp6)); #endif - SCTP_BASE_VAR(userspace_udpsctp6) = -1; + SCTP_BASE_VAR(userspace_udpsctp6) = (SOCKET) -1; } else { setReceiveBufferSize(SCTP_BASE_VAR(userspace_udpsctp6), SB_RAW); /* 128K */ setSendBufferSize(SCTP_BASE_VAR(userspace_udpsctp6), SB_RAW); /* 128K Is this setting net.inet.raw.maxdgram value? Should it be set to 64K? */ @@ -1450,7 +1450,7 @@ recv_thread_init(void) #else close(SCTP_BASE_VAR(userspace_rawsctp)); #endif - SCTP_BASE_VAR(userspace_rawsctp) = -1; + SCTP_BASE_VAR(userspace_rawsctp) = (SOCKET) -1; } } if (SCTP_BASE_VAR(userspace_udpsctp) != -1) { @@ -1463,7 +1463,7 @@ recv_thread_init(void) #else close(SCTP_BASE_VAR(userspace_udpsctp)); #endif - SCTP_BASE_VAR(userspace_udpsctp) = -1; + SCTP_BASE_VAR(userspace_udpsctp) = (SOCKET) -1; } } #endif @@ -1478,7 +1478,7 @@ recv_thread_init(void) #else close(SCTP_BASE_VAR(userspace_rawsctp6)); #endif - SCTP_BASE_VAR(userspace_rawsctp6) = -1; + SCTP_BASE_VAR(userspace_rawsctp6) = (SOCKET) -1; } } if (SCTP_BASE_VAR(userspace_udpsctp6) != -1) { @@ -1491,7 +1491,7 @@ recv_thread_init(void) #else close(SCTP_BASE_VAR(userspace_udpsctp6)); #endif - SCTP_BASE_VAR(userspace_udpsctp6) = -1; + SCTP_BASE_VAR(userspace_udpsctp6) = (SOCKET) -1; } } #endif @@ -1512,7 +1512,7 @@ recv_thread_destroy(void) if (SCTP_BASE_VAR(userspace_rawsctp) != -1) { #if defined(_WIN32) closesocket(SCTP_BASE_VAR(userspace_rawsctp)); - SCTP_BASE_VAR(userspace_rawsctp) = -1; + SCTP_BASE_VAR(userspace_rawsctp) = (SOCKET) -1; WaitForSingleObject(SCTP_BASE_VAR(recvthreadraw), INFINITE); CloseHandle(SCTP_BASE_VAR(recvthreadraw)); #else @@ -1524,7 +1524,7 @@ recv_thread_destroy(void) if (SCTP_BASE_VAR(userspace_udpsctp) != -1) { #if defined(_WIN32) closesocket(SCTP_BASE_VAR(userspace_udpsctp)); - SCTP_BASE_VAR(userspace_udpsctp) = -1; + SCTP_BASE_VAR(userspace_udpsctp) = (SOCKET) -1; WaitForSingleObject(SCTP_BASE_VAR(recvthreadudp), INFINITE); CloseHandle(SCTP_BASE_VAR(recvthreadudp)); #else @@ -1538,7 +1538,7 @@ recv_thread_destroy(void) if (SCTP_BASE_VAR(userspace_rawsctp6) != -1) { #if defined(_WIN32) closesocket(SCTP_BASE_VAR(userspace_rawsctp6)); - SCTP_BASE_VAR(userspace_rawsctp6) = -1; + SCTP_BASE_VAR(userspace_rawsctp6) = (SOCKET) -1; WaitForSingleObject(SCTP_BASE_VAR(recvthreadraw6), INFINITE); CloseHandle(SCTP_BASE_VAR(recvthreadraw6)); #else @@ -1549,7 +1549,7 @@ recv_thread_destroy(void) } if (SCTP_BASE_VAR(userspace_udpsctp6) != -1) { #if defined(_WIN32) - SCTP_BASE_VAR(userspace_udpsctp6) = -1; + SCTP_BASE_VAR(userspace_udpsctp6) = (SOCKET) -1; closesocket(SCTP_BASE_VAR(userspace_udpsctp6)); WaitForSingleObject(SCTP_BASE_VAR(recvthreadudp6), INFINITE); CloseHandle(SCTP_BASE_VAR(recvthreadudp6)); diff --git a/usrsctplib/user_socket.c b/usrsctplib/user_socket.c index cde6ecc41..f410cb313 100755 --- a/usrsctplib/user_socket.c +++ b/usrsctplib/user_socket.c @@ -61,6 +61,7 @@ userland_mutex_t accept_mtx; userland_cond_t accept_cond; #ifdef _WIN32 +HCRYPTPROV crypto_provider = 0; #include #include #endif @@ -90,6 +91,10 @@ static void init_sync(void) { #endif InitializeConditionVariable(&accept_cond); InitializeCriticalSection(&accept_mtx); + if (!CryptAcquireContext (&crypto_provider, NULL, NULL, PROV_RSA_FULL, 0)) { + SCTP_PRINTF ("CryptAcquireContext failed\n"); + exit (-1); + } #else pthread_mutexattr_t mutex_attr; @@ -738,7 +743,7 @@ userspace_sctp_sendmsg(struct socket *so, memset(sinfo, 0, sizeof(struct sctp_sndrcvinfo)); sinfo->sinfo_ppid = ppid; - sinfo->sinfo_flags = flags; + sinfo->sinfo_flags = (uint16_t) flags; sinfo->sinfo_stream = stream_no; sinfo->sinfo_timetolive = timetolive; sinfo->sinfo_context = context; @@ -925,7 +930,7 @@ userspace_sctp_sendmbuf(struct socket *so, ssize_t retval; sinfo->sinfo_ppid = ppid; - sinfo->sinfo_flags = flags; + sinfo->sinfo_flags = (uint16_t) flags; sinfo->sinfo_stream = stream_no; sinfo->sinfo_timetolive = timetolive; sinfo->sinfo_context = context; @@ -1247,7 +1252,7 @@ socreate(int dom, struct socket **aso, int type, int proto) */ TAILQ_INIT(&so->so_incomp); TAILQ_INIT(&so->so_comp); - so->so_type = type; + so->so_type = (short) type; so->so_count = 1; so->so_dom = dom; /* @@ -1521,7 +1526,7 @@ solisten_proto(struct socket *so, int backlog) if (backlog < 0 || backlog > somaxconn) backlog = somaxconn; - so->so_qlimit = backlog; + so->so_qlimit = (u_short) backlog; so->so_options |= SCTP_SO_ACCEPTCONN; } @@ -2060,7 +2065,11 @@ usrsctp_finish(void) } sctp_finish(); #if defined(_WIN32) - DeleteConditionVariable(&accept_cond); + if (crypto_provider) { + CryptReleaseContext (crypto_provider, 0); + crypto_provider = 0; + } + DeleteConditionVariable (&accept_cond); DeleteCriticalSection(&accept_mtx); #if defined(INET) || defined(INET6) WSACleanup(); @@ -2689,6 +2698,7 @@ usrsctp_getpaddrs(struct socket *so, sctp_assoc_t id, struct sockaddr **raddrs) errno = EFAULT; return (-1); } + *raddrs = NULL; /* When calling getsockopt(), the value contains the assoc_id. */ size_of_addresses = (uint32_t)id; opt_len = (socklen_t)sizeof(uint32_t); @@ -2747,10 +2757,15 @@ usrsctp_getpaddrs(struct socket *so, sctp_assoc_t id, struct sockaddr **raddrs) void usrsctp_freepaddrs(struct sockaddr *addrs) { + if (addrs == NULL) { + return; + } + /* Take away the hidden association id */ void *fr_addr; fr_addr = (void *)((caddr_t)addrs - offsetof(struct sctp_getaddresses, addr)); + /* Now free it */ free(fr_addr); } @@ -2769,6 +2784,7 @@ usrsctp_getladdrs(struct socket *so, sctp_assoc_t id, struct sockaddr **raddrs) errno = EFAULT; return (-1); } + *raddrs = NULL; size_of_addresses = 0; opt_len = (socklen_t)sizeof(uint32_t); if (usrsctp_getsockopt(so, IPPROTO_SCTP, SCTP_GET_LOCAL_ADDR_SIZE, &size_of_addresses, &opt_len) != 0) { @@ -2826,10 +2842,15 @@ usrsctp_getladdrs(struct socket *so, sctp_assoc_t id, struct sockaddr **raddrs) void usrsctp_freeladdrs(struct sockaddr *addrs) { + if (addrs == NULL) { + return; + } + /* Take away the hidden association id */ void *fr_addr; fr_addr = (void *)((caddr_t)addrs - offsetof(struct sctp_getaddresses, addr)); + /* Now free it */ free(fr_addr); }