|
-
Oct 28th, 2010, 12:15 AM
#1
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.
-
Oct 29th, 2010, 05:49 AM
#2
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!
-
Oct 29th, 2010, 06:49 PM
#3
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.
-
Oct 29th, 2010, 08:27 PM
#4
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..
-
Oct 29th, 2010, 10:09 PM
#5
Re: list name of all connected devices on lan.
 Originally Posted by chris128
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.
-
Oct 30th, 2010, 10:06 AM
#6
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.
-
Oct 30th, 2010, 12:29 PM
#7
Re: list name of all connected devices on lan.
 Originally Posted by Edgemeal
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.
-
Nov 1st, 2010, 12:40 PM
#8
Re: list name of all connected devices on lan.
 Originally Posted by chris128
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.
-
Nov 3rd, 2010, 08:20 AM
#9
Re: list name of all connected devices on lan.
 Originally Posted by Lord Orwell
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|