Perl XS interface to Sharktools

About a month ago, brian d foy asked me if I could write a Perl interface to the Sharktools library by Armen Babikyan.

Sharktools consists of:

Matshark and Pyshark are tools that integrate Wireshark’s packet dissection engine into the Matlab and Python programming environments, respectively.

I used the Python interface (pyshark.c) bundled with Sharktools as the starting point. The task proved to be a straightforward one, requiring only the substitution of Perl data structures for Python ones.

I have not yet uploaded Net::Sharktools to CPAN, but the source code is available on github at https://github.com/nanis/perl-sharktools.

Currently, the module “works here”. I have tested it on my ArchLinux system with Wireshark 1.4.2 and 1.4.3 using the sample capture file provided with Sharktools.

This is the first ever XS module I have written from scratch as opposed to compiling simple examples, so I am somewhat unsure of the quality.

Also, given the tight coupling between Wireshark and Sharktools, I have struggled with coming up with a way of automating the installation: Currently, you have to manually edit Makefile.PL to specify the correct paths to the Wireshark and Sharktools source trees.

I would appreciate any bug reports, fixes, patches, test cases, style improvements, in short, any input you can provide to make the module more useful.

You can contact me by email at nanis A T cpan_org.