|
// <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.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27601")]
internal static unsafe partial global::System.Net.Sockets.SocketError ReceiveSocketError(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MessageHeader* messageHeader)
{
nint __socket_native = default;
global::System.Net.Sockets.SocketError __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__socket_native__marshaller.FromManaged(socket);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__socket_native = __socket_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__socket_native, messageHeader);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__socket_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ReceiveSocketError", ExactSpelling = true)]
static extern unsafe global::System.Net.Sockets.SocketError __PInvoke(nint __socket_native, global::Interop.Sys.MessageHeader* __messageHeader_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.27601")]
internal static partial int Close(nint fd)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(fd);
__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_Close", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Socket", ExactSpelling = true)]
internal static unsafe extern partial global::Interop.Error Socket(int addressFamily, int socketType, int protocolType, nint* socket);
}
}
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);
}
}
|