Hi,
In DataMiner.xml it is possible to configure the local port where the DMA will be listening to for incoming traps, e.g. <SNMPv3 trapPort="362"/>.
Would anyone know if it is possible via a Notify or SLNet message if it is possible to get this information? The idea would be that a QAction can get this local listening port info and set this on the device, so the device can send the traps to the correct destination. But I'm afraid if this info is not available through a call that the raw contents of the DataMiner.xml will have to be parsed by the QAction, which could introduce issues in the future when the xml format changes, or when a different location would ever be used to store this kind of info.
Regards,
There's currently no API to obtain that information so getting it out of the DataMiner.xml is probably your best option today.
An alternative approach might be to parse the output of a netstat command executed on the DataMiner. If you pass along the -o argument, you'll get the ID of the process owning the socket.
netstat -nao
UDP 0.0.0.0:162 *:* 34884
If you then map that to the process ID of one of the SLSNMPManager processes, you'll find out the configured trap port. The downside with this approach however is that you won't know for which SNMP version it is if different trap ports are configured for different SNMP versions.
Thanks for confirming. Getting the info from the DataMiner.xml will indeed then be my best option at this moment.