1

Here's the task: I need to generate packet sending by these protocols: TCP UDP ICMP IGMP GGP GRE PUP Raw IP RSVP

Is there any library (or wrapper) to resolve this problem more easily?

Actually I want to find out is there any ready implementation of packet structure. Most simply, I invoke smth like GenerateGGPPaket() and than send it or smth like System.Net.Sockets.TcpClient class in C#

I've tried sharppcap, but it doesn't allow to generate packets as I mentioned.

kvantime
  • 11
  • 2
  • Yep, SharpPcap (Packet.Net really), supports TCP, UDP, UGMP and Raw IP but I don't think GGP, GRE, PUP or RSVP. Those might not be too difficult to add though if other solutions are even further away from the full set of protocols you are looking for. – Chris Morgan Feb 14 '12 at 15:39
  • Just out of interest, could you say what you are trying to do this for. I'm intriguedand maybe there's a better solution? – Sam Greenhalgh Feb 15 '12 at 09:36

1 Answers1

0

You can also use Pcap.Net to create TCP, UDP, ICMP, IGMP, GRE and Raw IP and support for more protocols is coming.

However, I think you might have problems using TcpClient since it uses the OS TCP infrastructure, which probably won't allow you full control over the packet structure.

You can, however, send these packets directly using Pcap.Net without the need to go through TcpClient (it won't help you with non-TCP packets anyways).

brickner
  • 6,595
  • 3
  • 41
  • 54