Generic solution with one udp_open able to satisfy this requirements

I have 100 modules (RCM3710 & Dynamic 8.30); each module must :

  • receive UDP packet (any local & remote ports)
  • store local & remote ports
  • send UDP packet (use stored ports)

The supervisor (Linux program) pools each module with FIXED port values :
module 1 : 2010/2011
module 2 : 2020/2021
module 3 : 2030/2031

Have you a generic solution with one udp_open able to satisfy this requirements like udp_open (socket, ANY local port, 0, 0, NULL) ?