[AGENT++] [SNMP++] receive_trap sends response from wrong port
Holger GMX
h.klaas at gmx.net
Mon Sep 27 08:53:03 CEST 2010
On Sun, 2010-09-26 at 20:38 +0200, Jochen Katz wrote:
> Hi,
>
> > I looked at consoleExamples/receive_trap.cpp as an example on how to
> > receive notifications. I started the tool as root and told it to listen
> > on port 162. After receiving an inform it will send the response from an
> > unprivileged port instead of port 162.
>
> > Is there a way to get the response source port to be the same as the
> > listening port?
>
> yes, change receive_trap to call
> snmp->response(pdu, target,
> snmp->get_eventListHolder()->notifyEventList()->get_notify_fd());
>
> Regards,
> Jochen
Thanks Jochen, that did it.
More information about the AGENTPP
mailing list