The format of this changelog is based on Keep a Changelog.
Guidelines for incrementing the package version are described in the Haskell Package Versioning Policy.
When releasing a new version change [Unreleased]
to [<version>] - <release date>
and copy the template
## [Unreleased]
### Added
### Changed
### Deprecated
### Removed
### Fixed
### Security
to create a new changelog section for development of the next release.
- This changelog!
- Added
Storable
instance forPktHdr
so thatdump
anddumpBS
could be made usable. - Added not-built-by-default executable
pcap-example
to thepcap.cabal
, with source inexamples/example.hs
. This is expanded version of the old example intest.hs
, which I renamed and moved into theexamples
directory to avoid Cabal trying to rebuild theNetwork.Pcap
modules when compiling the example. - Added
Network.Pcap.breakLoop
andNetwork.Pcap.Base.breakLoop
, exposing thepcap_breakloop
API for terminatingpcap_loop
andpcap_dispatch
early.
- Changed
Network.Pcap.dump
andNetwork.Pcap.dumpBS
to take aPktHdr
instead of aPtr PktHdr
. This changes their types toCallback
andCallbackBS
, respectively, so they can now be used with the various packet capture functions. Before there was no easy way to use them, given the lack of aStorable PktHdr
instance.
- Stopped exporting
toPktHdr
because that interface is now exposed bypeek
from theStorable
instance forPktHdr
.
- Fixed the documentation for
Network.Pcap.Base.loop
,Network.Pcap.loop
, andNetwork.Pcap.loopBS
. They don't actually return the number of packets read. - Fixed corruption of dump files when killing program with
Ctrl-C
, by changingNetwork.Pcap.Base.openDump
to use aForeignPtr
C finalizer that's guaranteed to run.