forked from rust-pcap/pcap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
110 lines (88 loc) · 2.5 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
[package]
name = "pcap"
version = "2.2.0"
authors = ["Sean Bowe <[email protected]>", "Wojciech Kozlowski <[email protected]>", "Hideki Sekine"]
edition = "2021"
rust-version = "1.63"
description = "A packet capture API around pcap/wpcap"
keywords = ["pcap", "packet", "sniffing"]
readme = "README.md"
homepage = "https://github.com/rust-pcap/pcap"
repository = "https://github.com/rust-pcap/pcap"
documentation = "https://docs.rs/pcap"
license = "MIT OR Apache-2.0"
build = "build.rs"
[dependencies]
bitflags = "1.3"
libc = "0.2"
errno = "0.2"
tokio = { version = "1.0", features = ["net", "rt", "macros", "rt-multi-thread"], optional = true }
futures = { version = "0.3", optional = true }
gat-std = { version = "0.1.1", optional = true }
[target.'cfg(target_os = "windows")'.dependencies]
windows-sys = { version = "0.36.1", features = ["Win32_Foundation", "Win32_Networking_WinSock"] }
[dev-dependencies]
etherparse = "0.13.0"
once_cell = "1.14.0"
mockall = "0.11.4"
tempfile = "3.10"
[target.'cfg(target_os = "windows")'.dev-dependencies]
eui48 = "1.1"
[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
tun-tap = "0.1.3"
[build-dependencies]
libloading = "0.8"
regex = "1"
pkg-config = "0.3"
[features]
# This feature enables access to the function Capture::stream.
# This is disabled by default, because it depends on a tokio
capture-stream = ["tokio", "futures", "windows-sys/Win32_System_Threading"]
lending-iter = ["gat-std"]
[lib]
name = "pcap"
[[example]]
name = "easylisten"
path = "examples/easylisten.rs"
[[example]]
name = "getdevices"
path = "examples/getdevices.rs"
[[example]]
name = "getstatistics"
path = "examples/getstatistics.rs"
[[example]]
name = "iterprint"
path = "examples/iterprint.rs"
[[example]]
name = "lendingiterprint"
path = "examples/lendingiterprint.rs"
required-features = ["lending-iter"]
[[example]]
name = "listenlocalhost"
path = "examples/listenlocalhost.rs"
[[example]]
name = "nfbpfcompile"
path = "examples/nfbpfcompile.rs"
[[example]]
name = "savefile"
path = "examples/savefile.rs"
[[example]]
name = "sendqueue"
path = "examples/sendqueue.rs"
[[example]]
name = "stdin"
path = "examples/stdin.rs"
[[example]]
name = "streamecho"
path = "examples/streamecho.rs"
required-features = ["capture-stream"]
[[example]]
name = "streamlisten"
path = "examples/streamlisten.rs"
required-features = ["capture-stream"]
[[example]]
name = "streamlisten_mt"
path = "examples/streamlisten_mt.rs"
required-features = ["capture-stream"]
[package.metadata.docs.rs]
all-features = true