mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[MSAFD]
- Add support for SO_PROTOCOL_INFOW. Patch by Peter Hater. CORE-10440 svn path=/trunk/; revision=69828
This commit is contained in:
parent
73b829f989
commit
b739050085
2 changed files with 8 additions and 13 deletions
|
@ -19,7 +19,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msafd);
|
||||||
|
|
||||||
HANDLE GlobalHeap;
|
HANDLE GlobalHeap;
|
||||||
WSPUPCALLTABLE Upcalls;
|
WSPUPCALLTABLE Upcalls;
|
||||||
DWORD CatalogEntryId; /* CatalogEntryId for upcalls */
|
|
||||||
LPWPUCOMPLETEOVERLAPPEDREQUEST lpWPUCompleteOverlappedRequest;
|
LPWPUCOMPLETEOVERLAPPEDREQUEST lpWPUCompleteOverlappedRequest;
|
||||||
PSOCKET_INFORMATION SocketListHead = NULL;
|
PSOCKET_INFORMATION SocketListHead = NULL;
|
||||||
CRITICAL_SECTION SocketListLock;
|
CRITICAL_SECTION SocketListLock;
|
||||||
|
@ -116,7 +115,6 @@ WSPSocket(int AddressFamily,
|
||||||
Socket->SharedData.SizeOfRemoteAddress = HelperData->MaxWSAddressLength;
|
Socket->SharedData.SizeOfRemoteAddress = HelperData->MaxWSAddressLength;
|
||||||
Socket->SharedData.UseDelayedAcceptance = HelperData->UseDelayedAcceptance;
|
Socket->SharedData.UseDelayedAcceptance = HelperData->UseDelayedAcceptance;
|
||||||
Socket->SharedData.CreateFlags = dwFlags;
|
Socket->SharedData.CreateFlags = dwFlags;
|
||||||
Socket->SharedData.CatalogEntryId = lpProtocolInfo->dwCatalogEntryId;
|
|
||||||
Socket->SharedData.ServiceFlags1 = lpProtocolInfo->dwServiceFlags1;
|
Socket->SharedData.ServiceFlags1 = lpProtocolInfo->dwServiceFlags1;
|
||||||
Socket->SharedData.ProviderFlags = lpProtocolInfo->dwProviderFlags;
|
Socket->SharedData.ProviderFlags = lpProtocolInfo->dwProviderFlags;
|
||||||
Socket->SharedData.GroupID = g;
|
Socket->SharedData.GroupID = g;
|
||||||
|
@ -124,6 +122,7 @@ WSPSocket(int AddressFamily,
|
||||||
Socket->SharedData.UseSAN = FALSE;
|
Socket->SharedData.UseSAN = FALSE;
|
||||||
Socket->SharedData.NonBlocking = FALSE; /* Sockets start blocking */
|
Socket->SharedData.NonBlocking = FALSE; /* Sockets start blocking */
|
||||||
Socket->SanData = NULL;
|
Socket->SanData = NULL;
|
||||||
|
RtlCopyMemory(&Socket->ProtocolInfo, lpProtocolInfo, sizeof(Socket->ProtocolInfo));
|
||||||
|
|
||||||
/* Ask alex about this */
|
/* Ask alex about this */
|
||||||
if( Socket->SharedData.SocketType == SOCK_DGRAM ||
|
if( Socket->SharedData.SocketType == SOCK_DGRAM ||
|
||||||
|
@ -290,7 +289,7 @@ WSPSocket(int AddressFamily,
|
||||||
CreateContext(Socket);
|
CreateContext(Socket);
|
||||||
|
|
||||||
/* Notify Winsock */
|
/* Notify Winsock */
|
||||||
Upcalls.lpWPUModifyIFSHandle(CatalogEntryId, (SOCKET)Sock, lpErrno);
|
Upcalls.lpWPUModifyIFSHandle(Socket->ProtocolInfo.dwCatalogEntryId, (SOCKET)Sock, lpErrno);
|
||||||
|
|
||||||
/* Return Socket Handle */
|
/* Return Socket Handle */
|
||||||
TRACE("Success %x\n", Sock);
|
TRACE("Success %x\n", Sock);
|
||||||
|
@ -1058,7 +1057,6 @@ WSPAccept(SOCKET Handle,
|
||||||
PSOCKADDR RemoteAddress = NULL;
|
PSOCKADDR RemoteAddress = NULL;
|
||||||
GROUP GroupID = 0;
|
GROUP GroupID = 0;
|
||||||
ULONG CallBack;
|
ULONG CallBack;
|
||||||
WSAPROTOCOL_INFOW ProtocolInfo;
|
|
||||||
SOCKET AcceptSocket;
|
SOCKET AcceptSocket;
|
||||||
PSOCKET_INFORMATION AcceptSocketInfo;
|
PSOCKET_INFORMATION AcceptSocketInfo;
|
||||||
UCHAR ReceiveBuffer[0x1A];
|
UCHAR ReceiveBuffer[0x1A];
|
||||||
|
@ -1332,14 +1330,10 @@ WSPAccept(SOCKET Handle,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create a new Socket */
|
/* Create a new Socket */
|
||||||
ProtocolInfo.dwCatalogEntryId = Socket->SharedData.CatalogEntryId;
|
|
||||||
ProtocolInfo.dwServiceFlags1 = Socket->SharedData.ServiceFlags1;
|
|
||||||
ProtocolInfo.dwProviderFlags = Socket->SharedData.ProviderFlags;
|
|
||||||
|
|
||||||
AcceptSocket = WSPSocket (Socket->SharedData.AddressFamily,
|
AcceptSocket = WSPSocket (Socket->SharedData.AddressFamily,
|
||||||
Socket->SharedData.SocketType,
|
Socket->SharedData.SocketType,
|
||||||
Socket->SharedData.Protocol,
|
Socket->SharedData.Protocol,
|
||||||
&ProtocolInfo,
|
&Socket->ProtocolInfo,
|
||||||
GroupID,
|
GroupID,
|
||||||
Socket->SharedData.CreateFlags,
|
Socket->SharedData.CreateFlags,
|
||||||
lpErrno);
|
lpErrno);
|
||||||
|
@ -2182,11 +2176,14 @@ WSPGetSockOpt(IN SOCKET Handle,
|
||||||
Buffer = &Socket->SharedData.RecvTimeout;
|
Buffer = &Socket->SharedData.RecvTimeout;
|
||||||
BufferSize = sizeof(DWORD);
|
BufferSize = sizeof(DWORD);
|
||||||
break;
|
break;
|
||||||
|
case SO_PROTOCOL_INFOW:
|
||||||
|
Buffer = &Socket->ProtocolInfo;
|
||||||
|
BufferSize = sizeof(Socket->ProtocolInfo);
|
||||||
|
break;
|
||||||
|
|
||||||
case SO_GROUP_ID:
|
case SO_GROUP_ID:
|
||||||
case SO_GROUP_PRIORITY:
|
case SO_GROUP_PRIORITY:
|
||||||
case SO_MAX_MSG_SIZE:
|
case SO_MAX_MSG_SIZE:
|
||||||
case SO_PROTOCOL_INFO:
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
DbgPrint("MSAFD: Get unknown optname %x\n", OptionName);
|
DbgPrint("MSAFD: Get unknown optname %x\n", OptionName);
|
||||||
|
@ -2412,8 +2409,6 @@ WSPStartup(IN WORD wVersionRequested,
|
||||||
lpProcTable->lpWSPStringToAddress = WSPStringToAddress;
|
lpProcTable->lpWSPStringToAddress = WSPStringToAddress;
|
||||||
lpWSPData->wVersion = MAKEWORD(2, 2);
|
lpWSPData->wVersion = MAKEWORD(2, 2);
|
||||||
lpWSPData->wHighVersion = MAKEWORD(2, 2);
|
lpWSPData->wHighVersion = MAKEWORD(2, 2);
|
||||||
/* Save CatalogEntryId for all upcalls */
|
|
||||||
CatalogEntryId = lpProtocolInfo->dwCatalogEntryId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("Status (%d).\n", Status);
|
TRACE("Status (%d).\n", Status);
|
||||||
|
|
|
@ -72,7 +72,6 @@ typedef struct _SOCK_SHARED_INFO {
|
||||||
BOOLEAN UseSAN:1;
|
BOOLEAN UseSAN:1;
|
||||||
}; // Flags
|
}; // Flags
|
||||||
DWORD CreateFlags;
|
DWORD CreateFlags;
|
||||||
DWORD CatalogEntryId;
|
|
||||||
DWORD ServiceFlags1;
|
DWORD ServiceFlags1;
|
||||||
DWORD ProviderFlags;
|
DWORD ProviderFlags;
|
||||||
GROUP GroupID;
|
GROUP GroupID;
|
||||||
|
@ -106,6 +105,7 @@ typedef struct _SOCKET_INFORMATION {
|
||||||
BOOL TrySAN;
|
BOOL TrySAN;
|
||||||
SOCKADDR WSLocalAddress;
|
SOCKADDR WSLocalAddress;
|
||||||
SOCKADDR WSRemoteAddress;
|
SOCKADDR WSRemoteAddress;
|
||||||
|
WSAPROTOCOL_INFOW ProtocolInfo;
|
||||||
struct _SOCKET_INFORMATION *NextSocket;
|
struct _SOCKET_INFORMATION *NextSocket;
|
||||||
} SOCKET_INFORMATION, *PSOCKET_INFORMATION;
|
} SOCKET_INFORMATION, *PSOCKET_INFORMATION;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue