Flutterby™! : Packet Sniffer in C++

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

Packet Sniffer in C++

2013-11-04 18:33:50.687202+00 by Dan Lyke 6 comments

Whenever I've worked on stuff in Python, I've gradually come around to thinking that I should have just written whatever it is I'm working on in C++ instead. As I've gotten totally immersed in Perl, I've started to realize that after the initial regex syntactic sugar, there's a lot that can just be solved by having a well defined C++ library. And a lot that's helped by having strongly typed languages.

Average Coder: Creating a simple and fast packet sniffer in C++ makes me think that really what's missing from C++ is CPAN and a good command-line mode.

[ related topics: Language Books Perl Open Source Software Engineering Work, productivity and environment Monty Python Python hubris ]

comments in ascending chronological order (reverse):

#Comment Re: made: 2013-11-04 18:38:25.684726+00 by: meuon

CPAN (PERL) and PEAR (PHP) are a lot of what makes them useful.

#Comment Re: made: 2013-11-04 19:35:08.298417+00 by: Jack William Bell

Seems fixable to me. What would you call it?

#Comment Re: made: 2013-11-04 20:31:02.734994+00 by: Dan Lyke

There's problem #1.

Problem #2 is: How do you build the Windows version of it?

#Comment Re: made: 2013-11-04 21:18:16.730193+00 by: Jack William Bell

Windows? [makes retching sound]

There are Windows C versions of both getopt and getopt_long. Wrap those with a generic c++ class to make life easier and problem solved. (Someone out there probably already has.)

Or there is this: http://michael.dipperstein.com/optlist/index.html

#Comment Re: made: 2013-11-04 22:02:13.292975+00 by: Dan Lyke [edit history]

I'm more thinking that with Perl I type "cpanm [module name]" or "sudo cpan [module name]" if I'm less sophisticated and am not using local::lib, and there's an analog that I can use if I'm running ActiveState's installer on Windows.

Similar with Pear.

So for C++ 3 things are missing:

  1. The way to find these libraries. CPAN provides the social structure such that there's an XML parser, and there are various variations on that, but largely the first person to get to a problem space owns the solution to the problem space and we start to look to that for solutions.
  2. The installer and package manager that makes it easy for me to do a "-l[libname]" in my Makefile, and makes it similarly easy for me to do that same set of operations on Windows with VisualStudio. Hell, last time I tried it was enough of an annoyance to do this with BOOST that I just wrote wrappers for the other platforms that looked like the notYET classes.
  3. The analogue to perldoc or pydoc or whatever PHP's documentation is.

#Comment Re: made: 2013-11-05 19:51:24.01769+00 by: ebradway

The core issue is C/C++ has never really been a 'community focused' language. C/C++ has always tried to go the de juris ANSI/ISO standardization route. What you want are the community elements from Perl (Python, Ruby, etc) but those elements are artifacts of the way the language itself became standardized.