Bruno Jesus : iphlpapi: Add a stub for CreateSortedAddressPairs().

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jan 5 15:01:27 CST 2015


Module: wine
Branch: master
Commit: 6b4dcb3f35c4e406463e5139d105f20468a21e44
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6b4dcb3f35c4e406463e5139d105f20468a21e44

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Sat Jan  3 01:29:10 2015 -0200

iphlpapi: Add a stub for CreateSortedAddressPairs().

---

 dlls/iphlpapi/iphlpapi.spec   |  2 +-
 dlls/iphlpapi/iphlpapi_main.c | 22 ++++++++++++++++++++++
 include/ws2ipdef.h            |  6 ++++++
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/dlls/iphlpapi/iphlpapi.spec b/dlls/iphlpapi/iphlpapi.spec
index c51b58b..fcb6d72 100644
--- a/dlls/iphlpapi/iphlpapi.spec
+++ b/dlls/iphlpapi/iphlpapi.spec
@@ -46,7 +46,7 @@
 #@ stub CreatePersistentTcpPortReservation
 #@ stub CreatePersistentUdpPortReservation
 @ stdcall CreateProxyArpEntry( long long long )
-#@ stub CreateSortedAddressPairs
+@ stdcall CreateSortedAddressPairs( ptr long ptr long long ptr ptr )
 #@ stub CreateUnicastIpAddressEntry
 #@ stub DeleteAnycastIpAddressEntry
 @ stdcall DeleteIPAddress( long )
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
index c06b69f..f04e12a 100644
--- a/dlls/iphlpapi/iphlpapi_main.c
+++ b/dlls/iphlpapi/iphlpapi_main.c
@@ -280,6 +280,28 @@ DWORD WINAPI CreateProxyArpEntry(DWORD dwAddress, DWORD dwMask, DWORD dwIfIndex)
 
 
 /******************************************************************
+ *    CreateSortedAddressPairs (IPHLPAPI.@)
+ */
+DWORD WINAPI CreateSortedAddressPairs(const PSOCKADDR_IN6 source, DWORD sourcecount,
+                                      const PSOCKADDR_IN6 destination, DWORD destinationcount,
+                                      DWORD sortoptions,
+                                      PSOCKADDR_IN6_PAIR *sortedaddr, DWORD *sortedcount)
+{
+  FIXME("(source %p, sourcecount %d, destination %p, destcount %d, sortoptions %x,"
+        " sortedaddr %p, sortedcount %p): stub\n", source, sourcecount, destination,
+        destinationcount, sortoptions, sortedaddr, sortedcount);
+
+  if (source || sourcecount || !destination || !sortedaddr || !sortedcount || destinationcount > 500)
+    return ERROR_INVALID_PARAMETER;
+
+  /* Returning not supported tells the client we don't have IPv6 support
+   * so applications can fallback to IPv4.
+   */
+  return ERROR_NOT_SUPPORTED;
+}
+
+
+/******************************************************************
  *    DeleteIPAddress (IPHLPAPI.@)
  *
  * Delete an IP address added with AddIPAddress().
diff --git a/include/ws2ipdef.h b/include/ws2ipdef.h
index ea8db3d..ca47caa 100644
--- a/include/ws2ipdef.h
+++ b/include/ws2ipdef.h
@@ -129,6 +129,12 @@ typedef struct WS(sockaddr_in6)
    ULONG    sin6_scope_id;
 } SOCKADDR_IN6,*PSOCKADDR_IN6, *LPSOCKADDR_IN6;
 
+typedef struct WS(sockaddr_in6_pair)
+{
+    PSOCKADDR_IN6 SourceAddress;
+    PSOCKADDR_IN6 DestinationAddress;
+} SOCKADDR_IN6_PAIR, *PSOCKADDR_IN6_PAIR;
+
 /*
  * Multicast group information
  */




More information about the wine-cvs mailing list