[AGENT++] [SNMP++] receive_trap sends response from wrong port

Holger GMX h.klaas at gmx.net
Sun Sep 26 13:09:38 CEST 2010


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.
I tried to fix this by changing line 104 from:
  Snmp snmp(status);                // check construction status
to:
  Snmp snmp(status, trap_port);     // check construction status

When running the modified version I get the following error message:
Trying to register for traps on port 162.
Error register for notify (-21): SNMP++: Transport is in use

Is there a way to get the response source port to be the same as the
listening port?

I tried this with SNMP++ v3.2.24 and v3.2.25
 
Regards,

Holger




More information about the AGENTPP mailing list