File: LibraryImports.g.cs
Project: src\src\libraries\System.IO.Compression.Brotli\src\System.IO.Compression.Brotli.csproj (System.IO.Compression.Brotli)
// <auto-generated/>
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPlatformToPal", ExactSpelling = true)]
        internal static extern partial global::Interop.Error ConvertErrorPlatformToPal(int platformErrno);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPalToPlatform", ExactSpelling = true)]
        internal static extern partial int ConvertErrorPalToPlatform(global::Interop.Error error);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_StrErrorR", ExactSpelling = true)]
        private static unsafe extern partial byte* StrErrorR(int platformErrno, byte* buffer, int bufferSize);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetSocketAddressSizes", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.Error GetSocketAddressSizes(int* ipv4SocketAddressSize, int* ipv6SocketAddressSize, int* udsSocketAddressSize, int* maxSocketAddressSize);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetAddressFamily", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.Error GetAddressFamily(byte* socketAddress, int socketAddressLen, int* addressFamily);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetAddressFamily", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.Error SetAddressFamily(byte* socketAddress, int socketAddressLen, int addressFamily);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPort", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.Error GetPort(byte* socketAddress, int socketAddressLen, ushort* port);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetPort", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.Error SetPort(byte* socketAddress, int socketAddressLen, ushort port);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetIPv4Address", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.Error GetIPv4Address(byte* socketAddress, int socketAddressLen, uint* address);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetIPv4Address", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.Error SetIPv4Address(byte* socketAddress, int socketAddressLen, uint address);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetIPv6Address", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.Error GetIPv6Address(byte* socketAddress, int socketAddressLen, byte* address, int addressLen, uint* scopeId);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetIPv6Address", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.Error SetIPv6Address(byte* socketAddress, int socketAddressLen, byte* address, int addressLen, uint scopeId);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetDomainName", ExactSpelling = true)]
        private static unsafe extern partial int GetDomainName(byte* name, int len);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial int GetHostName(byte* name, int nameLength)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(name, nameLength);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetHostName", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __name_native, int __nameLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetNameInfo", ExactSpelling = true)]
        internal static unsafe extern partial int GetNameInfo(byte* address, uint addressLength, byte isIpv6, byte* host, uint hostLength, byte* service, uint serviceLength, global::Interop.Sys.GetNameInfoFlags flags);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int GetHostEntryForName(string address, global::System.Net.Sockets.AddressFamily family, global::Interop.Sys.HostEntry* entry)
        {
            byte* __address_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __address_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __address_native__marshaller.FromManaged(address, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __address_native = __address_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__address_native, family, entry);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __address_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetHostEntryForName", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __address_native, global::System.Net.Sockets.AddressFamily __family_native, global::Interop.Sys.HostEntry* __entry_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FreeHostEntry", ExactSpelling = true)]
        internal static unsafe extern partial void FreeHostEntry(global::Interop.Sys.HostEntry* entry);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        public static partial uint InterfaceNameToIndex(global::System.ReadOnlySpan<byte> utf8NullTerminatedName)
        {
            int __lastError;
            uint __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __utf8NullTerminatedName_native = &global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(utf8NullTerminatedName))
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke((byte*)__utf8NullTerminatedName_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_InterfaceNameToIndex", ExactSpelling = true)]
            static extern unsafe uint __PInvoke(byte* __utf8NullTerminatedName_native);
        }
    }
}