Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>I want the time return by hdrSeconds p [ time to capture ] in same format as in wireshark [ Date : Month : Year Hour : Min : Sec ] </p> </blockquote> <p>Well you can use the <code>time</code> package and convert this to a <code>UTCTime</code>. This makes it trivial to extract month, day, year, etc. Look at the <a href="http://hackage.haskell.org/package/time" rel="nofollow">time package</a>'s haddock for more.</p> <pre><code>let epoch = pcapEpochTimeThatYouFindInOnlineDocumentation diff &lt;- hdrDiffTime p let date = addUTCTime (realToFrac diff) epoch </code></pre> <p>From what I can tell the Haskell bindings don't provide the epoch, but once you find that this should be fine. I'd e-mail in a patch to the maintainer to add a converstion directly to UTCTime.</p> <blockquote> <p>and data return by variable q in Ascii format</p> </blockquote> <p>Well q is just an intergral and you can get <code>Char</code>s from <code>Int</code>s using <code>toEnum</code>:</p> <pre><code>print (toEnum (fromIntegral q) :: Char) </code></pre> <p>As for doing this in pure Haskell, I think you need to step back a bit and learn more about Haskell as a language, perhaps from a tutuorial such as <a href="http://learnyouahaskell.com/chapters" rel="nofollow">learnyouahaskell</a>. If you are determined to forge ahead then read up on the <a href="http://hackage.haskell.org/package/binary" rel="nofollow">binary</a> package, which was mentioned on the mailing list as the library of choice for their non-public pcap Haskell library.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload