Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7079307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:39:23+00:00 2026-05-28T06:39:23+00:00

To Rephrase I am newbie to haskell. I am trying to parse a pcap

  • 0

To Rephrase

I am newbie to haskell. I am trying to parse a pcap file using network pcap package.

I have byte stream as an input, so I used dispatchBS function with my own callback function.

My goal is to get the concatenated result from all callbacks. [a] of all the packets parsed. How do I keep track of all the packets got so far when dispatchBS has nothing in its signature to maintain state of all packets parsed so far?

http://hackage.haskell.org/packages/archive/pcap/0.4.5/doc/html/Network-Pcap.html#t:CallbackBS

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:39:23+00:00Added an answer on May 28, 2026 at 6:39 am

    For example, you might use the “loop” function and provide your own callback. This callback has to be an IO action, so one simple solution would be to have it append its packet argument to a sequence (see Data.Sequence) held in an IORef. Once you have received enough packets, just read the IOVar. Or you could do something more sophisticated with threads and queues, depending on what you are trying to achieve.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to rephrase my question, cause my last one wasn't clear to everyone.
Just to rephrase the question I am using the WSO2 BPS server to run
rephrase... I'd like to know how to best to parse functions/conditionals. so if you
Sorry I had to rephrase my question, I have a list preference with some
Sorry. Let me rephrase: I want js to change to class of a input
I am a newbie at Qt programming and I have some issues with the
Trying to rephrase/clean up question here: I'm trying to do some sort of conditional
I'm trying to rephrase the a conditional to drop a { .. } statement
Edit: I rephrase the question to make it clearer I'm trying to understand what's
I don't have better why to rephrase the question , you might suggest me

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.