Problems when receiving notifications with SNMP++

Jochen Katz katz____agentpp.com
Sat Apr 28 02:01:03 CEST 2001


Hi,

> we use SNMP++ Framework in version 3.02a with SNMPv2c to receive notifications.
> Basically, we slightly modified the example program
> "receive_trap.cpp" from Snmp++ console examples in a way,
> that we do not use ports 10161 and 10162 but we use default
> port 0 in Snmp constructor and we use a configurable port for
> "CNotifyEventQueue::set_listen_port".  (See code extract below, please).

if you're using port 0 for initialization of the Snmp class, the OS
will assign a (random) free port. You can verify this if you compare
the netstat output before and after starting a trap receiver.

> The notification sending application sends notification to port 0.

AFAIK the port 0 is reserved and cannot be used.

> However, with the receiving application, we are not able to
> receive these notifications, even if we configure > "CNotifyEventQueue::set_listen_port" with port 0.
> Like the Snmp session, the listen port is assigned by the OS if 0 is specified.

> However, we want to use port 0, too (which works fine with other
> (commercial) receiving applications).

I would assume that if the snmp++ trap receiver listens on port 162,
it will receive traps sent to port "0" by those other trap senders.
And I would assume that the other trap receiver can't be started if
the snmp++ receiver listens on port 162.

Best regards,
  Jochen



More information about the AGENTPP mailing list