[package]
name = "net_util"
version = "0.1.0"
authors = ["The ChromiumOS Authors"]
edition = "2021"
build = 'build.rs'

[features]
guest-to-host-net-loopback = []
slirp = ["libslirp-sys", "pcap-file"]
slirp-debug = ["slirp"]
slirp-ring-capture = ["slirp"]

[dependencies]
base = { workspace = true }
cfg-if = { workspace = true }
cros_async = { workspace = true }
libc = { workspace = true }
pcap-file = { version = "1.1.0", optional = true }
remain = { workspace = true }
serde = { workspace = true, features = [ "derive" ] }
smallvec = "1"
thiserror = { workspace = true }
virtio_sys = { workspace = true }
zerocopy = { version = "0.8.13", features = ["derive"] }

[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
net_sys = { workspace = true }

[target.'cfg(windows)'.dependencies]
metrics = { workspace = true }
winapi = { version = "0.3", features = ["everything", "std", "impl-default"] }
libslirp-sys = { version = "4.2.1", optional = true }

[build-dependencies]
anyhow = { workspace = true }
prebuilts = { workspace = true }

[dev-dependencies]
serde_json = { workspace = true }
