PDA

View Full Version : Getting IP addresses of computers connected to the network I'm connected to



yazwas
8th September 2013, 16:03
Good day

I want to get the IPs' of the different computers connected to the network my computer is on right now

How to do that?

I've looked over and used QNetworkInterface to get the list of active interfaces on my computer, but not the ip of the others computers.

Thanks!

ChrisW67
8th September 2013, 22:35
You get the IP address of other computers by using DNS queries, by making a net directed broadcast and seeing who responds, by individually addressing every other IP in your subnet, by making ARP table queries to see who is already active... It depends what you need to achieve.

yazwas
9th September 2013, 00:17
If I want to go with ARP requests, how to do that?
I'm using this with Linux
Thanks!

ChrisW67
9th September 2013, 02:52
For a start look at the arp (1M) command to see what data is available. You will only see devices your interfaces have recently talked to.
Then read man 7 arp.