[SOLVED] How to obtain the list of computers that are in the local network?
-
Tobias is right.
But this means that the customers who bought your software must install or enable the mDNS software/service previously.
-
Hi Tobias,
What I want is exactly this: discover a set of hosts. Discovering also smartphones that are connected to the network is not a problem. Because I do not need to obtain services from the hosts. I just need to be able to read folders. But I cannot expect that the network be configured using a tool like mDNS. Moreover our software is not for computer specialists. Hence the networks will probably have a "basic (automatic) configuration". -
In that case I would do it the other way around.
Every computer which has a public folder has to register to the server with your software.
The network administrator as to send e.g. an email to all users how are responsible to the computer in the network to register to this service. Then you can run your software.The other way around that the server searches trough a unknown network is very complex because there are so many possibilities that a testing of your software is impossible.
-
Hi Juergen,
I am just pretty sure that, if customers have to make something so that their computer being seen by my software, they will not do it. In this case it is more simple to force the user of the software to map remote folder to have access to them, or to list them manually.So, for the first version, as it seems that QT cannot answer to my problem, I think that I will use Windows functions. This means that my software will only be able to work on Windows OS or equivalent (virtual machines on Mac). This limitation might be OK for the initial version of the software. And for the next versions I will have to investigate more about other solutions.
-
Hi Alain, your problem is not a Qt problem.* It is a network problem.*
I'm not quite sure but even when you are concentrating on Windows platforms it will not automatically solve your problem. Your customer would need a WINS/NetBIOS server installed to find all computers in the unknown network of your customers. And that is definitely not guaranteed.
-
Yes it si a "network problem". But, as QT has a network module I expected to be able to find a solution using it. For the presence of NetBIOS server, if a standard Windows explorer (when application runs on Windows OS) cannot see the remote computers, my application does not have to see them.
For my software I just need to offer, using a QTreeView, a similar view of what is it seen using QFileDialog::getExistingDirectories. Hence, if a computer needs to be "mounted" to be seen (UNIX case) I just need to show monted computers. And if it needs a NetBIOS server to be seen, I just need to show computers known by this server.
-
Not correctly. First you have to understand the possibilities how to detect computers in a network for each OS. You have to know the advantages and disadvantages of each solution. Create a document and a solution/choose matrix. Then create a realization plan and try to realize a first solution e.g. discovery method for Windows.
If your software is important for your customers you can also add some install requirements e.g. mDNS
And so on.
-
"Reading a folder" is done by a service running on a host, so you are interested in service discovery.
Assuming that you are interested in folders shared by windows machines you could read up on the protocols involved... or just use the windows APIs for discovering them directly (assuming you do not care for non-windows platforms running your application).
-
OK. Finally I do not use QT. I directly use Windows functions. This will be a limitation for the application. But a test on a Mac with parallel desktop shown that these functions also work on Mac.
-
[quote author="Alain38" date="1370416822"]OK. Finally I do not use QT. I directly use Windows functions. This will be a limitation for the application. But a test on a Mac with parallel desktop shown that these functions also work on Mac.[/quote]
Excuse me, could you say what exactly you've used?