Click to See Complete Forum and Search --> : Raw Sockets in C#


SomeIdiot
January 3rd, 2005, 07:36 PM
Hi all.

I am new to these forums so don't slay me if I posted in the wrong place, m'kay?

OK, Here is what I am trying to do:

I need to make an application that send different types of packets (tcp (ack, SYN etc), UDP, IMCP) over a LAN. This I am thinking will have to be done with raw sockets because I want full control over when with packet is being sent.

On the other side of the network of course I need to make a program that will be able to recieve and register these packets. This will have to be some sort of a listener that is able to see all the parameters of the packet (type, IP's, port etc)


I think that the hardest part will be to make the sending part of the program because I haven't been able to find any examples, so I would be grateful if you know where to find examples on how to send a packet of my choice with raw sockets.


This is a part of a project where we will be making our own firewall and this program should analyze how much of the trafic makes its way through and how many are lost/blocked.

I hope that you guys can help me. Thanks!

jsdrtwe
February 2nd, 2005, 03:43 PM
Use google, type in "C# raw sockets". If you can't find it using google, it's not on the internet, even if it is you'll have a very hard time finding it.

here's what I have found on the subject:

http://www.codeproject.com/csharp/SendRawPacket.asp
http://www.c-sharpcorner.com/Network/SimpleSnifferInCSLM.asp

like I said, you should be using google if you want to search anything on the net, google has lots more links.