A pure user-space program which simulates the major functionalities of a routing device running a simplified Link State Routing protocol.
$mvn compile assembly:single
$java -cp target/COMP535-1.0-SNAPSHOT-jar-with-dependencies.jar socs.network.Main conf/router1.conf
| Command | Description |
|---|---|
| attach processIP processPort simulatedIP weight |
NOTE2: processPort must match the corresponding port as listed in the conf files. |
| start | Client side: broadcast HELLO to all links
|
| neighbors | output the neighbors of the routers |
| detect simulatedIP | output the shortest path from current router to the target router with their weights |
| update processIP processPort simulatedIP weight | update the weight between the path from processIP to simulatedIP |
| connect processIP processPort simulatedIP weight | similar to attach command, but directly trigger the database synchronization without the necessity to run start on the origin router NOTE: destination router must still run start before it can be detected. |
| disconnect port | remove the link between this router and the remote one which is connected at port |
| quit | exit the program |