RAW Sockets - C # - Set Flags

I am trying to write an application that sends raw sockets to C #. I do not have much experience working in C / C ++, so I would prefer C #. I found several options for raw sockets in C #, but none of them allow me to set flags like ACK, SYN, PSH, FIN, etc. Any ideas on whether this can be done in C #?

Any advice would be highly appreciated.

Update: I am trying to write a tool for testing a firewall, I would like to send packets with different flags from status packets. I use Win 2008, and as far as I read, I can make raw sockets with it. I will resort to C / C ++ if necessary, and so far this is what it looks like.

Further update: SharpPcap looks good, it seems that v4.0 has no source, only 3.5 does. I am going to try to get confused about this since the documentation is not complete. Has anyone used it before?

Final Edit: SharpPcap looks great! He does what I need! I will post the following question, since I am not a .NET guru, it is well written, I just can not send the package from the capture delegation part.

Thanks everyone!

+5
source share
3 answers

Check out the SharpPcap .

According to the description:

SharpPcap - .NET, pcap/WinPcap. API , , .NET, # VB.NET.

WinPcap, IP/TCP.

+3

, . Wikipedia

Microsoft Windows XP 2001 raw socket, Winsock, Microsoft , TCP reset. Windows XP Microsoft Winsock raw socket , .

+1

, Socket SocketType.Raw ProtocolType.IP. , , , ACK, SYN .. RFC.:)

, , , , # . , , .

EDIT: Mystere Man, Windows. . Microsoft:

Windows 7, Windows Vista, Windows XP 2 (SP2) Windows XP 3 (SP3), raw :

  • TCP .
  • UDP- . IP- UDP . , ( TCP/IP IP- ).
  • IPPROTO_TCP .

(IPPROTO_IP, IPPROTO_UDP IPPROTO_SCTP, ).

Windows Server 2008 R2, Windows Server 2008, Windows Server 2003 , Windows XP 2 (SP2).

0
source

All Articles