pcap icon indicating copy to clipboard operation
pcap copied to clipboard

GNU/Linux "any" device support broken

Open zabbal opened this issue 11 years ago • 1 comments

While trying to open .pcap captured with "any" device in GNU/Linux I receive following error:

"user error (an interface has a type 113 different from the type of the first interface)"

This might to be related to old Debian bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546596

Package installed via "cabal install pcap" on ubuntu 12.10 x86_64 with libpcap0.8-dev

Test program below:

import Network.Pcap import System.IO import Control.Monad
import Foreign.Marshal.Array

printCap ph bytep = peekArray (fromIntegral (hdrCaptureLength ph)) bytep >>= print

main = do capture <- openOffline "test.pcap" dispatch capture (-1) printCap

zabbal avatar Nov 02 '12 20:11 zabbal

How did you create the capture file "test.pcap"? I just made the dump* functions usable in #10, and using those dump* functions I can capture from the "any" interface and then read the dump back in with no trouble. I have not tried reading dumps created using other programs.

ntc2 avatar Jun 30 '17 01:06 ntc2