diff --git a/Cargo.lock b/Cargo.lock index 4e2017a6db..da45912c2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,7 +43,7 @@ version = "0.1.0" dependencies = [ "bitflags 1.3.2", "block-io-wrapper", - "byteorder 1.4.3", + "byteorder", "common", "log", "partitionlib", @@ -59,7 +59,6 @@ version = "0.1.0" dependencies = [ "bitflags 1.3.2", "common", - "netutils", "redox-daemon", "redox_event 0.1.0", "redox_syscall 0.4.1", @@ -72,7 +71,7 @@ source = "git+https://github.com/rw-vanc/acpi.git?branch=cumulative#e4eb93891367 dependencies = [ "bit_field", "bitvec", - "byteorder 1.4.3", + "byteorder", "log", "spinning_top", ] @@ -117,11 +116,6 @@ version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" -[[package]] -name = "arg_parser" -version = "0.1.0" -source = "git+https://gitlab.redox-os.org/redox-os/arg-parser.git#1c434b55f3e1a0375ebcca85b3e88db7378e82fa" - [[package]] name = "arrayvec" version = "0.5.2" @@ -222,12 +216,6 @@ version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" -[[package]] -name = "byteorder" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" - [[package]] name = "byteorder" version = "1.4.3" @@ -332,16 +320,6 @@ dependencies = [ "maybe-uninit", ] -[[package]] -name = "crossbeam-channel" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.16", -] - [[package]] name = "crossbeam-queue" version = "0.3.8" @@ -387,7 +365,6 @@ dependencies = [ "bitflags 1.3.2", "common", "driver-network", - "netutils", "pcid", "redox-daemon", "redox_event 0.1.0", @@ -527,7 +504,7 @@ checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -603,17 +580,6 @@ dependencies = [ "redox_syscall 0.4.1", ] -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "ihdad" version = "0.1.0" @@ -674,7 +640,6 @@ dependencies = [ "bitflags 1.3.2", "common", "driver-network", - "netutils", "pcid", "redox-daemon", "redox_event 0.1.0", @@ -749,12 +714,6 @@ version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - [[package]] name = "maybe-uninit" version = "2.0.0" @@ -767,43 +726,6 @@ version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" -[[package]] -name = "net2" -version = "0.2.37" -source = "git+https://gitlab.redox-os.org/redox-os/net2-rs.git?branch=master#db0604dcb0a355e6b2fa5bcaad8f175bd6aeb5aa" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi", -] - -[[package]] -name = "netutils" -version = "0.1.0" -source = "git+https://gitlab.redox-os.org/redox-os/netutils.git#d1998d5aa2809b7f0c433f2df3125eecfbfa5c86" -dependencies = [ - "arg_parser", - "libc", - "net2", - "ntpclient", - "pbr", - "redox-daemon", - "redox_event 0.1.0", - "redox_syscall 0.3.5", - "redox_termios", - "termion", - "url", -] - -[[package]] -name = "ntpclient" -version = "0.0.1" -source = "git+https://github.com/willem66745/ntpclient-rust#7e3bdf60eb940825789a8da5181025320e3050b0" -dependencies = [ - "byteorder 0.5.3", - "time", -] - [[package]] name = "num-derive" version = "0.3.3" @@ -838,7 +760,7 @@ dependencies = [ "bitflags 1.3.2", "block-io-wrapper", "common", - "crossbeam-channel 0.4.4", + "crossbeam-channel", "futures", "log", "partitionlib", @@ -965,17 +887,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f0b59668fe80c5afe998f0c0bf93322bf2cd66cafeeb80581f291716f3467f2" -[[package]] -name = "pbr" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed5827dfa0d69b6c92493d6c38e633bbaa5937c153d0d7c28bf12313f8c6d514" -dependencies = [ - "crossbeam-channel 0.5.8", - "libc", - "winapi", -] - [[package]] name = "pci_types" version = "0.6.1" @@ -993,7 +904,7 @@ dependencies = [ "bincode", "bit_field", "bitflags 1.3.2", - "byteorder 1.4.3", + "byteorder", "common", "libc", "log", @@ -1017,12 +928,6 @@ dependencies = [ "redox_syscall 0.4.1", ] -[[package]] -name = "percent-encoding" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" - [[package]] name = "pin-project-lite" version = "0.2.13" @@ -1230,7 +1135,6 @@ dependencies = [ "common", "driver-network", "log", - "netutils", "pcid", "redox-daemon", "redox-log", @@ -1246,7 +1150,6 @@ dependencies = [ "common", "driver-network", "log", - "netutils", "pcid", "redox-daemon", "redox-log", @@ -1526,32 +1429,6 @@ dependencies = [ "syn 2.0.31", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "toml" version = "0.5.11" @@ -1595,27 +1472,12 @@ dependencies = [ "winnow", ] -[[package]] -name = "unicode-bidi" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" - [[package]] name = "unicode-ident" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.10.1" @@ -1628,17 +1490,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna", - "matches", - "percent-encoding", -] - [[package]] name = "usbctl" version = "0.1.0" @@ -1799,7 +1650,6 @@ dependencies = [ "driver-network", "futures", "log", - "netutils", "pcid", "redox-daemon", "redox_syscall 0.4.1", @@ -1816,12 +1666,6 @@ dependencies = [ "utf8parse", ] -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1995,7 +1839,7 @@ dependencies = [ "bitflags 1.3.2", "chashmap", "common", - "crossbeam-channel 0.4.4", + "crossbeam-channel", "futures", "lazy_static", "log", diff --git a/Cargo.toml b/Cargo.toml index 275cb4b681..2d7456de34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,6 +42,5 @@ lto = "fat" [patch.crates-io] mio = { git = "https://gitlab.redox-os.org/redox-os/mio.git", branch = "redox-unix" } -net2 = { git = "https://gitlab.redox-os.org/redox-os/net2-rs.git", branch = "master" } orbclient = { git = "https://gitlab.redox-os.org/redox-os/orbclient.git", version = "0.3.44" } redox-daemon = { git = "https://gitlab.redox-os.org/redox-os/redox-daemon.git" } diff --git a/alxd/Cargo.toml b/alxd/Cargo.toml index 8830c189f8..3b509dbf64 100644 --- a/alxd/Cargo.toml +++ b/alxd/Cargo.toml @@ -5,7 +5,6 @@ edition = "2018" [dependencies] bitflags = "1" -netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git" } redox_event = { git = "https://gitlab.redox-os.org/redox-os/event.git" } redox_syscall = "0.4" redox-daemon = "0.1" diff --git a/alxd/src/device/mod.rs b/alxd/src/device/mod.rs index e3d8ff4996..3a20c9fc81 100644 --- a/alxd/src/device/mod.rs +++ b/alxd/src/device/mod.rs @@ -7,7 +7,6 @@ use syscall::io::{Io, Mmio}; use syscall::scheme; use common::dma::Dma; -use netutils::setcfg; use self::regs::*; @@ -1706,7 +1705,6 @@ impl Alx { let mac = self.get_perm_macaddr(); println!(" - MAC: {:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); - let _ = setcfg("mac", &format!("{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5])); if ! self.get_phy_info() { println!(" - Identify PHY failed"); diff --git a/alxd/src/main.rs b/alxd/src/main.rs index 9bd0d6edb3..ef1f745681 100644 --- a/alxd/src/main.rs +++ b/alxd/src/main.rs @@ -4,7 +4,6 @@ #![feature(concat_idents)] extern crate event; -extern crate netutils; extern crate syscall; use std::cell::RefCell; diff --git a/e1000d/Cargo.toml b/e1000d/Cargo.toml index 8a958db6ca..023d95b5d4 100644 --- a/e1000d/Cargo.toml +++ b/e1000d/Cargo.toml @@ -5,7 +5,6 @@ edition = "2018" [dependencies] bitflags = "1" -netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git" } redox-daemon = "0.1" redox_event = { git = "https://gitlab.redox-os.org/redox-os/event.git" } redox_syscall = "0.4" diff --git a/e1000d/src/device.rs b/e1000d/src/device.rs index d6e89495f8..7da6965d13 100644 --- a/e1000d/src/device.rs +++ b/e1000d/src/device.rs @@ -2,7 +2,6 @@ use std::convert::TryInto; use std::{cmp, mem, ptr, slice}; use driver_network::NetworkAdapter; -use netutils::setcfg; use syscall::error::Result; @@ -296,13 +295,6 @@ impl Intel8254x { ) ); self.mac_address = mac; - let _ = setcfg( - "mac", - &format!( - "{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] - ), - ); // // MTA => 0; diff --git a/ixgbed/Cargo.toml b/ixgbed/Cargo.toml index 780fc29e08..c9399ace7d 100644 --- a/ixgbed/Cargo.toml +++ b/ixgbed/Cargo.toml @@ -5,7 +5,6 @@ edition = "2021" [dependencies] bitflags = "1.0" -netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git" } redox_event = { git = "https://gitlab.redox-os.org/redox-os/event.git" } redox_syscall = "0.4" redox-daemon = "0.1" diff --git a/ixgbed/src/device.rs b/ixgbed/src/device.rs index 690dfb1be0..b36309e14f 100644 --- a/ixgbed/src/device.rs +++ b/ixgbed/src/device.rs @@ -6,7 +6,6 @@ use driver_network::NetworkAdapter; use syscall::error::Result; use common::dma::Dma; -use netutils::setcfg; use crate::ixgbe::*; @@ -285,13 +284,6 @@ impl Intel8259x { mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] ); - let _ = setcfg( - "mac", - &format!( - "{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}\n", - mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] - ), - ); self.mac_address = mac; // section 4.6.3 - wait for EEPROM auto read completion diff --git a/rtl8139d/Cargo.toml b/rtl8139d/Cargo.toml index e296be4330..b03dcea6ef 100644 --- a/rtl8139d/Cargo.toml +++ b/rtl8139d/Cargo.toml @@ -6,7 +6,6 @@ edition = "2018" [dependencies] bitflags = "1" log = "0.4" -netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git" } redox_event = { git = "https://gitlab.redox-os.org/redox-os/event.git" } redox_syscall = "0.4" redox-daemon = "0.1" diff --git a/rtl8139d/src/device.rs b/rtl8139d/src/device.rs index 746ecd5646..4b6ce854f0 100644 --- a/rtl8139d/src/device.rs +++ b/rtl8139d/src/device.rs @@ -6,7 +6,6 @@ use syscall::error::{Error, EIO, EMSGSIZE, Result}; use syscall::io::{Mmio, Io, ReadOnly}; use common::dma::Dma; -use netutils::setcfg; const RX_BUFFER_SIZE: usize = 64 * 1024; @@ -272,7 +271,6 @@ impl Rtl8139 { mac_high as u8, (mac_high >> 8) as u8]; println!(" - MAC: {:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); - let _ = setcfg("mac", &format!("{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5])); self.mac_address = mac; // Reset - this will disable tx and rx, reinitialize FIFOs, and set the system buffer pointer to the initial value diff --git a/rtl8168d/Cargo.toml b/rtl8168d/Cargo.toml index c04b5c8478..ca59181391 100644 --- a/rtl8168d/Cargo.toml +++ b/rtl8168d/Cargo.toml @@ -6,7 +6,6 @@ edition = "2018" [dependencies] bitflags = "1" log = "0.4" -netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git" } redox_event = { git = "https://gitlab.redox-os.org/redox-os/event.git" } redox_syscall = "0.4" redox-daemon = "0.1" diff --git a/rtl8168d/src/device.rs b/rtl8168d/src/device.rs index 5dd76a8504..25b6aea64a 100644 --- a/rtl8168d/src/device.rs +++ b/rtl8168d/src/device.rs @@ -6,7 +6,6 @@ use syscall::error::{Error, Result, EMSGSIZE}; use syscall::io::{Mmio, Io, ReadOnly}; use common::dma::Dma; -use netutils::setcfg; #[repr(packed)] struct Regs { @@ -232,7 +231,6 @@ impl Rtl8168 { mac_high as u8, (mac_high >> 8) as u8]; println!(" - MAC: {:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); - let _ = setcfg("mac", &format!("{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}-{:>02X}\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5])); self.mac_address = mac; // Reset - this will disable tx and rx, reinitialize FIFOs, and set the system buffer pointer to the initial value diff --git a/virtio-netd/Cargo.toml b/virtio-netd/Cargo.toml index ae6927fb33..dc622bae92 100644 --- a/virtio-netd/Cargo.toml +++ b/virtio-netd/Cargo.toml @@ -15,4 +15,3 @@ driver-network = { path = "../driver-network" } redox-daemon = "0.1" redox_syscall = "0.4" -netutils = { git = "https://gitlab.redox-os.org/redox-os/netutils.git" } diff --git a/virtio-netd/src/main.rs b/virtio-netd/src/main.rs index ecda97d2cd..8357e3bfed 100644 --- a/virtio-netd/src/main.rs +++ b/virtio-netd/src/main.rs @@ -95,19 +95,6 @@ fn deamon(daemon: redox_daemon::Daemon) -> Result<(), Box let device = VirtioNet::new(mac_address, rx_queue, tx_queue); let mut scheme = NetworkScheme::new(device, "network"); - let _ = netutils::setcfg( - "mac", - &format!( - "{:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}:{:>02X}", - mac_address[0], - mac_address[1], - mac_address[2], - mac_address[3], - mac_address[4], - mac_address[5] - ), - ); - let mut event_queue = File::open("event:")?; event_queue.write(&syscall::Event { id: scheme.event_handle() as usize,