?
Solved

NetBios tables, and IP to MAC address translation

Posted on 2001-08-29
7
Medium Priority
?
1,272 Views
Last Modified: 2013-12-03
I'm trying to programatically get the information which is returned by running the call nbtstat.  Basically, I want to get a look at a computers Netbios Name Table.  Unfortunately, all I have is the computers IP address.

From what I can tell, you can use the NetBios() call to get the Name table of a computer, but you need to have the computer's MAC address to make the NetBios() call.   ( Actually, I'm not even sure that would work come to think of it. I'm on a different physical network than the computer I'm querying.)  At any rate, I can't find a way to translate between IP and MAC.  Win2k has SendArp() but I need something for general Win32.  And writing my own arp driver appears to require raw socket access which has the same problem.

Can anyone tell me how to get the name table nbtstat will display to you.  Am I on the right track?  If so, how can I get the right MAC Address?  Any tips appreciated.
0
Comment
Question by:nothingman
[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
  • 2
  • 2
7 Comments
 

Author Comment

by:nothingman
ID: 6439365
Slight clarification.  nbtstat is not a call.  It's a program that ships with Windows.  You give it an IP and it gives you the Name table.  
0
 
LVL 15

Accepted Solution

by:
NickRepin earned 1200 total points
ID: 6439475
0
 

Author Comment

by:nothingman
ID: 6439519
Do you have a specific function in mind.  The only way I can see to do it based on the IP Helper API is with SendArp(), and that only works on Win2k.  
0
 
LVL 15

Expert Comment

by:NickRepin
ID: 6444023
GetAdaptersInfo()
IP_ADAPTER_INFO.CurrentIpAddress   <-- IP
IP_ADAPTER_INFO.IpAddressList

IP_ADAPTER_INFO.Address   <---- MAC
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

800 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