Hacker News new | ask | show | jobs
Libtins v3.0: A fast C++ packet sniffing and crafting library (libtins.github.io)
85 points by pea-tear 4332 days ago
7 comments

I run an open-source Go library that also does packet capture/encode/decode (http://code.google.com/p/gopacket). Would you be at all interested in adding results for gopacket to your benchmarks page? If so, I'm happy to write up the code to actually run the benchmarks, then send it over to you so it can be run on your benchmarking machine.
That would be great! I think that adding more libraries to the benchmark would be just great. This is the project I've created to run the benchmarks:

https://github.com/mfontanini/packet-capture-benchmarks

You can have a look at some of the existing benchmarks so you get an idea of what it has to do. Let me know if you need any help.

Excellent! I'll try to send you a pull request sometime Monday or Tuesday.
Is it possible to manipulate traffic / drop it? A long time ago, I've been trying to build transparent tunnels, so that the user does not have to configure anything special to use it. The biggest difficulty I faced was to drop the original traffic to only allow the newly crafted one.

Is this something that your library helps with?.

You can't drop the original traffic using the library. You could capture it, modify it and send it though. That + some iptables rules to drop the original traffic would be sufficient I guess.
We use thrift for a lot of internal service calls - this seems like it would be a great little library to capture and debug production thrift calls.

Would I just need to implement my own PDU class that implements the protocol?

Thanks! This looks great!

Yes, there's a small tutorial section on how to implement new protocols:

http://libtins.github.io/tutorial/new_protocols/

Excellent, interesting work to be read by me in the near future. How long did it take you complete this project, if you don't mind me asking?
I started this project with a colleague near the end of 2012, and I've continued development on my own since 2013. The first months of development implied a lot of work, but then just a couple of hours a week to fix bugs or improve some mechanisms.
beautiful work man , finally some real stuff here and not yet another javascript/ruby/shmoby framework ..
Any news on windows compile?
I've managed to compile it on Windows using Visual Studio. It's in my TODO list to write a tutorial on the site on how to do so. Hopefully I'll do that on the next few days.
Will be on the look out for it :) You are doing great work!
Great job. Kudos for the well structured website and documentation also.