Author: cgutman
Date: Sat Sep 26 01:27:44 2009
New Revision: 43153
URL:
http://svn.reactos.org/svn/reactos?rev=43153&view=rev
Log:
- Fix implementation of WSHGetWildcardSockaddr
- Implement WSHGetBroadcastSockaddr
Modified:
trunk/reactos/dll/win32/wshtcpip/wshtcpip.c
Modified: trunk/reactos/dll/win32/wshtcpip/wshtcpip.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wshtcpip/wshtcpi…
==============================================================================
--- trunk/reactos/dll/win32/wshtcpip/wshtcpip.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wshtcpip/wshtcpip.c [iso-8859-1] Sat Sep 26 01:27:44 2009
@@ -75,7 +75,17 @@
OUT PSOCKADDR Sockaddr,
OUT PINT SockaddrLength)
{
- UNIMPLEMENTED
+ DWORD Size = 2 * sizeof(UINT);
+
+ if (*SockaddrLength < Size)
+ return WSAEFAULT;
+
+ RtlZeroMemory(Sockaddr, *SockaddrLength);
+
+ Sockaddr->sa_family = AF_INET;
+ *((PUINT)Sockaddr->sa_data) = INADDR_BROADCAST;
+
+ *SockaddrLength = Size;
return 0;
}
@@ -172,8 +182,18 @@
OUT PSOCKADDR Sockaddr,
OUT PINT SockaddrLength)
{
- RtlZeroMemory((PVOID)Sockaddr, *SockaddrLength);
+ DWORD Size = 2 * sizeof(UINT);
+
+ if (*SockaddrLength < Size)
+ return WSAEFAULT;
+
+ RtlZeroMemory(Sockaddr, *SockaddrLength);
+
Sockaddr->sa_family = AF_INET;
+ *((PUINT)Sockaddr->sa_data) = INADDR_ANY;
+
+ *SockaddrLength = Size;
+
return 0;
}