Link to home
Start Free TrialLog in
Avatar of cdk033198
cdk033198

asked on

MAC Addresses on Network

I am using both D3 and D5. I am in search of Delphi code and/or documentation that will allow me to do the following on an NT 4.x/5.x/2000 network:

From a single workstation (presumably an NT workstation but I suppose it could be a Win9X workstation) logged into this NT domain I would like to be able to be able to determine the IP address of every other workstation that is currently logged into the same domain, and (more importantly) determine the hardware MAC address of every other workstation that is currently logged into this domain.

All of the above is quite simple to do in a Novell environment but I have been searching for weeks for a way to do this on an NT network. Any help would be greatly appreciated!

Regards,

Chris

Avatar of Madshi
Madshi

You should post a link to this question in the "Windows programming" forum. This sounds like a quite difficult question, so it would surely help to make the C++ guys look at this question, too.
Avatar of simonet
Piece of cake!

The hardest part, but still not impossible is to enumerate the MAC address. There are no remote calls that will retrieve that, so you'll have to create a "listener" for that, which will install on Windows (9x/NT/2k) as a service, so it's invisible.

The listener service works pretty much like Microsoft SMS, BackOriffice, Netbus, etc.: it's a program that listens do a specific TCP/IP port (you define what port it is), and responds to specific commands. The commands are sent out by the server machine (which contains the server app). One of the commands can be something like "#GET-MAC-ADDR@", and then the host machine reads (locally) the MAC addr and sends it over the TCP/IP port.

Enumerating the IP addresses in the local network is easier. There are functions that will let you enumerate all machines on a given LAN. YOu simply get the machine's name and convert it to its IP addr. The enumeration code can be found at http://www.delphifreestuff.com/examples/wnetexmp.html

I have some source code at home that I'll send you later on with all this I am talking about.

Yours,

Alex
ASKER CERTIFIED SOLUTION
Avatar of simonet
simonet
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cdk033198

ASKER

Comment accepted as answer
Thank you. Sorry for delay in closing this question.
>Thank you.

Anytime, cdk! Thanks.

Alex