Add support for dynamic registration of ports on experimental nodes so
that clients and servers can avoid using hardwired ports on those experimental nodes. I have added the following tmcd operation: tmcc portregister <service> [<port>] where we assume its the control network IP (from the DB), and the pid/eid of the node the experiment belongs to. The given port is entered into the port_registration table for the experiment, using the service as the tag. Supplying port=0 clears the registration from the table. When called like: tmcc portregister <service> we return the registered port, or nothing. I hacked up a little C library module in libtb so that there is something that looks like a C interface to this: int PortRegister(char *service, int port); int PortLookup(char *service, char *hostname, int namelen, int *port); The above routines call out to tmcc of course. Lastly, I changed the sync server and client to use the new port registration, via the library calls above. There are other emulab services that need to be changed as well, but they can be done on an as needed basis.
Showing with 343 additions and 31 deletions