c# tcp raw socket

  • Thread starter Thread starter yex
  • Start date Start date
Y

yex

Is there any way to handle tcp syn packets without setting SIO_RCVALL
socket options ?
The following works with icmp and udp msg but not with tcp connection
requests.

System.Net.Sockets.Socket srv_socket=new
System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork,System.Net.Sockets.SocketType.Raw,
System.Net.Sockets.ProtocolType.IP);
srv_socket.Bind(
new System.Net.IPEndPoint(System.Net.IPAddress.Parse("127.0.0.1"),
2000)//whatever you want
);
srv_socket.Receive(ReceiveBuffer);// handles udp and icmp message but
no tcp syn
 
Back
Top