Skip to content

Commit

Permalink
Revert "chore(packages): use pnet fork until they fix the pselect bug (
Browse files Browse the repository at this point in the history
…#83)"

This reverts commit 351e4dd.
  • Loading branch information
zhangxp1998 committed Jan 7, 2020
1 parent c2d18bd commit 535c949
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 65 deletions.
45 changes: 0 additions & 45 deletions Cargo.lock

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

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ license = "MIT"
exclude = ["src/tests/*", "demo.gif"]

[dependencies]
pnet_bandwhich_fork = "0.23.0"
pnet = "0.23.0"
ipnetwork = "0.15.0"
tui = "0.5"
termion = "1.5"
Expand All @@ -36,7 +36,6 @@ procfs = "0.7.4"

[dev-dependencies]
insta = "0.12.0"
pnet = "0.23.0"
pnet_base = "0.23.0"
cargo-insta = "0.11.0"
packet-builder = "0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use network::{
};
use os::OnSigWinch;

use ::pnet_bandwhich_fork::datalink::{DataLinkReceiver, NetworkInterface};
use ::pnet::datalink::{DataLinkReceiver, NetworkInterface};
use ::std::collections::HashMap;
use ::std::sync::atomic::{AtomicBool, Ordering};
use ::std::sync::{Arc, Mutex};
Expand Down
14 changes: 7 additions & 7 deletions src/network/sniffer.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use ::std::boxed::Box;

use ::pnet_bandwhich_fork::datalink::{DataLinkReceiver, NetworkInterface};
use ::pnet_bandwhich_fork::packet::ethernet::{EtherType, EthernetPacket};
use ::pnet_bandwhich_fork::packet::ip::IpNextHeaderProtocol;
use ::pnet_bandwhich_fork::packet::ipv4::Ipv4Packet;
use ::pnet_bandwhich_fork::packet::tcp::TcpPacket;
use ::pnet_bandwhich_fork::packet::udp::UdpPacket;
use ::pnet_bandwhich_fork::packet::Packet;
use ::pnet::datalink::{DataLinkReceiver, NetworkInterface};
use ::pnet::packet::ethernet::{EtherType, EthernetPacket};
use ::pnet::packet::ip::IpNextHeaderProtocol;
use ::pnet::packet::ipv4::Ipv4Packet;
use ::pnet::packet::tcp::TcpPacket;
use ::pnet::packet::udp::UdpPacket;
use ::pnet::packet::Packet;

use ::ipnetwork::IpNetwork;
use ::std::net::{IpAddr, SocketAddr};
Expand Down
6 changes: 3 additions & 3 deletions src/os/shared.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ::pnet_bandwhich_fork::datalink::Channel::Ethernet;
use ::pnet_bandwhich_fork::datalink::DataLinkReceiver;
use ::pnet_bandwhich_fork::datalink::{self, Config, NetworkInterface};
use ::pnet::datalink::Channel::Ethernet;
use ::pnet::datalink::DataLinkReceiver;
use ::pnet::datalink::{self, Config, NetworkInterface};
use ::std::io::{self, stdin, Write};
use ::termion::event::Event;
use ::termion::input::TermRead;
Expand Down
4 changes: 2 additions & 2 deletions src/tests/cases/raw_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use ::std::net::IpAddr;

use packet_builder::payload::PayloadData;
use packet_builder::*;
use pnet_bandwhich_fork::datalink::DataLinkReceiver;
use pnet_bandwhich_fork::packet::Packet;
use pnet::datalink::DataLinkReceiver;
use pnet::packet::Packet;
use pnet_base::MacAddr;

use crate::tests::cases::test_utils::{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/cases/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::iter;
use crate::network::dns::Client;
use crate::{Opt, OsInputOutput};
use ::termion::event::{Event, Key};
use pnet_bandwhich_fork::datalink::DataLinkReceiver;
use pnet::datalink::DataLinkReceiver;
use std::collections::HashMap;
use std::io::Write;
use std::sync::{Arc, Mutex};
Expand Down
4 changes: 2 additions & 2 deletions src/tests/cases/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ use crate::tests::cases::test_utils::{
};
use packet_builder::payload::PayloadData;
use packet_builder::*;
use pnet_bandwhich_fork::datalink::DataLinkReceiver;
use pnet_bandwhich_fork::packet::Packet;
use pnet::datalink::DataLinkReceiver;
use pnet::packet::Packet;
use pnet_base::MacAddr;

use crate::{start, Opt, OsInputOutput};
Expand Down
4 changes: 2 additions & 2 deletions src/tests/fakes/fake_input.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ::async_trait::async_trait;
use ::ipnetwork::IpNetwork;
use ::pnet_bandwhich_fork::datalink::DataLinkReceiver;
use ::pnet_bandwhich_fork::datalink::NetworkInterface;
use ::pnet::datalink::DataLinkReceiver;
use ::pnet::datalink::NetworkInterface;
use ::std::collections::HashMap;
use ::std::future::Future;
use ::std::net::{IpAddr, Ipv4Addr, SocketAddr};
Expand Down

0 comments on commit 535c949

Please # to comment.