Hi Lukas / Synalist,
I have been playing around with the SNMPTraps and am afraid I am not
receiving anything in the application receiving the traps, yet on the client
side it appears that the MIB is indeed added. (Note that this is in FPC and
Lazarus). I created a simple application to act as a client, and the SNMP
code is as follows:
snmpSend.Query.Clear;
snmpSend.TargetHost := '192.168.1.19';
snmpSend.TargetPort := '8006';
snmpsend.Query.MIBAdd('1','12', ASN1_INT);
Writeln(snmpSend.Query.MIBCount); //this returns 1
Writeln(snmpSend.Query.MIBGet('1')); //this returns 12
if snmpsend.SendTrap then
Writeln('TRAP SENT!!') //this is executed to the trap is sent
else
Writeln('TRAP FAILED....');
-------------------------------------------
Then on the server side I have
snmpRecv.TargetPort := '8006';
repeat
if snmpRecv.RecvTrap then
begin
Writeln('Trap received');
Writeln(snmpRecv.HostIP); //the client IP is displayed here
Writeln(snmpRecv.MIBCount); //this remains 0
Writeln(snmpRecv.MIBGet('1')); //this returns 0
end
else
Writeln('No Trap received');
until false;
-----------------------------------------
Am I missing something obvious here which would be the cause of my MIB value
not going to the server?
Many thanks and Regards!
W
On Tue, Jun 30, 2009 at 4:39 PM, Lukas Gebauer <[email protected]> wrote:
>
>> > I now receive the trap, but only the HostIP information is available.
>> > As for the rest, MIBGet values are empty and MIBCount returns '0'. How
>> > do I retrieve the information that was set in MIBAdd that was called
>> > in the client, in the server side application?
>>
>> And you are assigning some MIB information in TRAP sender simulator?
>> :-)
>>
>>
>> --
>> Lukas Gebauer.
>>
>> E-mail: [email protected]
>> http://synapse.ararat.cz/ - Ararat Synapse - TCP/IP Lib.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> synalist-public mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/synalist-public
>>
>
>
------------------------------------------------------------------------------
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public