It's clear that tcpborphserver is going to become the de facto method of 
interacting with user gateware on ROACH2 boards as well as an important method 
for interacting with the ROACH2 board itself.  This is great for programming 
and configuring designs across multiple ROACH2 boards.  It's so great that 
users will want to start adding their own commands to the tcpborphserver 
program.

Instead of having users rebuilding the tcpborphserver program every time they 
add or change a custom command, I would like to propose a plug-in architecture 
for tcpborphserver.  This would allow users to create shared libraries that the 
tcpborphserver executable could load *at runtime* to register new commands with 
tcpborphserver.  This keeps the tcpborphserver program lean and focused on the 
core functionality, yet allows different sites to provide and use their own 
site-specific customizations to tcpborphserver3.

Unfortunately I don't have the mandate to do this myself, but I still wanted to 
put this idea out there for consideration.

Thanks,
Dave

Here is a simplified overview for a plugin named "garbonzo":

1) Create a shared library named "garbonzo.so".  The tcpborphsever executable 
would load this (when requested) using dlopen().

2) Shared library must have function named "Init_garbonzo" that tcpborhserver 
will locate via dlsym() and then call.  This init function will register new 
command-name-to-funtion-pointer mapping(s) with tcpborhserver.

3) Now the new commands are available!


Reply via email to