router 541 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. #Run script for router as part of
  3. #Assignment 3
  4. #Computer Networks (CS 456)
  5. #Number of parameters: 4
  6. #Parameter:
  7. # $1: router_id = unique int identifier for the router
  8. # $2: nse_host = host address of the network emulator
  9. # $3: nse_port = the same, but the port number
  10. # $4: router_port = the port for the router
  11. #For Python implementation
  12. if [ "$#" -ne 4 ];
  13. then
  14. echo "Program takes 4 parameters, which are a router_id, emulator host addr, host port, and router port."
  15. exit 1
  16. fi
  17. python3 router.py $1 $2 $3 $4