Project 2 bug fixes

The files here have real honest-to-goodness bug fixes in them. You should grab them and update your project.

Fix 1: file error message and proper synchronization for project2

This revised project2.java fixes three problems: The updated file is here. It goes in the network package

Fix 2: proper measurement in the receiver

This is a tiny bug in the receiver application that was causing it to give erroneous bandwidth computations. It's a one-liner fix (look for the comment "FIX"), but you might as well grab the whole file. It goes in the application package. Don't forget to recompile that package after you grab it.

Project 2 patches

It should not be necessary to use any of the patched files here. So far these are simply enhancements that may make things easier, rather than real bug fixes.

Link-level enhancements

The following three files together give you three new functions on links that you can use: The first two are provided so that you can figure out how to weight routes for best performance, rather than just optimizing hop count. The third is provided because the algorithms in the book assume that you can have this information, and I'd rather not have people hacking the setup code to get this information. You could just as easily send a "Who are you/I am me" message across the link to find out who is at the other side, but adding this function doesn't bother me either.

To apply these changes, you need to grab all three of the following files. They all go in the link package. You will then need to recompile the link package.

In addition, you will want to change the toString function in RoutingNetworkEdge.java to read:
   public String toString ()
   {
      return "" + address;
   }
So that the string that you get from OtherNodeNames will match the address of the sender/receiver in the case where the node is the edge. The names for routers have "Router:" built into them, but that isn't a problem because those names are arbitrary anyhow.

More robust sliding window baseline

The following version of the sliding window sender implements two enhancements that will make it more stable and make it easier to adjust the sliding window size: . The code is here. It goes in the reliability package.
acollins@cs.washington.edu