|
// <auto-generated/>
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CreateSocketEventPort", ExactSpelling = true)]
internal static unsafe extern partial global::Interop.Error CreateSocketEventPort(nint* port);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CloseSocketEventPort", ExactSpelling = true)]
internal static extern partial global::Interop.Error CloseSocketEventPort(nint port);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CreateSocketEventBuffer", ExactSpelling = true)]
internal static unsafe extern partial global::Interop.Error CreateSocketEventBuffer(int count, global::Interop.Sys.SocketEvent** buffer);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FreeSocketEventBuffer", ExactSpelling = true)]
internal static unsafe extern partial global::Interop.Error FreeSocketEventBuffer(global::Interop.Sys.SocketEvent* buffer);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial global::Interop.Error TryChangeSocketEventRegistration(nint port, global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.SocketEvents currentEvents, global::Interop.Sys.SocketEvents newEvents, nint data)
{
nint __socket_native = default;
global::Interop.Error __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(port, __socket_native, currentEvents, newEvents, data);
}
}
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_TryChangeSocketEventRegistration", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __port_native, nint __socket_native, global::Interop.Sys.SocketEvents __currentEvents_native, global::Interop.Sys.SocketEvents __newEvents_native, nint __data_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_TryChangeSocketEventRegistration", ExactSpelling = true)]
internal static extern partial global::Interop.Error TryChangeSocketEventRegistration(nint port, nint socket, global::Interop.Sys.SocketEvents currentEvents, global::Interop.Sys.SocketEvents newEvents, nint data);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_WaitForSocketEvents", ExactSpelling = true)]
internal static unsafe extern partial global::Interop.Error WaitForSocketEvents(nint port, global::Interop.Sys.SocketEvent* buffer, int* count);
}
}
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.26904")]
internal static unsafe partial global::Interop.Error Accept(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int* socketAddressLen, nint* acceptedFd)
{
nint __socket_native = default;
global::Interop.Error __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, socketAddress, socketAddressLen, acceptedFd);
}
}
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_Accept", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, byte* __socketAddress_native, int* __socketAddressLen_native, nint* __acceptedFd_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static partial global::Interop.Error Bind(global::System.Runtime.InteropServices.SafeHandle socket, global::System.Net.Sockets.ProtocolType socketProtocolType, global::System.ReadOnlySpan<byte> socketAddress, int socketAddressLen)
{
nint __socket_native = default;
global::Interop.Error __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);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __socketAddress_native = &global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(socketAddress))
{
// 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, socketProtocolType, (byte*)__socketAddress_native, socketAddressLen);
}
}
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_Bind", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::System.Net.Sockets.ProtocolType __socketProtocolType_native, byte* __socketAddress_native, int __socketAddressLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
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.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error Connect(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int socketAddressLen)
{
nint __socket_native = default;
global::Interop.Error __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, socketAddress, socketAddressLen);
}
}
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_Connect", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, byte* __socketAddress_native, int __socketAddressLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error Connectx(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int socketAddressLen, global::System.Span<byte> buffer, int bufferLen, int enableTfo, int* sent)
{
nint __socket_native = default;
global::Interop.Error __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);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __buffer_native = &global::System.Runtime.InteropServices.Marshalling.SpanMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(buffer))
{
// 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, socketAddress, socketAddressLen, (byte*)__buffer_native, bufferLen, enableTfo, sent);
}
}
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_Connectx", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, byte* __socketAddress_native, int __socketAddressLen_native, byte* __buffer_native, int __bufferLen_native, int __enableTfo_native, int* __sent_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int DangerousSetIsNonBlocking(nint fd, int isNonBlocking)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(fd, isNonBlocking);
__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_FcntlSetIsNonBlocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, int __isNonBlocking_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int SetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, int isNonBlocking)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, isNonBlocking);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlSetIsNonBlocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, int __isNonBlocking_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int GetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, out bool isNonBlocking)
{
int __lastError;
isNonBlocking = default;
nint __fd_native = default;
int __isNonBlocking_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, &__isNonBlocking_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
// Unmarshal - Convert native data to managed data.
isNonBlocking = __isNonBlocking_native != 0;
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlGetIsNonBlocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, int* __isNonBlocking_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int SetFD(global::System.Runtime.InteropServices.SafeHandle fd, int flags)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, flags);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlSetFD", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, int __flags_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int GetFD(global::System.Runtime.InteropServices.SafeHandle fd)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlGetFD", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int GetFD(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_FcntlGetFD", 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_Disconnect", ExactSpelling = true)]
internal static extern partial global::Interop.Error Disconnect(nint socket);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error GetBytesAvailable(global::System.Runtime.InteropServices.SafeHandle socket, int* available)
{
nint __socket_native = default;
global::Interop.Error __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, available);
}
}
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_GetBytesAvailable", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, int* __available_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error GetAtOutOfBandMark(global::System.Runtime.InteropServices.SafeHandle socket, int* atMark)
{
nint __socket_native = default;
global::Interop.Error __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, atMark);
}
}
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_GetAtOutOfBandMark", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, int* __atMark_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetDomainSocketSizes", ExactSpelling = true)]
internal static unsafe extern partial void GetDomainSocketSizes(int* pathOffset, int* pathSize, int* addressSize);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetMaximumAddressSize", ExactSpelling = true)]
internal static extern partial int GetMaximumAddressSize();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error GetPeerName(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int* socketAddressLen)
{
nint __socket_native = default;
global::Interop.Error __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, socketAddress, socketAddressLen);
}
}
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_GetPeerName", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, byte* __socketAddress_native, int* __socketAddressLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error GetSocketErrorOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Error* socketError)
{
nint __socket_native = default;
global::Interop.Error __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, socketError);
}
}
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_GetSocketErrorOption", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::Interop.Error* __socketError_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial global::Interop.Error GetSocketType(global::System.Net.Sockets.SafeSocketHandle socket, out global::System.Net.Sockets.AddressFamily addressFamily, out global::System.Net.Sockets.SocketType socketType, out global::System.Net.Sockets.ProtocolType protocolType, out bool isListening)
{
addressFamily = default;
socketType = default;
protocolType = default;
isListening = default;
nint __socket_native = default;
int __isListening_native = default;
global::Interop.Error __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Net.Sockets.SafeSocketHandle>.ManagedToUnmanagedIn __socket_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__socket_native__marshaller.FromManaged(socket);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::System.Net.Sockets.ProtocolType* __protocolType_native = &protocolType)
fixed (global::System.Net.Sockets.SocketType* __socketType_native = &socketType)
fixed (global::System.Net.Sockets.AddressFamily* __addressFamily_native = &addressFamily)
{
// 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, __addressFamily_native, __socketType_native, __protocolType_native, &__isListening_native);
}
// Unmarshal - Convert native data to managed data.
isListening = __isListening_native != 0;
}
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_GetSocketType", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::System.Net.Sockets.AddressFamily* __addressFamily_native, global::System.Net.Sockets.SocketType* __socketType_native, global::System.Net.Sockets.ProtocolType* __protocolType_native, int* __isListening_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error GetSockName(global::System.Runtime.InteropServices.SafeHandle socket, byte* socketAddress, int* socketAddressLen)
{
nint __socket_native = default;
global::Interop.Error __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, socketAddress, socketAddressLen);
}
}
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_GetSockName", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, byte* __socketAddress_native, int* __socketAddressLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error GetSockOpt(global::System.Runtime.InteropServices.SafeHandle socket, global::System.Net.Sockets.SocketOptionLevel optionLevel, global::System.Net.Sockets.SocketOptionName optionName, byte* optionValue, int* optionLen)
{
nint __socket_native = default;
global::Interop.Error __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, optionLevel, optionName, optionValue, optionLen);
}
}
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_GetSockOpt", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::System.Net.Sockets.SocketOptionLevel __optionLevel_native, global::System.Net.Sockets.SocketOptionName __optionName_native, byte* __optionValue_native, int* __optionLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetSockOpt", ExactSpelling = true)]
internal static unsafe extern partial global::Interop.Error GetSockOpt(nint socket, global::System.Net.Sockets.SocketOptionLevel optionLevel, global::System.Net.Sockets.SocketOptionName optionName, byte* optionValue, int* optionLen);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error GetRawSockOpt(global::System.Runtime.InteropServices.SafeHandle socket, int optionLevel, int optionName, byte* optionValue, int* optionLen)
{
nint __socket_native = default;
global::Interop.Error __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, optionLevel, optionName, optionValue, optionLen);
}
}
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_GetRawSockOpt", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, int __optionLevel_native, int __optionName_native, byte* __optionValue_native, int* __optionLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetControlMessageBufferSize", ExactSpelling = true)]
internal static extern partial int GetControlMessageBufferSize(int isIPv4, int isIPv6);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool TryGetIPPacketInformation(global::Interop.Sys.MessageHeader* messageHeader, bool isIPv4, global::Interop.Sys.IPPacketInformation* packetInfo)
{
int __isIPv4_native;
bool __retVal;
int __retVal_native;
// Marshal - Convert managed data to native data.
__isIPv4_native = (int)(isIPv4 ? 1 : 0);
{
__retVal_native = __PInvoke(messageHeader, __isIPv4_native, packetInfo);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_TryGetIPPacketInformation", ExactSpelling = true)]
static extern unsafe int __PInvoke(global::Interop.Sys.MessageHeader* __messageHeader_native, int __isIPv4_native, global::Interop.Sys.IPPacketInformation* __packetInfo_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error GetLingerOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.LingerOption* option)
{
nint __socket_native = default;
global::Interop.Error __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, option);
}
}
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_GetLingerOption", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::Interop.Sys.LingerOption* __option_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error SetLingerOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.LingerOption* option)
{
nint __socket_native = default;
global::Interop.Error __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, option);
}
}
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_SetLingerOption", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::Interop.Sys.LingerOption* __option_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetLingerOption", ExactSpelling = true)]
internal static unsafe extern partial global::Interop.Error SetLingerOption(nint socket, global::Interop.Sys.LingerOption* option);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial global::Interop.Error SendFile(global::System.Runtime.InteropServices.SafeHandle out_fd, global::System.Runtime.InteropServices.SafeHandle in_fd, long offset, long count, out long sent)
{
int __lastError;
sent = default;
nint __out_fd_native = default;
nint __in_fd_native = default;
global::Interop.Error __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __in_fd_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __out_fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__in_fd_native__marshaller.FromManaged(in_fd);
__out_fd_native__marshaller.FromManaged(out_fd);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (long* __sent_native = &sent)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__in_fd_native = __in_fd_native__marshaller.ToUnmanaged();
__out_fd_native = __out_fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__out_fd_native, __in_fd_native, offset, count, __sent_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__in_fd_native__marshaller.Free();
__out_fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SendFile", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __out_fd_native, nint __in_fd_native, long __offset_native, long __count_native, long* __sent_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial global::Interop.Error SetSendTimeout(global::System.Runtime.InteropServices.SafeHandle socket, int millisecondsTimeout)
{
nint __socket_native = default;
global::Interop.Error __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, millisecondsTimeout);
}
}
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_SetSendTimeout", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, int __millisecondsTimeout_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial global::Interop.Error SetReceiveTimeout(global::System.Runtime.InteropServices.SafeHandle socket, int millisecondsTimeout)
{
nint __socket_native = default;
global::Interop.Error __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, millisecondsTimeout);
}
}
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_SetReceiveTimeout", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, int __millisecondsTimeout_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FStat", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int Stat(string path, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Stat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LStat(string path, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LStat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial global::Interop.Error Listen(global::System.Runtime.InteropServices.SafeHandle socket, int backlog)
{
nint __socket_native = default;
global::Interop.Error __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, backlog);
}
}
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_Listen", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, int __backlog_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error GetIPv4MulticastOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MulticastOption multicastOption, global::Interop.Sys.IPv4MulticastOption* option)
{
nint __socket_native = default;
global::Interop.Error __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, multicastOption, option);
}
}
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_GetIPv4MulticastOption", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::Interop.Sys.MulticastOption __multicastOption_native, global::Interop.Sys.IPv4MulticastOption* __option_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error SetIPv4MulticastOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MulticastOption multicastOption, global::Interop.Sys.IPv4MulticastOption* option)
{
nint __socket_native = default;
global::Interop.Error __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, multicastOption, option);
}
}
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_SetIPv4MulticastOption", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::Interop.Sys.MulticastOption __multicastOption_native, global::Interop.Sys.IPv4MulticastOption* __option_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error GetIPv6MulticastOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MulticastOption multicastOption, global::Interop.Sys.IPv6MulticastOption* option)
{
nint __socket_native = default;
global::Interop.Error __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, multicastOption, option);
}
}
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_GetIPv6MulticastOption", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::Interop.Sys.MulticastOption __multicastOption_native, global::Interop.Sys.IPv6MulticastOption* __option_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error SetIPv6MulticastOption(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MulticastOption multicastOption, global::Interop.Sys.IPv6MulticastOption* option)
{
nint __socket_native = default;
global::Interop.Error __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, multicastOption, option);
}
}
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_SetIPv6MulticastOption", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::Interop.Sys.MulticastOption __multicastOption_native, global::Interop.Sys.IPv6MulticastOption* __option_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Poll", ExactSpelling = true)]
internal static unsafe extern partial global::Interop.Error Poll(global::Interop.PollEvent* pollEvents, uint eventCount, int timeout, uint* triggered);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PlatformSupportsDualModeIPv4PacketInfo", ExactSpelling = true)]
internal static extern partial int PlatformSupportsDualModeIPv4PacketInfo();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int Read(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, buffer, count);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Read", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __count_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int ReadFromNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, buffer, count);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ReadFromNonblocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __count_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error Receive(global::System.Runtime.InteropServices.SafeHandle socket, byte* buffer, int bufferLen, global::System.Net.Sockets.SocketFlags flags, int* received)
{
nint __socket_native = default;
global::Interop.Error __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, buffer, bufferLen, flags, received);
}
}
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_Receive", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, byte* __buffer_native, int __bufferLen_native, global::System.Net.Sockets.SocketFlags __flags_native, int* __received_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error ReceiveMessage(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MessageHeader* messageHeader, global::System.Net.Sockets.SocketFlags flags, long* received)
{
nint __socket_native = default;
global::Interop.Error __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, flags, received);
}
}
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_ReceiveMessage", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::Interop.Sys.MessageHeader* __messageHeader_native, global::System.Net.Sockets.SocketFlags __flags_native, long* __received_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error Send(global::System.Runtime.InteropServices.SafeHandle socket, byte* buffer, int bufferLen, global::System.Net.Sockets.SocketFlags flags, int* sent)
{
nint __socket_native = default;
global::Interop.Error __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, buffer, bufferLen, flags, sent);
}
}
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_Send", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, byte* __buffer_native, int __bufferLen_native, global::System.Net.Sockets.SocketFlags __flags_native, int* __sent_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error Select(global::System.Span<int> readFDs, int readFDsLength, global::System.Span<int> writeFDs, int writeFDsLength, global::System.Span<int> checkError, int checkErrorLength, int timeout, int maxFd, out int triggered)
{
triggered = default;
global::Interop.Error __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (int* __triggered_native = &triggered)
fixed (void* __checkError_native = &global::System.Runtime.InteropServices.Marshalling.SpanMarshaller<int, int>.ManagedToUnmanagedIn.GetPinnableReference(checkError))
fixed (void* __writeFDs_native = &global::System.Runtime.InteropServices.Marshalling.SpanMarshaller<int, int>.ManagedToUnmanagedIn.GetPinnableReference(writeFDs))
fixed (void* __readFDs_native = &global::System.Runtime.InteropServices.Marshalling.SpanMarshaller<int, int>.ManagedToUnmanagedIn.GetPinnableReference(readFDs))
{
__retVal = __PInvoke((int*)__readFDs_native, readFDsLength, (int*)__writeFDs_native, writeFDsLength, (int*)__checkError_native, checkErrorLength, timeout, maxFd, __triggered_native);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Select", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(int* __readFDs_native, int __readFDsLength_native, int* __writeFDs_native, int __writeFDsLength_native, int* __checkError_native, int __checkErrorLength_native, int __timeout_native, int __maxFd_native, int* __triggered_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error SendMessage(global::System.Runtime.InteropServices.SafeHandle socket, global::Interop.Sys.MessageHeader* messageHeader, global::System.Net.Sockets.SocketFlags flags, long* sent)
{
nint __socket_native = default;
global::Interop.Error __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, flags, sent);
}
}
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_SendMessage", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::Interop.Sys.MessageHeader* __messageHeader_native, global::System.Net.Sockets.SocketFlags __flags_native, long* __sent_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error SetSockOpt(global::System.Runtime.InteropServices.SafeHandle socket, global::System.Net.Sockets.SocketOptionLevel optionLevel, global::System.Net.Sockets.SocketOptionName optionName, byte* optionValue, int optionLen)
{
nint __socket_native = default;
global::Interop.Error __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, optionLevel, optionName, optionValue, optionLen);
}
}
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_SetSockOpt", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::System.Net.Sockets.SocketOptionLevel __optionLevel_native, global::System.Net.Sockets.SocketOptionName __optionName_native, byte* __optionValue_native, int __optionLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetSockOpt", ExactSpelling = true)]
internal static unsafe extern partial global::Interop.Error SetSockOpt(nint socket, global::System.Net.Sockets.SocketOptionLevel optionLevel, global::System.Net.Sockets.SocketOptionName optionName, byte* optionValue, int optionLen);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Error SetRawSockOpt(global::System.Runtime.InteropServices.SafeHandle socket, int optionLevel, int optionName, byte* optionValue, int optionLen)
{
nint __socket_native = default;
global::Interop.Error __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, optionLevel, optionName, optionValue, optionLen);
}
}
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_SetRawSockOpt", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, int __optionLevel_native, int __optionName_native, byte* __optionValue_native, int __optionLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial global::Interop.Error Shutdown(global::System.Runtime.InteropServices.SafeHandle socket, global::System.Net.Sockets.SocketShutdown how)
{
nint __socket_native = default;
global::Interop.Error __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, how);
}
}
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_Shutdown", ExactSpelling = true)]
static extern unsafe global::Interop.Error __PInvoke(nint __socket_native, global::System.Net.Sockets.SocketShutdown __how_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Shutdown", ExactSpelling = true)]
internal static extern partial global::Interop.Error Shutdown(nint socket, global::System.Net.Sockets.SocketShutdown how);
}
}
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);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int Pipe(int* pipefd, global::Interop.Sys.PipeFlags flags)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(pipefd, flags);
__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_Pipe", ExactSpelling = true)]
static extern unsafe int __PInvoke(int* __pipefd_native, global::Interop.Sys.PipeFlags __flags_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int Write(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, buffer, bufferSize);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Write", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int Write(nint fd, byte* buffer, int bufferSize)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(fd, buffer, bufferSize);
__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_Write", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int WriteToNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, buffer, bufferSize);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_WriteToNonblocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native);
}
}
}
|