Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3669414
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:14:25+00:00 2026-05-19T02:14:25+00:00

I am using Delphi and I want to determinate the physical MAC address of

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:14:26+00:00Added an answer on May 19, 2026 at 2:14 am

    You can use the SendARP function to get the Mac Address.

    check this sample

    uses
     Windows,
     WinSock,
     SysUtils;
    
    
    function SendArp(DestIP,SrcIP:ULONG;pMacAddr:pointer;PhyAddrLen:pointer) : DWord; StdCall; external 'iphlpapi.dll' name 'SendARP';
    
    
    function GetMacAddr(const IPAddress: string; var ErrCode : DWORD): string;
    var
    MacAddr    : Array[0..5] of Byte;
    DestIP     : ULONG;
    PhyAddrLen : ULONG;
    WSAData    : TWSAData;
    begin
      Result    :='';
      WSAStartup($0101, WSAData);
      try
        ZeroMemory(@MacAddr,SizeOf(MacAddr));
        DestIP    :=inet_addr(PAnsiChar(AnsiString(IPAddress)));
        PhyAddrLen:=SizeOf(MacAddr);
        ErrCode   :=SendArp(DestIP,0,@MacAddr,@PhyAddrLen);
        if ErrCode = S_OK then
         Result:=Format('%2.2x-%2.2x-%2.2x-%2.2x-%2.2x-%2.2x',[MacAddr[0], MacAddr[1],MacAddr[2], MacAddr[3], MacAddr[4], MacAddr[5]])
      finally
        WSACleanup;
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using a very large delphi third party library without source code, this library
I'm using Delphi 2007 and I have this case: { CommonUnit.pas } type //
I am using Delphi, and I want to show custom text in the buttons
I want to monitor the copy file function using Delphi. I can do it
Using Delphi 2010, let's say I've got a class declared like this: TMyList =
I'm using Delphi 2009 and want to decode an HTML encoded string, for example:
I am using Delphi XE2 with help installed. I want to see the hints
I want to know how I can develop GUI applications(32 Bits) without using Delphi
Sorry for my bad English... Using Delphi 7 I want to create a dialog
Using Delphi 2010... I have a set of binary properties I want to group

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.