[SNMP4J] Response Ip address
VijayMajagaonkar
vijaymajagaonkar at gmail.com
Wed Feb 18 11:10:06 CET 2009
Simple way is you can read the ipAddress from packet that you
receiving or getting response.
[Code]
snmp.send(command, target, null, new ResponseListener() {
public void onResponse(ResponseEvent event) {
System.out.println(event.getPeerAddress().toString());
}
});
[/Code]
Thanks
Vm
On Wed, Feb 18, 2009 at 3:23 PM, Ahmed Fouad
<ahmed.fouad.helmy at gmail.com> wrote:
> Hi Frank,
>
> I just have a small question.
>
> Can I know (by any means) what is the ip address that sent me the response?
>
> For example, consider this code:
>
> ResponseListener listener = new ResponseListener() {
> public void onResponse(ResponseEvent event) {
> System.out.println("Received response PDU is:
> "+event.getResponse()); // can i get the ip address from the response pdu??
> }
> };
>
> If not, is there any easy way to implement this feature?
>
> Thank you
>
> Abdelraouf
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j
>
--
"Human Knowledge Belongs To World"
More information about the SNMP4J
mailing list