Heya,
On the following code
Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP);
s.Bind(new System.Net.IPEndPoint(IPAddress.Parse("127.0.0.1"),0));
s.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.HeaderIncluded, true);
byte[] bin = new byte[4]{1, 0, 0, 0};
byte[] bout = new byte[4];
s.IOControl(IOControlCode.ReceiveAll, bin, bout);
I get the following exception:
Socket Exception: An invalid argument was supplied
On the following line
s.IOControl(IOControlCode.ReceiveAll, in, out);
But I dont understand why I've supplied a wrong argument.