> {quote:title=Pierre Dupr__s wrote:}{quote}
> Here is the wireshark capture as asked, note that the trap is well in snmp v1 format, but shoes an OID named "snmpv2-smi", hope you won't misunderstood this and believe trap is in snmp v2 format !! (I do myself think that this OID name isn't very clever and can be confusing if the reader of the trap doesn't know traps frames format...).
>
> The link : http://a.imageshack.us/img808/8808/capturewireshark.jpg
>
> NB : I have also desactivated my firewall, but nothing has changed.
Packages *70.pkg may be suitable for Delphi7
{code:delphi}
// -----------------------------------------------------------------------------
procedure TfrmMain.bbtStartClick(Sender: TObject);
begin
snmp.BoundPort := 162; // the most important, to listen to snmp trap
snmp.ReceiveTimeout := 100;
snmp.Active := True;
bbtStart.Enabled := False;
bbtStop.Enabled := not bbtStart.Enabled;
while snmp.Active do
begin
while snmp.ReceiveTrap = 1 do
if snmp.Trap.Version = 0 then ProcessTrapv1(snmp.Trap); // process here
Sleep(1); // if does not sleep, process will consume 100% CPU
Application.ProcessMessages; // to allow user to press button Stop
end;
end;
// -----------------------------------------------------------------------------
procedure TfrmMain.bbtStopClick(Sender: TObject);
begin
snmp.Active := False;
bbtStart.Enabled := True;
bbtStop.Enabled := not bbtStart.Enabled;
end;
{code}