Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Finding the computers that are on a network

 
Bill White
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there an API out there that can do this?
Here is the problem. I have an app that needs to know about the other machines that are on the network that the apps computer is on.
I have looked at JNDI and JINI very briefly but they both seem to need to know a computers name before being able to connect to it. Unfortunately, I don't have that information to start with
I need the ability to query a network for all the machines on a network, thier I.P's and even the Mac Addresses.
Thank You.
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the first thing you need to determine is what you mean by "on" the network. There are 7 levels to an OSI networking model and what I mean when I say network depends on what layer I'm talking about and what services I'm referring to. Just because the machine down the hall and I both log into the same file server doesn't mean we both participate in webservices on the same "network", for example. Conversely, two machines can reside on 2 different LAN segments and still be on the same "network". Or for that matter, so can 2 machines on opposite sides of the planet.
One definition of "network" might be a LAN segment, which in TCP/IP means averyone shares the same address after masking off host IDs. But IPX networks don't work that way.
Then there's the question of my laptop. Is it "on the network" when it's dormant?
And, just in case the waters aren't muddy enough, two machines may be on the Internet. That's a network. However, if the only services they have are the ability to make http requests, machine A can never discover machine B, since, while thy may both be able to talk to host C, the HTTP protocol doesn't allow for hosts to make unsolicted requests of client machines.
So, in the general case, no. Specific cases sometimes. Worms like Code Red didn't do their dirty work by knowing who else was on the network, they did it by either plundering well-known system resources such as Microsoft LookOut address books or by simply bombing IP addresses formed semi-randomly.
 
Bill White
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, lets say I just want to find the computers in my companies network. About 20 of em. I will be using TCP/IP.
With TCP/IP I want an application that can find the other 19 computers that are powered up on my companies network in the actual physical location of my company.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sumpn like this?
[ February 22, 2003: Message edited by: Michael Ernest ]
 
Bill White
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that Janos needs its own version of a JVM. Is this the case?
If so, it will not work for what I am doing. Thanks a bunch though.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic