Created for CSCI1680: Computer Networks by William Stone and Alex Khosrowshahi (me)
- An updated Rust/Cargo installation
- tmux (for virtual network simulation)
- GNU make
- Navigate to the top level directory (ordinarily named tcp/)
- Run
maketo compile and buildvhostandvrouter - If errors arise, email me your frantic pleading in haiku form here
The virtual network is full of dark and arcane magiks, beware...
- Run
util/vnet_run --router ./reference/vrouter --host ./vhost linear-r1h2 - Profit! See the below list for commands : )
For those recruiters who may be prowling my github: We use the reference router because the TCP implementation is all host-focused! I do have a router implementation of my own, though. It should work fine (maybe, sorta)
Usage:
c <vip> <port>Example:
c 10.0.0.1 9999Usage:
a <port>Example:
a 9999Usage:
s <socket ID> <bytes>Example:
s 0 hihihiUsage:
r <socket ID> <numbytes>Example:
r 0 5
Read 5 bytes: hihihExample:
Here’s an example table with two sockets. Socket 0 is a listen socket, socket 1 is a socket for a client that connected to this listen socket.
SID LAddr LPort RAddr RPort Status 0 0.0.0.0 9999 0.0.0.0 0 LISTEN 1 10.1.0.2 9999 10.0.0.1 46810 ESTABLISHED
Usage:
cl <socket ID>Usage:
sf <file-path> <addr> <port>Example:
sf path/to/some_file 10.1.0.2 9999
// Sends however many bytes in the specified fileUsage:
rf <dest file> <port>Example:
rf path/to/some_destination_file 9999
[...]
Received (however many) bytes