?
Solved

Can I query our DHCP server to find out whose computer has which ip address ???

Posted on 2001-08-17
6
Medium Priority
?
1,453 Views
Last Modified: 2012-06-27
Hi,

I need to be able to quere the network (DHCP?) server to be able to resolve
ip address (even mac addresses) into computer name.

I looked around in msdn and found nothing...
Yet there two dll in system32 who looks promising:
dhcpcsvc.dll and dhcpsapi.dll (client and server api???)

In it there is such call ad DHCPGetClientinfo... Interesting but I haven't been
able to find and documentation on there api... And importing them into VC98
does not work :(

Anyone out there has a hint as to how I can do this???
Basicaly I have a set of MAC addresses, which I turn into IP addresses and
I need to have pc computer name... GetHostByAddr does not seems to work
on out WINNT network??? At least, it does NOT revolve even the computer I am
using!!!

Any hints will be appreciated.

thanks.


0
Comment
Question by:aquila98
[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
  • 3
  • 2
6 Comments
 
LVL 28

Expert Comment

by:vinnyd79
ID: 6398762

if you can get the ip address you can use nbtstat -A <ip address> to get machine name
0
 
LVL 2

Author Comment

by:aquila98
ID: 6398777
Hmmmm.

I need to do this whitin a VB/VC application ;-)

I might have forgot to mention this ...

Do you happen to know which api is being used by nbtstat???
0
 
LVL 28

Expert Comment

by:vinnyd79
ID: 6398799
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:geoffryn
ID: 6399069
Why do this with VB?  DHCPCMD from the resource kit will dump or allow you to query the DHCP DB and pipe the result to file.
0
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 225 total points
ID: 6400322

Aquila,if you really need to do this from your application there is a quick simple way,but it is kind of cheesy:

You can have your app write a temp batch file to redirect the results of the nbtstat command into a temp file,then have your app execute the batch file and delete it.You can then open the temp file and load the data into strings or variables for  your program.

Im sure there is a much better solution,but if you need this right away the above should only take a few minutes to write.
0
 
LVL 2

Author Comment

by:aquila98
ID: 6406672
I see there is not much to go on...

Still those dll looks promising ;-) I'll try and get more info out of them!

thanks for the bit of code.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
Make the most of your online learning experience.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Suggested Courses

801 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