I am trying to write an application that sends raw sockets in C#. I do not have a lot of experience in C/C++, so would prefer C#. I have found several options for raw sockets in C#, but none allow me to set the flags such as ACK, SYN, PSH, FIN, etc. Any ideas on if this can be accomplished in C#?
Any tips would be much appreciated.
Update:
I am trying to write a tool to test a firewall, I would like to send out of state packets, packets with different flags. I am using Win 2008, and as far as I read, I can do raw sockets on it. I will resort to C/C++ if needed, and so far that is what it looks like.
Further Update:
SharpPcap looks good, it seems v4.0 does not have source, only 3.5 does. I am going to try and muddle through it, as the documentation is not complete either. Has anyone used it before?
Final Edit:
SharpPcap looks great! It is doing what I need!! I will post a follow up question, as I am not a .NET guru, it is capturing well, I just can’t send a packet from in the capture delegate portion.
Thanks everyone!
Check out SharpPcap.
According to the description:
It internally uses the WinPcap driver, so it will allow you to build raw packets with your own IP/TCP headers.