Skip to content

Commit

Permalink
Merge pull request #186 from raphaelts3/fix/macos-compilation
Browse files Browse the repository at this point in the history
Remove dependency to library netdevice
  • Loading branch information
Frky authored Oct 12, 2023
2 parents e9bc2f6 + a0b8572 commit 13c7d2d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
21 changes: 2 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ flate2 = "1.0"
itertools = "0.11.0"
lazy_static = "1.4.0"
log = "0.4.20"
netdevice = "0.1.1"
pcap = "1.1.0"
pcap-file = "2.0.0"
pnet = { version = "0.33.0", features = ["std"] }
Expand Down
4 changes: 2 additions & 2 deletions src/masscanned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ fn main() {
);
return;
};
if iface.flags & (netdevice::IFF_UP.bits() as u32) == 0 {
if !iface.is_up() {
error!("specified interface is DOWN");
return;
}
Expand Down Expand Up @@ -286,7 +286,7 @@ fn main() {
let (mut tx, mut rx) = get_channel(masscanned.iface.unwrap());
loop {
/* 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");
break;
}
Expand Down

0 comments on commit 13c7d2d

Please sign in to comment.