windows correct srtp

This commit is contained in:
Jeff Lenk 2013-04-04 19:35:57 -05:00
parent f7b89748e8
commit 231effa3b0
2 changed files with 205 additions and 9 deletions

View File

@ -409,16 +409,12 @@ static inline uint32_t be32_to_cpu(uint32_t v) {
# define be32_to_cpu(x) ntohl((x))
# endif /* HAVE_X86 */
static inline uint64_t be64_to_cpu(uint64_t v) {
# ifdef NO_64BIT_MATH
/* use the make64 functions to do 64-bit math */
v = make64(htonl(low32(v)),htonl(high32(v)));
# else
/* use the native 64-bit math */
v= (uint64_t)((be32_to_cpu((uint32_t)(v >> 32))) | (((uint64_t)be32_to_cpu((uint32_t)v)) << 32));
# ifdef NO_64BIT_MATH
/* use the make64 functions to do 64-bit math */
# define be64_to_cpu(v) (make64(htonl(low32(v)),htonl(high32(v))))
# else
# define be64_to_cpu(v) ((ntohl((uint32_t)(v >> 32))) | (((uint64_t)ntohl((uint32_t)v)) << 32))
# endif
return v;
}
#endif /* ! SRTP_KERNEL_LINUX */

View File

@ -0,0 +1,200 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Source Files\Kernel">
<UniqueIdentifier>{7633dd78-47bb-43bb-9ba1-4ab7d89873d1}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Ciphers">
<UniqueIdentifier>{532f3250-40ff-4a34-a071-f7bccfde71e2}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Hashes">
<UniqueIdentifier>{8343a503-59a3-4af7-bed6-6d6439001561}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Replay">
<UniqueIdentifier>{dfda6cc2-cf2f-4b3d-ad48-6bfe332ec0c1}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Math">
<UniqueIdentifier>{67144ed7-fb0e-4c22-96a4-1be71053e80f}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="srtp\srtp.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="crypto\kernel\alloc.c">
<Filter>Source Files\Kernel</Filter>
</ClCompile>
<ClCompile Include="crypto\kernel\crypto_kernel.c">
<Filter>Source Files\Kernel</Filter>
</ClCompile>
<ClCompile Include="crypto\rng\ctr_prng.c">
<Filter>Source Files\Kernel</Filter>
</ClCompile>
<ClCompile Include="crypto\kernel\err.c">
<Filter>Source Files\Kernel</Filter>
</ClCompile>
<ClCompile Include="crypto\kernel\key.c">
<Filter>Source Files\Kernel</Filter>
</ClCompile>
<ClCompile Include="crypto\rng\prng.c">
<Filter>Source Files\Kernel</Filter>
</ClCompile>
<ClCompile Include="crypto\rng\rand_source.c">
<Filter>Source Files\Kernel</Filter>
</ClCompile>
<ClCompile Include="crypto\cipher\aes.c">
<Filter>Source Files\Ciphers</Filter>
</ClCompile>
<ClCompile Include="crypto\cipher\aes_cbc.c">
<Filter>Source Files\Ciphers</Filter>
</ClCompile>
<ClCompile Include="crypto\cipher\aes_icm.c">
<Filter>Source Files\Ciphers</Filter>
</ClCompile>
<ClCompile Include="crypto\cipher\cipher.c">
<Filter>Source Files\Ciphers</Filter>
</ClCompile>
<ClCompile Include="crypto\cipher\null_cipher.c">
<Filter>Source Files\Ciphers</Filter>
</ClCompile>
<ClCompile Include="crypto\hash\auth.c">
<Filter>Source Files\Hashes</Filter>
</ClCompile>
<ClCompile Include="crypto\hash\hmac.c">
<Filter>Source Files\Hashes</Filter>
</ClCompile>
<ClCompile Include="crypto\hash\null_auth.c">
<Filter>Source Files\Hashes</Filter>
</ClCompile>
<ClCompile Include="crypto\hash\sha1.c">
<Filter>Source Files\Hashes</Filter>
</ClCompile>
<ClCompile Include="crypto\replay\rdb.c">
<Filter>Source Files\Replay</Filter>
</ClCompile>
<ClCompile Include="crypto\replay\rdbx.c">
<Filter>Source Files\Replay</Filter>
</ClCompile>
<ClCompile Include="crypto\replay\ut_sim.c">
<Filter>Source Files\Replay</Filter>
</ClCompile>
<ClCompile Include="crypto\math\datatypes.c">
<Filter>Source Files\Math</Filter>
</ClCompile>
<ClCompile Include="crypto\math\stat.c">
<Filter>Source Files\Math</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="crypto\include\aes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\aes_cbc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\aes_icm.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\alloc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\auth.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\cipher.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\crypto.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\crypto_kernel.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\crypto_math.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\crypto_types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\cryptoalg.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\datatypes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\err.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\gf2_8.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\hmac.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\integers.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\kernel_compat.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\key.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\null_auth.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\null_cipher.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\prng.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\rand_source.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\rdb.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\rdbx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\rtp.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\sha1.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\srtp.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\stat.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\ut_sim.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="crypto\include\xfm.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="srtp.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>