This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
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.
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.
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Oct 27, 2002
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.