Alexandre Julliard : iphlpapi: Implemented AllocateAndGetUdpTableFromStack for Solaris.
Alexandre Julliard
julliard at winehq.org
Wed Mar 11 10:04:19 CDT 2009
Module: wine
Branch: master
Commit: 8f481bef2e1b6639c2f4e2ffb0ec1ea2c5a3573c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8f481bef2e1b6639c2f4e2ffb0ec1ea2c5a3573c
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Mar 10 17:08:28 2009 +0100
iphlpapi: Implemented AllocateAndGetUdpTableFromStack for Solaris.
---
dlls/iphlpapi/ipstats.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index c92f0e4..846a41b 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -1442,6 +1442,28 @@ DWORD WINAPI AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE *ppUdpTable, BOOL bOr
}
else ret = ERROR_NOT_SUPPORTED;
}
+#elif defined(HAVE_SYS_TIHDR_H) && defined(T_OPTMGMT_ACK)
+ {
+ void *data;
+ int fd, len;
+ mib2_udpEntry_t *entry;
+
+ if ((fd = open_streams_mib( "udp" )) != -1)
+ {
+ if ((data = read_mib_entry( fd, MIB2_UDP, MIB2_UDP_ENTRY, &len )))
+ {
+ for (entry = data; (char *)(entry + 1) <= (char *)data + len; entry++)
+ {
+ row.dwLocalAddr = entry->udpLocalAddress;
+ row.dwLocalPort = htons( entry->udpLocalPort );
+ if (!(table = append_udp_row( heap, flags, table, &count, &row ))) break;
+ }
+ HeapFree( GetProcessHeap(), 0, data );
+ }
+ close( fd );
+ }
+ else ret = ERROR_NOT_SUPPORTED;
+ }
#else
FIXME( "not implemented\n" );
ret = ERROR_NOT_SUPPORTED;
More information about the wine-cvs
mailing list