I think that instead of having to specify a port in a config file, you should just have to initialize the system. For example, LFS should always listen on one specific port. So....
LFS listens on port 2220
CSR sends a packet to port 2220 requesting outguage packets to be sent to port 3330
LFS sends outguage packets to port 3330
Some insim app sends a packet to port 2220 requesting that LFS listens for insim on port 4440 and sends insim packets to 5550
Another outguage app sends a packet to 2220 requesting that outgauge packets also be sent to port 6660
I think that would work alot better, unless someone were to try running like 6 insim programs at once.
LFS listens on port 2220
CSR sends a packet to port 2220 requesting outguage packets to be sent to port 3330
LFS sends outguage packets to port 3330
Some insim app sends a packet to port 2220 requesting that LFS listens for insim on port 4440 and sends insim packets to 5550
Another outguage app sends a packet to 2220 requesting that outgauge packets also be sent to port 6660
I think that would work alot better, unless someone were to try running like 6 insim programs at once.