roxen.lists.pike.general

Subject Author Date
Re: PikeFlows-0.1 James Harton <james[at]helicopter[dot]geek[dot]nz> 23-02-2009
Bill Welliver wrote:
> While on the subject, I'd be interested in having a conversation about 
> likes and dislikes in the Pcap module. It was one of my first attempts 
> at a C-level module of any complexity, and it perhaps could use some 
> reworking (subject to the limits of the underlying library, of course).

Hi Bill.

It was great for you to roll out 1.3 to fix the segfault on set_filter() 
but I can't actually get 1.3 to install (it fails the testsuite):

    pike -Mplib/modules /usr/include/pike/7.6.112/test_pike.pike testsuite
    Doing tests in testsuite (1 tests)
    ./testsuite.in:3: Test 1 (shift 1) produced warning.
    0: Failed to load library:
   
/home/jnh/.monger/Public_Network_Pcap-1.3/plib/modules/Public.pmod/Network.pmod/___Pcap.so:
    undefined symbol: pcap_dispatch
      1: mixed a() { return objectp(Public.Network.Pcap); }
      2:

    Failed tests: 1.                       
    Total tests: 2  (0 tests skipped)
    make: *** [verify] Error 1
    install error: make verify failed.


I'm glad the module is there, but it does seem a little rough around the 
edges.  Direct suggestions I have would be:

    * change open_offline() to take a Stdio.File instead of a string
      path (meaning you could hand it a Pipe() or a network stream or
      whatever.
    * lookup_dev() throws an error on my machine.
    * using nbio uses lots of CPU
    * it doesn't tell you what sort of interface (and thus what sort of
      frames) you are using. eg tunnels will give  you raw IP packets,
      ethernet will give you ethernet frames.

Cheers

James.