2

I am trying to add tcpreplay library in C so that I can rewrite the data in the packet. I have been searching for a library in C programming. The result was to add TCPreplay and start using it's methods. Unfortunately it is not there for C language. If there is way to add the Tcpreplay to my program, let me know.

If this is not feasible, Please let me know how I can proceed. Also in Perl, it Net-Pcap is available but it cannot be used to write data into the packets.

Also let me know which programming language to use, if C is not compatible.

Thanks in advance. :)

b0b
  • 33
  • 5
  • Please read [how to ask a question on Stack Overflow](http://stackoverflow.com/help/how-to-ask). – i alarmed alien Sep 25 '14 at 09:33
  • in perl you can use pcap_sendpacket to send packets and netpacket to write packets http://search.cpan.org/~gomor/Net-Packet-3.27/lib/Net/Packet.pm – smith Sep 25 '14 at 10:00

1 Answers1

1

If you look at this branch: https://github.com/synfinatic/tcpreplay you'll find my code to create a C library for tcpreplay & tcprewrite/etc. It's not complete, doesn't completely work and I have no intentions of completing it (I've since handed off Tcpreplay to Fred @ Appneta who is the new maintainer) but depending on what you need it might work.

Aaron Turner
  • 319
  • 1
  • 3
  • Aaron, I have merged those changes to the new repository https://github.com/appneta/tcpreplay. I also did updates for new API calls, but have not completed adding the build scripts to create a library. I have created an issue [here](https://github.com/appneta/tcpreplay/issues/133) – fredk Sep 27 '14 at 17:36