streaming-pcap-1.1.1: Stream packets via libpcap.

Copyright(c) Colin Woodbury 2018
LicenseBSD3
MaintainerColin Woodbury <colingw@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Network.Pcap.Streaming

Description

A streaming interface to the pcap Haskell library, which itself is a binding to libpcap. Humbly adapted from pcap-conduit by Austin Seipp.

Synopsis

Documentation

data Packet Source #

A pcap packet. Assumes nothing about the contents or structure of the bytes value.

Constructors

Packet 

Fields

Instances

data PktHdr :: * #

Constructors

PktHdr 

Fields

Instances

Eq PktHdr 

Methods

(==) :: PktHdr -> PktHdr -> Bool #

(/=) :: PktHdr -> PktHdr -> Bool #

Show PktHdr 

offline :: MonadResource m => FilePath -> Stream (Of Packet) m () Source #

Read Packets from some file dump. Uses a custom parser, not libpcap.

SPECIALIZEd for ResourceT IO.

online :: MonadIO m => String -> Int -> Bool -> Int64 -> Stream (Of Packet) m () Source #

Read Packets from some network device. See openLive for a description of each argument.

SPECIALIZEd for IO.