Delphi: Get MAC of Router
- by Daniel Marschall
Hello,
I am using Delphi and I want to determinate the physical MAC address of a network device in my network, in this case the Router itself.
My code:
var
idsnmp: tidsnmp;
val:string;
begin
idsnmp := tidsnmp.create;
try
idsnmp.QuickSend('.1.3.6.1.2.1.4.22.1.2', 'public', '10.0.0.1', val);
showmessage(val);
finally
idsnmp.free;
end;
end;
where 10.0.0.1 is my router.
Alas, QuickSend does always send "Connection reset by peer #10054". I tried to modify the MIB-OID and I also tried the IP 127.0.0.1 which connection should never fail. I did not find any useable Tutorials about TIdSNMP at Google. :-(
Regards
Daniel Marschall