public int IOControl(IOControlCode iocontrolCode_0, byte[] byte_0, byte[] byte_1) { int num = 0; try { if (this.udpClient_0 != null) { num = this.udpClient_0.Client.IOControl(iocontrolCode_0, byte_0, byte_1); } if (this.udpClient_1 != null) { num = this.udpClient_1.Client.IOControl(iocontrolCode_0, byte_0, byte_1); } } catch (Exception exception) { if (this.bool_0) { this.emptyAgileLogger_0.Log(exception, "IPv6UdpClient.IOControl", ErrorLevel.Standard); } } return(num); }
internal int IOControl( IOControlCode ioControlCode, IntPtr optionInValue, int inValueSize, IntPtr optionOutValue, int outValueSize) { if (CleanedUp) { throw new ObjectDisposedException(this.GetType().FullName); } if ( (unchecked((int)ioControlCode)) ==IoctlSocketConstants.FIONBIO) { throw new InvalidOperationException(SR.GetString(SR.net_sockets_useblocking)); } int realOptionLength = 0; // This can throw ObjectDisposedException. SocketError errorCode = UnsafeNclNativeMethods.OSSOCK.WSAIoctl_Blocking_Internal( m_Handle.DangerousGetHandle(), (uint)ioControlCode, optionInValue, inValueSize, optionOutValue, outValueSize, out realOptionLength, SafeNativeOverlapped.Zero, IntPtr.Zero); GlobalLog.Print("Socket#" + ValidationHelper.HashString(this) + "::IOControl() UnsafeNclNativeMethods.OSSOCK.WSAIoctl returns errorCode:" + errorCode); // // if the native call fails we'll throw a SocketException // if (errorCode==SocketError.SocketError) { // // update our internal state after this socket error and throw // SocketException socketException = new SocketException(); UpdateStatusAfterSocketError(socketException); if(s_LoggingEnabled)Logging.Exception(Logging.Sockets, this, "IOControl", socketException); throw socketException; } return realOptionLength; }
private static extern bool DeviceIOControlNative( SafeFileHandle deviceHandle, IOControlCode controlCode, IntPtr inBuffer, int inBufferSize, IntPtr outBuffer, int outBufferSize, out int bytesReturned, IntPtr overlapped);
public static SocketError IoctlInternal(SafeCloseSocket handle, IOControlCode ioControlCode, IntPtr optionInValue, int inValueLength, IntPtr optionOutValue, int outValueLength, out int optionLength) { if ((unchecked((int)ioControlCode)) == Interop.Winsock.IoctlSocketConstants.FIONBIO) { throw new InvalidOperationException(SR.net_sockets_useblocking); } SocketError errorCode = Interop.Winsock.WSAIoctl_Blocking_Internal( handle.DangerousGetHandle(), (uint)ioControlCode, optionInValue, inValueLength, optionOutValue, outValueLength, out optionLength, SafeNativeOverlapped.Zero, IntPtr.Zero); return errorCode == SocketError.SocketError ? GetLastSocketError() : SocketError.Success; }
public int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { }
public static extern int WSAIoctl(IntPtr s, IOControlCode dwIoControlCode, byte[] lpvInBuffer, int cbInBuffer, IntPtr lpvOutBuffer, int cbOutBuffer, ref int lpcbBytesReturned, IntPtr lpOverlapped, IntPtr lpCompletionRoutine);
public int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { return(this.innerSocket.IOControl(ioControlCode, optionInValue, optionOutValue)); }
public void CtrlCodeTest(IOControlCode CtrlCode, FileDevice DeviceType, uint Function, Method Method, FileAccess Access) => Assert.AreEqual(CtrlCode, IOControlCodeExtensions.CtrlCode(DeviceType, Function, Method, Access));
/// <summary> /// Overloaded. Sets low-level operating modes for the Socket. /// </summary> /// <param name="ioControlCode">A IOControlCode value that specifies the control code of the operation to perform.</param> /// <param name="optionInValue">A Byte array that contains the input data required by the operation.</param> /// <param name="optionOutValue">A Byte array that contains the output data returned by the operation.</param> /// <returns>The number of bytes in the optionOutValue parameter.</returns> public int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { return this.Socket.IOControl(ioControlCode, optionInValue, optionOutValue); }
public static Task <byte[]> InvokeIoControlAsync <V>(SafeFileHandle handle, IOControlCode controlCode, uint outputLength, V input, out int errorCode) { return(InvokeIoControlAsync(handle, controlCode, outputLength, input, out errorCode, CancellationToken.None)); }
public void GetAccessTest(IOControlCode CtrlCode, FileAccess Access) => Assert.AreEqual(Access, CtrlCode.GetAccess());
public void GetMethodTest(IOControlCode CtrlCode, Method Method) => Assert.AreEqual(Method, CtrlCode.GetMethod());
public void GetFunctionTest(IOControlCode CtrlCode, uint Function) => Assert.AreEqual(Function, CtrlCode.GetFunction());
public void GetDeviceTypeTest(IOControlCode CtrlCode, FileDevice DeviceType) => Assert.AreEqual(DeviceType, CtrlCode.GetDeviceType());
public abstract int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue);
internal int IOControl(IOControlCode ioControlCode, IntPtr optionInValue, int inValueSize, IntPtr optionOutValue, int outValueSize) { if (CleanedUp) { throw new ObjectDisposedException(this.GetType().FullName); } int realOptionLength = 0; // This can throw ObjectDisposedException. SocketError errorCode = SocketPal.IoctlInternal(_handle, ioControlCode, optionInValue, inValueSize, optionOutValue, outValueSize, out realOptionLength); GlobalLog.Print("Socket#" + Logging.HashString(this) + "::IOControl() Interop.Winsock.WSAIoctl returns errorCode:" + errorCode); // Throw an appropriate SocketException if the native call fails. if (errorCode != SocketError.Success) { // Update the internal state of this socket according to the error before throwing. SocketException socketException = new SocketException((int)errorCode); UpdateStatusAfterSocketError(socketException); if (s_loggingEnabled) { Logging.Exception(Logging.Sockets, this, "IOControl", socketException); } throw socketException; } return realOptionLength; }
public int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { return default(int); }
public override int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { int bytesTransferred = 0; if (UnsafeMethods.WSAIoctl_Blocking(Handle, (int) ioControlCode, optionInValue, optionInValue != null ? optionInValue.Length : 0, optionOutValue, optionOutValue != null ? optionOutValue.Length : 0, out bytesTransferred, IntPtr.Zero, IntPtr.Zero) != SocketError.SocketError) { return bytesTransferred; } throw new SocketException(); }
public int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { return(default(int)); }
public SrbIoControl(uint HeaderLength = default, string Signagure = null, uint Timeout = default, IOControlCode ControlCode = default, uint ReturnCode = default, uint Length = default) => (this.HeaderLength, __Signature, this.Timeout, this.ControlCode, this.ReturnCode, this.Length)
public static FileDevice GetDeviceType(this IOControlCode CtrlCode) => (FileDevice)(((uint)CtrlCode & 0xffff_0000) >> 16);
/// <summary> /// Invoke DeviceIOControl with no input or output. /// </summary> /// <returns>Success</returns> public static bool InvokeIoControl(SafeFileHandle handle, IOControlCode controlCode) { uint returnedBytes = 0; return(DeviceIoControl(handle, controlCode, null, 0, null, 0, ref returnedBytes, IntPtr.Zero)); }
static int \u202B([In] Socket obj0, [In] IOControlCode obj1, [In] byte[] obj2, [In] byte[] obj3) { // ISSUE: unable to decompile the method. }
protected abstract void SetIOControl(IOControlCode ioControlCode, byte[] inOption, byte[] outOption);
/// <summary> /// Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation. /// </summary> /// <param name="deviceHandle"> /// A handle to the device on which the operation is to be performed. The device is typically a volume, directory, file, or stream. /// To retrieve a device handle, use the CreateFile function. /// </param> /// <param name="controlCode"> /// The control code for the operation. This value identifies the specific operation to be performed and the type of device on which to perform it. /// </param> public static void DeviceIOControl(SafeFileHandle deviceHandle, IOControlCode controlCode) { int bytesReturned; DeviceIOControlInternal(deviceHandle, controlCode, IntPtr.Zero, 0, IntPtr.Zero, 0, out bytesReturned); }
public int IOControl (IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { /* Probably just needs to mirror the int * overload, but more investigation needed. */ throw new NotImplementedException (); }
public int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { throw new NotImplementedException(); }
/// <summary> /// Sends a control code directly to a specified device driver, causing the corresponding device to perform the corresponding operation. /// </summary> /// <param name="deviceHandle"> /// A handle to the device on which the operation is to be performed. The device is typically a volume, directory, file, or stream. /// To retrieve a device handle, use the CreateFile function. /// </param> /// <param name="controlCode"> /// The control code for the operation. This value identifies the specific operation to be performed and the type of device on which to perform it. /// </param> public static void DeviceIOControl(SafeFileHandle deviceHandle, IOControlCode controlCode) => DeviceIOControlInternal(deviceHandle, controlCode, IntPtr.Zero, 0, IntPtr.Zero, 0, out _);
public override int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { return m_socket.IOControl(ioControlCode, optionInValue, optionOutValue); }
public static SocketError IoctlInternal(SafeCloseSocket handle, IOControlCode ioControlCode, IntPtr optionInValue, int inValueLength, IntPtr optionOutValue, int outValueLength, out int optionLength) { // TODO: can this be supported in some reasonable fashion? throw new PlatformNotSupportedException(); }
public override int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { return(m_socket.IOControl(ioControlCode, optionInValue, optionOutValue)); }
internal int IOControl(IOControlCode ioControlCode, IntPtr optionInValue, int inValueSize, IntPtr optionOutValue, int outValueSize) { if (this.CleanedUp) throw new ObjectDisposedException(this.GetType().FullName); if ((int) ioControlCode == -2147195266) throw new InvalidOperationException(SR.GetString("net_sockets_useblocking")); int bytesTransferred = 0; if (UnsafeNclNativeMethods.OSSOCK.WSAIoctl_Blocking_Internal(this.m_Handle.DangerousGetHandle(), (uint) ioControlCode, optionInValue, inValueSize, optionOutValue, outValueSize, out bytesTransferred, (SafeHandle) SafeNativeOverlapped.Zero, IntPtr.Zero) != SocketError.SocketError) return bytesTransferred; SocketException socketException = new SocketException(); this.UpdateStatusAfterSocketError(socketException); if (Socket.s_LoggingEnabled) Logging.Exception(Logging.Sockets, (object) this, "IOControl", (Exception) socketException); throw socketException; }
public int IOControl (IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { return IOControl ((int) ioControlCode, optionInValue, optionOutValue); }
public int IOControl(IOControlCode ioControlCode, byte[] optionInValue, byte[] optionOutValue) { return this.socket.IOControl(ioControlCode, optionInValue, optionOutValue); }