From 05ea9761fb3fa18e54101802cbdc0270b98e4ce0 Mon Sep 17 00:00:00 2001 From: Marco Rossignoli Date: Sat, 17 Feb 2018 09:47:24 +0000 Subject: [PATCH] update GetNextIPAddress signature Commit migrated from https://github.com/dotnet/corefx/commit/f0c299f4dc45e833fdfa89252e3d2c5f2445c0b8 --- .../src/Interop/Unix/System.Native/Interop.HostEntry.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.HostEntry.cs b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.HostEntry.cs index 6ca19c4..944a235 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Native/Interop.HostEntry.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Native/Interop.HostEntry.cs @@ -31,22 +31,27 @@ internal static partial class Interop NO_DATA = 4, NO_ADDRESS = NO_DATA, } + + //opaque structure to maintain consistency with native function signature + internal unsafe struct addrinfo + { + + } [StructLayout(LayoutKind.Sequential)] internal unsafe struct HostEntry { internal byte* CanonicalName; // Canonical Name of the Host internal byte** Aliases; // List of aliases for the host - internal void* AddressListHandle; // Handle for socket address list - internal int IPAddressCount; // Number of IP addresses in the list - private int _handleType; // Opaque handle type information. + internal addrinfo* AddressListHandle; // Handle for socket address list + internal int IPAddressCount; // Number of IP addresses in the list } [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetHostEntryForName")] internal static extern unsafe int GetHostEntryForName(string address, HostEntry* entry); [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_GetNextIPAddress")] - internal static extern unsafe int GetNextIPAddress(HostEntry* entry, void** addressListHandle, IPAddress* endPoint); + internal static extern unsafe int GetNextIPAddress(HostEntry* entry, addrinfo** addressListHandle, IPAddress* endPoint); [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_FreeHostEntry")] internal static extern unsafe void FreeHostEntry(HostEntry* entry); -- 2.7.4