Results 1 to 4 of 4

Thread: Getting IP addresses of computers connected to the network I'm connected to

  1. #1
    Join Date
    Jul 2009
    Location
    Jordan, and UAE
    Posts
    55
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Getting IP addresses of computers connected to the network I'm connected to

    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!

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Getting IP addresses of computers connected to the network I'm connected to

    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.

  3. #3
    Join Date
    Jul 2009
    Location
    Jordan, and UAE
    Posts
    55
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Getting IP addresses of computers connected to the network I'm connected to

    If I want to go with ARP requests, how to do that?
    I'm using this with Linux
    Thanks!

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Getting IP addresses of computers connected to the network I'm connected to

    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.

Similar Threads

  1. QFileSystemModel with network drives not connected
    By GothmoG in forum Qt Programming
    Replies: 2
    Last Post: 3rd October 2012, 01:18
  2. Replies: 1
    Last Post: 6th March 2011, 13:44
  3. find connected network devices
    By Remco in forum Qt Programming
    Replies: 4
    Last Post: 9th September 2010, 09:03
  4. Getting informed about newly connected network adapters
    By RThaden in forum Qt Programming
    Replies: 2
    Last Post: 19th January 2010, 15:51
  5. Is internet connected
    By bunjee in forum Qt Programming
    Replies: 2
    Last Post: 24th November 2009, 21:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.