Author: phater
Date: Mon Oct 10 07:57:34 2016
New Revision: 72952
URL:
http://svn.reactos.org/svn/reactos?rev=72952&view=rev
Log:
[MSAFD] We support SOCK_RAW and IPPROTO_RAW also. CORE-12104
Modified:
trunk/reactos/dll/win32/msafd/misc/dllmain.c
Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Mon Oct 10 07:57:34 2016
@@ -103,15 +103,43 @@
AddressFamily = AF_INET;
if (SocketType == 0)
- SocketType = SOCK_STREAM;
+ {
+ switch (Protocol)
+ {
+ case IPPROTO_TCP:
+ SocketType = SOCK_STREAM;
+ break;
+ case IPPROTO_UDP:
+ SocketType = SOCK_DGRAM;
+ break;
+ case IPPROTO_RAW:
+ SocketType = SOCK_RAW;
+ break;
+ default:
+ TRACE("Unknown Protocol (%d). We will try SOCK_STREAM.\n",
Protocol);
+ SocketType = SOCK_STREAM;
+ break;
+ }
+ }
if (Protocol == 0)
{
- if (SocketType == SOCK_STREAM)
+ switch (SocketType)
+ {
+ case SOCK_STREAM:
Protocol = IPPROTO_TCP;
-
- if (SocketType == SOCK_DGRAM)
+ break;
+ case SOCK_DGRAM:
Protocol = IPPROTO_UDP;
+ break;
+ case SOCK_RAW:
+ Protocol = IPPROTO_RAW;
+ break;
+ default:
+ TRACE("Unknown SocketType (%d). We will try IPPROTO_TCP.\n",
SocketType);
+ Protocol = IPPROTO_TCP;
+ break;
+ }
}
/* Get Helper Data and Transport */