[package]

name = "pcap"
version = "0.7.0"
authors = ["Sean Bowe <ewillbefull@gmail.com>"]
edition = "2018"
description = "A packet capture API around pcap/wpcap"
keywords = ["pcap", "packet", "sniffing"]
readme = "README.md"
homepage = "https://github.com/ebfull/pcap"
repository = "https://github.com/ebfull/pcap"
documentation = "https://docs.rs/pcap"
license = "MIT OR Apache-2.0"
build = "build.rs"

[dependencies]
libc = "0.2"
clippy = { version = "0.0.*", optional = true }
mio = { version = "0.6", optional = true }
tokio = { version = "0.2", features = ["io-driver"], optional = true }
futures = { version = "0.3", optional = true }

[dev-dependencies]
tempdir = "0.3"
tokio = { version = "0.2", features = ["rt-core"] }

[build-dependencies]
libloading = "0.6"
regex = "1"

[features]
# This feature enables access to the function Capture::stream.
# This is disabled by default, because it depends on a tokio and mio
capture-stream = ["mio", "tokio", "futures"]

# A shortcut to enable all features.
full = ["capture-stream"]

[lib]
name = "pcap"

[[example]]
name = "listenlocalhost"
path = "examples/listenlocalhost.rs"

[[example]]
name = "getdevices"
path = "examples/getdevices.rs"

[[example]]
name = "easylisten"
path = "examples/easylisten.rs"

[[example]]
name = "savefile"
path = "examples/savefile.rs"

[[example]]
name = "getstatistics"
path = "examples/getstatistics.rs"

[[example]]
name = "streamlisten"
path = "examples/streamlisten.rs"
required-features = ["capture-stream"]
