API function to find MAC address in powerbuilder

API function to find MAC address in powerbuilder
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sathya_skAuthor Commented:
API function to find MAC address in powerbuilder
what do you mean by mac address
Do you want to enumerate all MAC Id's available on the system, or a mac ID for a specific IP , or a mac ID for a specific adapter?
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

I don't know if there is an API but let me show you what I did to find MAC address for an IP.

I have a GetMAC.BAT file where I send a PING to IP address I want to check, next I use ARP command to get MAC address, result is saved to a file that is opened in PB for processing.

You can check what I said in a DOS screen:

1. Make Ping so your computer will ask for IP to router or other computers

Haciendo ping a con 32 bytes de datos:

Respuesta desde bytes=32 tiempo<1m TTL=128
Respuesta desde bytes=32 tiempo<1m TTL=128
Respuesta desde bytes=32 tiempo<1m TTL=128
Respuesta desde bytes=32 tiempo<1m TTL=128

Estadísticas de ping para
    Paquetes: enviados = 4, recibidos = 4, perdidos = 0
    (0% perdidos),
Tiempos aproximados de ida y vuelta en milisegundos:
    Mínimo = 0ms, Máximo = 0ms, Media = 0ms

2. Ask for Phisycal address in ARP table

c:\ARP -a

Interfaz: --- 0x10003
  Dirección IP          Dirección física      Tipo             00-10-5a-e3-e4-f1     dinámico

[To Save into a file]

c:\ARP -a  > c:\MyFile.Txt

Now in PB open MyFile.txt and process it to find the address you are looking for.   =   00-10-5a-e3-e4-f1



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sathya_skAuthor Commented:
How to find Network id in powerbuilder5.0 ?
Check http://www.funcky.com/ .
Got lots of features which you can use.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.