[SNMP4J] Local port in tcp

Rodrigues, Rui 1. (NSN - PT/Amadora) rui.1.rodrigues at nsn.com
Thu Sep 9 14:49:43 CEST 2010


Hello,

We're using snmp4j in a manager. The manager can connect to several
agent simultaneously using TCP. To receive notifications (traps) from
the agents, we need to register in the agent stating the local port
where to send the notifications. The problem is that info is not
available in the API.
We're using new DefaultTcpTransportMapping() to create the tcpTransport.
We use the same to connect to all the agents.

We checked that the list of sockets is available in the
DefaultTcpTransportMapping class as private Map sockets = new
Hashtable();. But since its private we can't access it to read the local
address for a connection to a specific agent.

What would you recommend to overcome this issue? Would it be possible to
add a way to know the local address used to connect to a specific agent?

Best Regards,
RAR



More information about the SNMP4J mailing list