David,
Attached is the code after I clean up the debug information and add more comments to it.
Controller.c is the main code and now you can see it is pretty simple since I put all the methods into the WAN.c and common.c files which can be compiled as a library file.
Please write up a summary of how to use the java vmware (?) and figure out how to pass parameters between c and java code. Please do so by Sept. 22.
Talk to you later.
Feng