Article

From:
To:
Nguyen Diep
Subject:
Re: Problem with IdSNMP Trap [Edit]
Newsgroup:
embarcadero.public.delphi.internet.winsock

Re: Problem with IdSNMP Trap [Edit]

<Nguyen Diep> wrote in message news:✉forums.embarcadero.com...

> Do you see an "ICMP destination unreachable (Port unreachable)"
> sent back on receiving a SNMP trap ? This means your IdSNMP
> was not listening on port 162

That is exactly the bug that has been fixed now.

> You must set the property snmp.BoundPort = 162 so that it is
> listening on this port and can process snmp trap meassage.

That will bind all outbound SNMP requests to local port 162 as well, instead 
of local port 161 as before.  TIdSNMP has been fixed to use both ports now 
(TIdSNMP has a separate TrapPort property, afterall - it just was not 
previoiusly using it for anything).  As such, you need to update your code 
accordingly:

{code:delphi} procedure TfrmMain.bbtStartClick(Sender: TObject); begin   snmp.TrapPort := 162; // <-- do not use BoundPort for traps!   ... end; {code}
-- Remy Lebeau (TeamB)
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Fri, 01 Nov 2024 04:39:11 UTC
Copyright © 2009-2024
HREF Tools Corp.