Results 1 to 9 of 9

Thread: list name of all connected devices on lan.

  1. #1

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    list name of all connected devices on lan.

    i am trying to enumerate all IPs on my local network, but i am not having any luck. The only thing i have came up with so far is a really tedius "get my own ip and scan the subnet with pings" which surely isn't the best way? I am really only trying to get the ip of a tivo box, and i can determine it's a tivo by mac address or name. My router lists the "computer name" of the tivos as a long string of numbers with the prefix "tivo".

    What about broadcasting a ping packet? I could also attempt to connect with telnet to port 31339 on every one of them.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: list name of all connected devices on lan.

    I'm curious how your current method works - I mean what do you actually do when you say "scan the subnet with pings" ? I realise you mean you ping every IP on the subnet but how does that tell you if its your Tivo box? Do you just try to connect to port 31339 on every device that responds to the ping?

    If that is what you are doing and you say you only need the MAC address to identify it then you could possibly make it more efficient by issuing ARP requests rather than pings. ARP (http://en.wikipedia.org/wiki/Address...ution_Protocol) is used to get the MAC address of an IP address on the network from a switch/router (unfortunately I don't know of a method that works the other way around as that's what you want really). So you could maybe just send an ARP request to the router for each IP on the subnet and see if the MAC address for each one is one of your recognised Tivo MAC addresses. This way you don't have to wait for each ping to timeout or anything as the router should respond straight away to each ARP request (well I've never tried it myself but I believe it will).
    There might be a better way but that's the best I got!
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: list name of all connected devices on lan.

    i will keep that in mind as a possibility and look into it. I would assume anyone using my program would have a router or hub of some sort, since the tivo would have to be networked to the pc somehow.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: list name of all connected devices on lan.

    Well it is possible to directly connect a device to the network port on a computer (ie no switch/hub/router), you just need to use a crossover cable instead of a standard ethernet cable. Don't know if anyone using these devices you mention would be likely to do that but thought it might be worth pointing out..
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  5. #5

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: list name of all connected devices on lan.

    Quote Originally Posted by chris128 View Post
    Well it is possible to directly connect a device to the network port on a computer (ie no switch/hub/router), you just need to use a crossover cable instead of a standard ethernet cable. Don't know if anyone using these devices you mention would be likely to do that but thought it might be worth pointing out..
    it's off topic but you don't need the crossover cable on new computers. The ethernet port can adjust.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  6. #6
    VB For Fun Edgemeal's Avatar
    Join Date
    Sep 2006
    Location
    WindowFromPoint
    Posts
    4,255

    Re: list name of all connected devices on lan.

    In one of my VB6 apps it uses API, mainly NetServerEnum to get the names of the PCs on the LAN, and GetHostByName to get the IP of a PC by its name, its super fast, I got the codes from vbnet.mvps.org, network section, tho it is vb6 code.

  7. #7
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: list name of all connected devices on lan.

    Quote Originally Posted by Edgemeal View Post
    In one of my VB6 apps it uses API, mainly NetServerEnum to get the names of the PCs on the LAN, and GetHostByName to get the IP of a PC by its name, its super fast, I got the codes from vbnet.mvps.org, network section, tho it is vb6 code.
    I think NetServerEnum will only discover Windows machines but I may be wrong...
    GetHostByName just uses DNS and NetBIOS to look up the IP address of the specified name so I'm presuming they won't be much use for this but as I have no idea what these Tivo things are I guess I may be wrong.

    Oh and I knew some devices would work directly with an ethernet cable between the device and the PC but like I said I've no idea what these Tivo things are that you are trying to work with are so I didn't want to assume that they would.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  8. #8

    Thread Starter
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: list name of all connected devices on lan.

    Quote Originally Posted by chris128 View Post
    I think NetServerEnum will only discover Windows machines but I may be wrong...
    GetHostByName just uses DNS and NetBIOS to look up the IP address of the specified name so I'm presuming they won't be much use for this but as I have no idea what these Tivo things are I guess I may be wrong.

    Oh and I knew some devices would work directly with an ethernet cable between the device and the PC but like I said I've no idea what these Tivo things are that you are trying to work with are so I didn't want to assume that they would.
    they have netbios names consisting of "TIVO242343242" where the numbers are as far as i can tell random.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  9. #9
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: list name of all connected devices on lan.

    Quote Originally Posted by Lord Orwell View Post
    they have netbios names consisting of "TIVO242343242" where the numbers are as far as i can tell random.
    You might find that the numbers match the last few parts of the MAC address. A lot of networking equipment that we use comes with a default name in the form of MANUFACTURER_MACADDRESS
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width