我使用幻灯4j制造刺.器。 我设法接收了该节目并处理。 由于我的机器有多个预期地址,我需要有目标的预期地址。 我可以考虑两种方式:
- Retrieve entire command in my trap receiver which is "snmpset -v 1 -c M xx.xxx.x.x 1.3.6.1.4.1.161.3.6.37.2.1.3.2 i 2" so that I can get the ip address by removing other strings." But the only thing I could retrieve is only the variable, value and pdu type.
- Using method to retrieve the targeted ip address. But couldn t find one. I used
event.getTransportMapping().getListenAddress()
but getting 0.0.0.0/161 as I need to listen to many ip address. Usedevent.getPeerAddress()
but getting ip address of the sender s machine.
真正感谢任何帮助。 提前感谢。