mirror of
https://github.com/ivre/masscanned.git
synced 2025-10-02 06:38:21 +00:00
Merge pull request #186 from raphaelts3/fix/macos-compilation
Remove dependency to library netdevice
This commit is contained in:
commit
13c7d2d3c1
3 changed files with 4 additions and 22 deletions
21
Cargo.lock
generated
21
Cargo.lock
generated
|
@ -97,12 +97,6 @@ version = "1.1.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bitflags"
|
|
||||||
version = "0.7.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "1.3.2"
|
version = "1.3.2"
|
||||||
|
@ -413,9 +407,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.139"
|
version = "0.2.149"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
|
checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libloading"
|
name = "libloading"
|
||||||
|
@ -455,7 +449,6 @@ dependencies = [
|
||||||
"itertools",
|
"itertools",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"log",
|
"log",
|
||||||
"netdevice",
|
|
||||||
"pcap",
|
"pcap",
|
||||||
"pcap-file",
|
"pcap-file",
|
||||||
"pnet",
|
"pnet",
|
||||||
|
@ -481,16 +474,6 @@ dependencies = [
|
||||||
"adler",
|
"adler",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "netdevice"
|
|
||||||
version = "0.1.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "38e2f7ba898cd2fef0e36f91c9cd2bf3b849a2a31510d5f7e1cf515cbf698198"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 0.7.0",
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "no-std-net"
|
name = "no-std-net"
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
|
|
|
@ -30,7 +30,6 @@ flate2 = "1.0"
|
||||||
itertools = "0.11.0"
|
itertools = "0.11.0"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
log = "0.4.20"
|
log = "0.4.20"
|
||||||
netdevice = "0.1.1"
|
|
||||||
pcap = "1.1.0"
|
pcap = "1.1.0"
|
||||||
pcap-file = "2.0.0"
|
pcap-file = "2.0.0"
|
||||||
pnet = { version = "0.33.0", features = ["std"] }
|
pnet = { version = "0.33.0", features = ["std"] }
|
||||||
|
|
|
@ -196,7 +196,7 @@ fn main() {
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
if iface.flags & (netdevice::IFF_UP.bits() as u32) == 0 {
|
if !iface.is_up() {
|
||||||
error!("specified interface is DOWN");
|
error!("specified interface is DOWN");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -286,7 +286,7 @@ fn main() {
|
||||||
let (mut tx, mut rx) = get_channel(masscanned.iface.unwrap());
|
let (mut tx, mut rx) = get_channel(masscanned.iface.unwrap());
|
||||||
loop {
|
loop {
|
||||||
/* check if network interface is still up */
|
/* check if network interface is still up */
|
||||||
if masscanned.iface.unwrap().flags & (netdevice::IFF_UP.bits() as u32) == 0 {
|
if !masscanned.iface.unwrap().is_up() {
|
||||||
error!("interface is DOWN - aborting");
|
error!("interface is DOWN - aborting");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue