Merge branch 'master' into 'master'

Update smoltcp

Closes #30

See merge request redox-os/netstack!30
This commit is contained in:
Jeremy Soller
2018-06-19 13:58:02 +00:00
7 changed files with 334 additions and 73 deletions
Generated
+271 -28
View File
@@ -35,6 +35,15 @@ name = "byteorder"
version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bytes"
version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "cfg-if"
version = "0.1.3"
@@ -49,6 +58,15 @@ dependencies = [
"crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-deque"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-epoch 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-epoch"
version = "0.3.1"
@@ -63,6 +81,19 @@ dependencies = [
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-epoch"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-utils"
version = "0.2.2"
@@ -71,6 +102,14 @@ dependencies = [
"cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "crossbeam-utils"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "dns-parser"
version = "0.7.1"
@@ -83,7 +122,7 @@ dependencies = [
[[package]]
name = "extra"
version = "0.1.0"
source = "git+https://gitlab.redox-os.org/redox-os/libextra.git#f38608acd9cc00e1c8bd41a1a96d31becf239913"
source = "git+https://gitlab.redox-os.org/redox-os/libextra.git#0b50f3f2127fa62b1fe74090feffbae357266eac"
[[package]]
name = "fuchsia-zircon"
@@ -99,6 +138,11 @@ name = "fuchsia-zircon-sys"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "futures"
version = "0.1.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "gcc"
version = "0.3.54"
@@ -147,6 +191,15 @@ dependencies = [
"unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "iovec"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "kernel32-sys"
version = "0.2.2"
@@ -171,9 +224,14 @@ name = "lazy_static"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "lazycell"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.2.41"
version = "0.2.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -181,12 +239,12 @@ name = "log"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "log"
version = "0.4.1"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -194,7 +252,7 @@ dependencies = [
[[package]]
name = "managed"
version = "0.5.1"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -215,21 +273,62 @@ dependencies = [
"log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "mio"
version = "0.6.14"
source = "git+https://gitlab.redox-os.org/redox-os/mio#1339f362be63592de538a4ea52367e820e846988"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"miow 0.3.1 (git+https://gitlab.redox-os.org/redox-os/miow?rev=5b10500)",
"net2 0.2.32 (git+https://gitlab.redox-os.org/redox-os/net2-rs)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "miow"
version = "0.3.1"
source = "git+https://gitlab.redox-os.org/redox-os/miow?rev=5b10500#5b10500df2c560245d532e77c54a8b8b2d15cfd5"
dependencies = [
"socket2 0.3.7 (git+https://github.com/redox-os/socket2-rs)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "net2"
version = "0.2.32"
source = "git+https://gitlab.redox-os.org/redox-os/net2-rs#0eae9193ba04270a4ded81c0d3c76d918c3bbcc6"
dependencies = [
"cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "netutils"
version = "0.1.0"
source = "git+https://gitlab.redox-os.org/redox-os/netutils.git#f1187fae0a1a02f532e72e1126dcb17bde64bd00"
source = "git+https://gitlab.redox-os.org/redox-os/netutils.git#c728870d6a1d9d8938117798e6caab22b09c37a6"
dependencies = [
"arg_parser 0.1.0 (git+https://gitlab.redox-os.org/redox-os/arg-parser.git)",
"extra 0.1.0 (git+https://gitlab.redox-os.org/redox-os/libextra.git)",
"hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper-rustls 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"mio 0.6.14 (git+https://gitlab.redox-os.org/redox-os/mio)",
"ntpclient 0.0.1 (git+https://github.com/willem66745/ntpclient-rust)",
"pbr 1.0.1 (git+https://github.com/a8m/pb)",
"redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.6 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-reactor 0.1.1 (git+https://gitlab.redox-os.org/redox-os/tokio)",
]
[[package]]
@@ -251,16 +350,16 @@ name = "num_cpus"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "pbr"
version = "1.0.1"
source = "git+https://github.com/a8m/pb#e1df7361a08e2c7e210a3e483e3086bfe62dfe71"
source = "git+https://github.com/a8m/pb#bff135f7eed7931a1103e593c74160d28fdd2314"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -282,8 +381,8 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -301,7 +400,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -309,7 +408,7 @@ dependencies = [
[[package]]
name = "redox_event"
version = "0.1.0"
source = "git+https://gitlab.redox-os.org/redox-os/event.git#e9bf8ee4622cb82af2a10032ed711174b2188afd"
source = "git+https://gitlab.redox-os.org/redox-os/event.git#c31e3d3d5f44d60ff9fec2b1ee58b982e72c0d77"
dependencies = [
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -324,13 +423,13 @@ dependencies = [
"netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git)",
"redox_event 0.1.0 (git+https://gitlab.redox-os.org/redox-os/event.git)",
"redox_syscall 0.1.40 (git+https://gitlab.redox-os.org/redox-os/syscall.git)",
"smoltcp 0.4.0 (git+https://github.com/m-labs/smoltcp.git?rev=c418b60b5db93753999ae51d33ec4dc1d1631c69)",
"smoltcp 0.4.0 (git+https://github.com/m-labs/smoltcp.git?rev=d23aee483f2dc78e8070d2ad53e400cd0dcb9ae1)",
]
[[package]]
name = "redox_syscall"
version = "0.1.40"
source = "git+https://gitlab.redox-os.org/redox-os/syscall.git#0ab552da9a9587b360b5d9991ed9921300e5667b"
source = "git+https://gitlab.redox-os.org/redox-os/syscall.git#495b09740a6ffbe01d10097aac4cf333dd392e69"
[[package]]
name = "redox_syscall"
@@ -352,7 +451,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"untrusted 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -380,13 +479,30 @@ name = "scopeguard"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "slab"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "smoltcp"
version = "0.4.0"
source = "git+https://github.com/m-labs/smoltcp.git?rev=c418b60b5db93753999ae51d33ec4dc1d1631c69#c418b60b5db93753999ae51d33ec4dc1d1631c69"
source = "git+https://github.com/m-labs/smoltcp.git?rev=d23aee483f2dc78e8070d2ad53e400cd0dcb9ae1#d23aee483f2dc78e8070d2ad53e400cd0dcb9ae1"
dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"managed 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"managed 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "socket2"
version = "0.3.7"
source = "git+https://github.com/redox-os/socket2-rs#3543915f09e41f6e010d4d9e2d5217b27faf5e70"
dependencies = [
"cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -394,7 +510,7 @@ name = "termion"
version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -404,9 +520,115 @@ name = "time"
version = "0.1.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "tokio"
version = "0.1.6"
source = "git+https://gitlab.redox-os.org/redox-os/tokio#4db6ce75b5059c42cbbad56d7c441da19fe18c1a"
dependencies = [
"futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"mio 0.6.14 (git+https://gitlab.redox-os.org/redox-os/mio)",
"tokio-executor 0.1.2 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-fs 0.1.0 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-io 0.1.6 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-reactor 0.1.1 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-tcp 0.1.0 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-threadpool 0.1.3 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-timer 0.2.3 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-udp 0.1.0 (git+https://gitlab.redox-os.org/redox-os/tokio)",
]
[[package]]
name = "tokio-executor"
version = "0.1.2"
source = "git+https://gitlab.redox-os.org/redox-os/tokio#4db6ce75b5059c42cbbad56d7c441da19fe18c1a"
dependencies = [
"futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "tokio-fs"
version = "0.1.0"
source = "git+https://gitlab.redox-os.org/redox-os/tokio#4db6ce75b5059c42cbbad56d7c441da19fe18c1a"
dependencies = [
"futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-io 0.1.6 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-threadpool 0.1.3 (git+https://gitlab.redox-os.org/redox-os/tokio)",
]
[[package]]
name = "tokio-io"
version = "0.1.6"
source = "git+https://gitlab.redox-os.org/redox-os/tokio#4db6ce75b5059c42cbbad56d7c441da19fe18c1a"
dependencies = [
"bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "tokio-reactor"
version = "0.1.1"
source = "git+https://gitlab.redox-os.org/redox-os/tokio#4db6ce75b5059c42cbbad56d7c441da19fe18c1a"
dependencies = [
"futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mio 0.6.14 (git+https://gitlab.redox-os.org/redox-os/mio)",
"slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-executor 0.1.2 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-io 0.1.6 (git+https://gitlab.redox-os.org/redox-os/tokio)",
]
[[package]]
name = "tokio-tcp"
version = "0.1.0"
source = "git+https://gitlab.redox-os.org/redox-os/tokio#4db6ce75b5059c42cbbad56d7c441da19fe18c1a"
dependencies = [
"bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mio 0.6.14 (git+https://gitlab.redox-os.org/redox-os/mio)",
"tokio-io 0.1.6 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-reactor 0.1.1 (git+https://gitlab.redox-os.org/redox-os/tokio)",
]
[[package]]
name = "tokio-threadpool"
version = "0.1.3"
source = "git+https://gitlab.redox-os.org/redox-os/tokio#4db6ce75b5059c42cbbad56d7c441da19fe18c1a"
dependencies = [
"crossbeam-deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-executor 0.1.2 (git+https://gitlab.redox-os.org/redox-os/tokio)",
]
[[package]]
name = "tokio-timer"
version = "0.2.3"
source = "git+https://gitlab.redox-os.org/redox-os/tokio#4db6ce75b5059c42cbbad56d7c441da19fe18c1a"
dependencies = [
"futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-executor 0.1.2 (git+https://gitlab.redox-os.org/redox-os/tokio)",
]
[[package]]
name = "tokio-udp"
version = "0.1.0"
source = "git+https://gitlab.redox-os.org/redox-os/tokio#4db6ce75b5059c42cbbad56d7c441da19fe18c1a"
dependencies = [
"bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mio 0.6.14 (git+https://gitlab.redox-os.org/redox-os/mio)",
"tokio-io 0.1.6 (git+https://gitlab.redox-os.org/redox-os/tokio)",
"tokio-reactor 0.1.1 (git+https://gitlab.redox-os.org/redox-os/tokio)",
]
[[package]]
@@ -486,7 +708,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi"
version = "0.3.4"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -515,30 +737,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789"
"checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855"
"checksum byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "74c0b906e9446b0a2e4f760cdb3fa4b2c48cdc6db8766a845c54b6ff063fd2e9"
"checksum bytes 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7dd32989a66957d3f0cba6588f15d4281a733f4e9ffc43fcd2385f57d3bf99ff"
"checksum cfg-if 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "405216fd8fe65f718daa7102ea808a946b6ce40c742998fbfd3463645552de18"
"checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3"
"checksum crossbeam-deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fe8153ef04a7594ded05b427ffad46ddeaf22e63fd48d42b3e1e3bb4db07cae7"
"checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150"
"checksum crossbeam-epoch 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2af0e75710d6181e234c8ecc79f14a97907850a541b13b0be1dd10992f2e4620"
"checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9"
"checksum crossbeam-utils 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d636a8b3bcc1b409d7ffd3facef8f21dcb4009626adbd0c5e6c4305c07253c7b"
"checksum dns-parser 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7020f6760aea312d43d23cb83bf6c0c49f162541db8b02bf95209ac51dc253d"
"checksum extra 0.1.0 (git+https://gitlab.redox-os.org/redox-os/libextra.git)" = "<none>"
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
"checksum futures 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "1a70b146671de62ec8c8ed572219ca5d594d9b06c0b364d5e67b722fc559b48c"
"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb"
"checksum httparse 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c2f407128745b78abc95c0ffbe4e5d37427fdc0d45470710cfef8c44522a2e37"
"checksum hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)" = "368cb56b2740ebf4230520e2b90ebb0461e69034d85d1945febd9b3971426db2"
"checksum hyper-rustls 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "04535774f79684c99528944ebdb89756c945c027e55ce52faa245879d836c8fb"
"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d"
"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
"checksum lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e6412c5e2ad9584b0b8e979393122026cdd6d2a80b933f890dcd694ddbe73739"
"checksum libc 0.2.41 (registry+https://github.com/rust-lang/crates.io-index)" = "ac8ebf8343a981e2fa97042b14768f02ed3e1d602eac06cae6166df3c8ced206"
"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef"
"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1"
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2"
"checksum managed 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "43e2737ecabe4ae36a68061398bf27d2bfd0763f4c3c837a398478459494c4b7"
"checksum log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6fddaa003a65722a7fb9e26b0ce95921fe4ba590542ced664d8ce2fa26f9f3ac"
"checksum managed 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba6713e624266d7600e9feae51b1926c6a6a6bebb18ec5a8e11a5f1d5661baba"
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0"
"checksum mio 0.6.14 (git+https://gitlab.redox-os.org/redox-os/mio)" = "<none>"
"checksum miow 0.3.1 (git+https://gitlab.redox-os.org/redox-os/miow?rev=5b10500)" = "<none>"
"checksum net2 0.2.32 (git+https://gitlab.redox-os.org/redox-os/net2-rs)" = "<none>"
"checksum netutils 0.1.0 (git+https://gitlab.redox-os.org/redox-os/netutils.git)" = "<none>"
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
"checksum ntpclient 0.0.1 (git+https://github.com/willem66745/ntpclient-rust)" = "<none>"
@@ -557,9 +789,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum rustls 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17727f4b991294da2c84d75a43c003151ff58072212768800f66c56ee46dca43"
"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"
"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
"checksum smoltcp 0.4.0 (git+https://github.com/m-labs/smoltcp.git?rev=c418b60b5db93753999ae51d33ec4dc1d1631c69)" = "<none>"
"checksum slab 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdeff4cd9ecff59ec7e3744cbca73dfe5ac35c2aedb2cfba8a1c715a18912e9d"
"checksum smoltcp 0.4.0 (git+https://github.com/m-labs/smoltcp.git?rev=d23aee483f2dc78e8070d2ad53e400cd0dcb9ae1)" = "<none>"
"checksum socket2 0.3.7 (git+https://github.com/redox-os/socket2-rs)" = "<none>"
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
"checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b"
"checksum tokio 0.1.6 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "<none>"
"checksum tokio-executor 0.1.2 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "<none>"
"checksum tokio-fs 0.1.0 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "<none>"
"checksum tokio-io 0.1.6 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "<none>"
"checksum tokio-reactor 0.1.1 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "<none>"
"checksum tokio-tcp 0.1.0 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "<none>"
"checksum tokio-threadpool 0.1.3 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "<none>"
"checksum tokio-timer 0.2.3 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "<none>"
"checksum tokio-udp 0.1.0 (git+https://gitlab.redox-os.org/redox-os/tokio)" = "<none>"
"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887"
"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33"
@@ -571,7 +814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum webpki 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e499345fc4c6b7c79a5b8756d4592c4305510a13512e79efafe00dfbd67bbac6"
"checksum webpki-roots 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5bfb3f50499f21ad2317f442845e3b5805b007f1e728f59885c99e61b8c181a7"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3"
"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+1 -1
View File
@@ -28,7 +28,7 @@ features = ["release_max_level_off"]
[dependencies.smoltcp]
git = "https://github.com/m-labs/smoltcp.git"
rev = "c418b60b5db93753999ae51d33ec4dc1d1631c69"
rev = "d23aee483f2dc78e8070d2ad53e400cd0dcb9ae1"
default-features = false
features = ["std", "socket-raw", "proto-ipv4", "socket-udp", "socket-tcp", "socket-icmp"]
+17 -18
View File
@@ -1,4 +1,4 @@
use smoltcp::socket::{IcmpEndpoint, IcmpPacketBuffer, IcmpSocket, IcmpSocketBuffer, SocketHandle};
use smoltcp::socket::{IcmpEndpoint, IcmpPacketMetadata, IcmpSocket, IcmpSocketBuffer, SocketHandle};
use smoltcp::wire::{Icmpv4Packet, Icmpv4Repr, IpAddress, IpEndpoint};
use std::mem;
use std::str;
@@ -86,16 +86,15 @@ impl<'a, 'b> SchemeSocket for IcmpSocket<'a, 'b> {
let ip =
IpAddress::from_str(addr).map_err(|_| syscall::Error::new(syscall::EINVAL))?;
let mut rx_packets = Vec::with_capacity(Smolnetd::SOCKET_BUFFER_SIZE);
let mut tx_packets = Vec::with_capacity(Smolnetd::SOCKET_BUFFER_SIZE);
for _ in 0..Smolnetd::SOCKET_BUFFER_SIZE {
rx_packets.push(IcmpPacketBuffer::new(vec![0; NetworkDevice::MTU]));
tx_packets.push(IcmpPacketBuffer::new(vec![0; NetworkDevice::MTU]));
}
let socket = IcmpSocket::new(
IcmpSocketBuffer::new(rx_packets),
IcmpSocketBuffer::new(tx_packets),
IcmpSocketBuffer::new(
vec![IcmpPacketMetadata::EMPTY; Smolnetd::SOCKET_BUFFER_SIZE],
vec![0; NetworkDevice::MTU * Smolnetd::SOCKET_BUFFER_SIZE]
),
IcmpSocketBuffer::new(
vec![IcmpPacketMetadata::EMPTY; Smolnetd::SOCKET_BUFFER_SIZE],
vec![0; NetworkDevice::MTU * Smolnetd::SOCKET_BUFFER_SIZE]
)
);
let handle = socket_set.add(socket);
let mut icmp_socket = socket_set.get::<IcmpSocket>(handle);
@@ -119,15 +118,15 @@ impl<'a, 'b> SchemeSocket for IcmpSocket<'a, 'b> {
let ip =
IpAddress::from_str(addr).map_err(|_| syscall::Error::new(syscall::EINVAL))?;
let mut rx_packets = Vec::with_capacity(Smolnetd::SOCKET_BUFFER_SIZE);
let mut tx_packets = Vec::with_capacity(Smolnetd::SOCKET_BUFFER_SIZE);
for _ in 0..Smolnetd::SOCKET_BUFFER_SIZE {
rx_packets.push(IcmpPacketBuffer::new(vec![0; NetworkDevice::MTU]));
}
let socket = IcmpSocket::new(
IcmpSocketBuffer::new(rx_packets),
IcmpSocketBuffer::new(tx_packets),
IcmpSocketBuffer::new(
vec![IcmpPacketMetadata::EMPTY; Smolnetd::SOCKET_BUFFER_SIZE],
vec![0; NetworkDevice::MTU * Smolnetd::SOCKET_BUFFER_SIZE]
),
IcmpSocketBuffer::new(
vec![IcmpPacketMetadata::EMPTY; Smolnetd::SOCKET_BUFFER_SIZE],
vec![0; NetworkDevice::MTU * Smolnetd::SOCKET_BUFFER_SIZE]
)
);
let handle = socket_set.add(socket);
let mut icmp_socket = socket_set.get::<IcmpSocket>(handle);
+9 -9
View File
@@ -1,4 +1,4 @@
use smoltcp::socket::{RawPacketBuffer, RawSocket, RawSocketBuffer, SocketHandle};
use smoltcp::socket::{RawPacketMetadata, RawSocket, RawSocketBuffer, SocketHandle};
use smoltcp::wire::{IpProtocol, IpVersion};
use std::str;
use syscall::{Error as SyscallError, Result as SyscallResult};
@@ -61,14 +61,14 @@ impl<'a, 'b> SchemeSocket for RawSocket<'a, 'b> {
let proto =
u8::from_str_radix(path, 16).or_else(|_| Err(SyscallError::new(syscall::ENOENT)))?;
let mut rx_packets = Vec::with_capacity(Smolnetd::SOCKET_BUFFER_SIZE);
let mut tx_packets = Vec::with_capacity(Smolnetd::SOCKET_BUFFER_SIZE);
for _ in 0..Smolnetd::SOCKET_BUFFER_SIZE {
rx_packets.push(RawPacketBuffer::new(vec![0; NetworkDevice::MTU]));
tx_packets.push(RawPacketBuffer::new(vec![0; NetworkDevice::MTU]));
}
let rx_buffer = RawSocketBuffer::new(rx_packets);
let tx_buffer = RawSocketBuffer::new(tx_packets);
let rx_buffer = RawSocketBuffer::new(
vec![RawPacketMetadata::EMPTY; Smolnetd::SOCKET_BUFFER_SIZE],
vec![0; NetworkDevice::MTU * Smolnetd::SOCKET_BUFFER_SIZE]
);
let tx_buffer = RawSocketBuffer::new(
vec![RawPacketMetadata::EMPTY; Smolnetd::SOCKET_BUFFER_SIZE],
vec![0; NetworkDevice::MTU * Smolnetd::SOCKET_BUFFER_SIZE]
);
let ip_socket = RawSocket::new(
IpVersion::Ipv4,
IpProtocol::from(proto),
+5 -3
View File
@@ -1,6 +1,6 @@
use netutils::getcfg;
use smoltcp;
use smoltcp::iface::{EthernetInterface, EthernetInterfaceBuilder, NeighborCache};
use smoltcp::iface::{EthernetInterface, EthernetInterfaceBuilder, NeighborCache, Routes};
use smoltcp::socket::SocketSet as SmoltcpSocketSet;
use smoltcp::time::{Duration, Instant};
use smoltcp::wire::{EthernetAddress, IpAddress, IpCidr, IpEndpoint, Ipv4Address};
@@ -31,7 +31,7 @@ mod icmp;
mod netcfg;
type SocketSet = SmoltcpSocketSet<'static, 'static, 'static>;
type Interface = Rc<RefCell<EthernetInterface<'static, 'static, NetworkDevice>>>;
type Interface = Rc<RefCell<EthernetInterface<'static, 'static, 'static, NetworkDevice>>>;
const MAX_DURATION: Duration = Duration { millis: ::std::u64::MAX };
const MIN_DURATION: Duration = Duration { millis: 0 };
@@ -89,11 +89,13 @@ impl Smolnetd {
hardware_addr,
Rc::clone(&buffer_pool),
);
let mut routes = Routes::new(BTreeMap::new());
routes.add_default_ipv4_route(default_gw).expect("Failed to add default gateway");
let iface = EthernetInterfaceBuilder::new(network_device)
.neighbor_cache(NeighborCache::new(BTreeMap::new()))
.ethernet_addr(hardware_addr)
.ip_addrs(protocol_addrs)
.ipv4_gateway(default_gw)
.routes(routes)
.finalize();
let iface = Rc::new(RefCell::new(iface));
let socket_set = Rc::new(RefCell::new(SocketSet::new(vec![])));
+22 -5
View File
@@ -2,7 +2,7 @@
mod nodes;
mod notifier;
use smoltcp::wire::{EthernetAddress, IpCidr, Ipv4Address};
use smoltcp::wire::{IpAddress, EthernetAddress, IpCidr, Ipv4Address};
use std::cell::RefCell;
use std::collections::BTreeMap;
use std::fs::File;
@@ -23,6 +23,11 @@ use super::{post_fevent, Interface};
const WRITE_BUFFER_MAX_SIZE: usize = 0xffff;
fn gateway_cidr() -> IpCidr {
// TODO: const fn
IpCidr::new(IpAddress::v4(0, 0, 0, 0), 0)
}
fn parse_default_gw(value: &str) -> SyscallResult<Ipv4Address> {
let mut routes = value.lines();
if let Some(route) = routes.next() {
@@ -75,7 +80,11 @@ fn mk_root_node(iface: Interface, notifier: NotifierRef, dns_config: DNSConfigRe
"route" => {
"list" => {
ro [iface] || {
if let Some(ip) = iface.borrow().ipv4_gateway() {
let mut gateway = None;
iface.borrow_mut().routes_mut().update(|map| {
gateway = map.get(&gateway_cidr()).map(|route| route.via_router);
});
if let Some(ip) = gateway {
format!("default via {}\n", ip)
} else {
String::new()
@@ -98,7 +107,9 @@ fn mk_root_node(iface: Interface, notifier: NotifierRef, dns_config: DNSConfigRe
}
|cur_value| {
if let Some(default_gw) = *cur_value {
iface.borrow_mut().set_ipv4_gateway(Some(default_gw));
if iface.borrow_mut().routes_mut().add_default_ipv4_route(default_gw).is_err() {
return Err(SyscallError::new(syscall::EINVAL));
}
notifier.borrow_mut().schedule_notify("route/list");
Ok(())
} else {
@@ -123,10 +134,16 @@ fn mk_root_node(iface: Interface, notifier: NotifierRef, dns_config: DNSConfigRe
|cur_value| {
if let Some(default_gw) = *cur_value {
let mut iface = iface.borrow_mut();
if iface.ipv4_gateway() != Some(default_gw) {
let mut gateway = None;
iface.routes_mut().update(|map| {
gateway = map.get(&gateway_cidr()).map(|route| route.via_router);
});
if gateway != Some(IpAddress::Ipv4(default_gw)) {
return Err(SyscallError::new(syscall::EINVAL));
}
iface.set_ipv4_gateway(None);
iface.routes_mut().update(|map| {
map.remove(&gateway_cidr());
});
notifier.borrow_mut().schedule_notify("route/list");
Ok(())
} else {
+9 -9
View File
@@ -1,4 +1,4 @@
use smoltcp::socket::{SocketHandle, UdpPacketBuffer, UdpSocket, UdpSocketBuffer};
use smoltcp::socket::{SocketHandle, UdpPacketMetadata, UdpSocket, UdpSocketBuffer};
use smoltcp::wire::IpEndpoint;
use std::str;
use syscall::{Error as SyscallError, Result as SyscallResult};
@@ -66,14 +66,14 @@ impl<'a, 'b> SchemeSocket for UdpSocket<'a, 'b> {
return Err(SyscallError::new(syscall::EACCES));
}
let mut rx_packets = Vec::with_capacity(Smolnetd::SOCKET_BUFFER_SIZE);
let mut tx_packets = Vec::with_capacity(Smolnetd::SOCKET_BUFFER_SIZE);
for _ in 0..Smolnetd::SOCKET_BUFFER_SIZE {
rx_packets.push(UdpPacketBuffer::new(vec![0; NetworkDevice::MTU]));
tx_packets.push(UdpPacketBuffer::new(vec![0; NetworkDevice::MTU]));
}
let rx_buffer = UdpSocketBuffer::new(rx_packets);
let tx_buffer = UdpSocketBuffer::new(tx_packets);
let rx_buffer = UdpSocketBuffer::new(
vec![UdpPacketMetadata::EMPTY; Smolnetd::SOCKET_BUFFER_SIZE],
vec![0; NetworkDevice::MTU * Smolnetd::SOCKET_BUFFER_SIZE]
);
let tx_buffer = UdpSocketBuffer::new(
vec![UdpPacketMetadata::EMPTY; Smolnetd::SOCKET_BUFFER_SIZE],
vec![0; NetworkDevice::MTU * Smolnetd::SOCKET_BUFFER_SIZE]
);
let udp_socket = UdpSocket::new(rx_buffer, tx_buffer);
if local_endpoint.port == 0 {