Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

API function to find MAC address in powerbuilder

Posted on 2003-12-08
9
Medium Priority
?
2,516 Views
Last Modified: 2013-12-26
API function to find MAC address in powerbuilder
0
Comment
Question by:sathya_sk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 

Author Comment

by:sathya_sk
ID: 9895612
API function to find MAC address in powerbuilder
0
 
LVL 8

Expert Comment

by:gajender_99
ID: 9895916
what do you mean by mac address
0
 
LVL 2

Expert Comment

by:mdhampton
ID: 9903666
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?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 5

Expert Comment

by:berXpert
ID: 9904736
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

C:\PING 132.1.1.2
Haciendo ping a 132.1.1.2 con 32 bytes de datos:

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

Estadísticas de ping para 132.1.1.2:
    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 132.1.1.2

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


[To Save into a file]

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



Now in PB open MyFile.txt and process it to find the address you are looking for.

132.1.1.1   =   00-10-5a-e3-e4-f1

Regards,

BerX
0
 
LVL 33

Accepted Solution

by:
sajuks earned 400 total points
ID: 9910096
0
 

Author Comment

by:sathya_sk
ID: 9910118
How to find Network id in powerbuilder5.0 ?
0
 
LVL 33

Expert Comment

by:sajuks
ID: 9910153
Check http://www.funcky.com/ .
Got lots of features which you can use.

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question