Continuing my quest to learn Redox internals and Rust, I am looking at how schemes work particularity with networking. I have a qemu network running with the default IP address from the Makefile and when I ping 10.58.58.2 I get
Looking at the wiki on network schemes I should access TCP with tcp:/// scheme but I am not clear on how to do this. Is there a simple example for creating a tcp connection, or using schemes in general? Also looking at main.rs for TCP or ethernet.rs it is not clear how to set subnet mask or gateway.
Sorry if things aren’t there yet, just trying to learn.
The tcp: scheme can be used to read/write from the TCP stream. It is actually not more complex than that, reading N bytes will simply poll N bytes from the TCP stream. Writing will simply send a package.
set subnet mask or gateway.
You can pass bit flags when opening the scheme! See mode.
I agree that the docs on TCP are quite limited right now. And this is certainly something we can improve on.
I am sure that you have a long list to tasks and to-do’s, but it would be nice to have a working low level network stack. Once the basics are working I am happy to take on higher level networking services like DNS/DHCP.