In Mac OSX if you select "Finder" under "Shared" it lists the other devices that are on the same network. There is also a something similar in Windows although i cannot remember how to do it. Anyway, I'm working on a file transfer program for a school network and I require the ability to detect the other machines that are on the network. I need to obtain the IP address for the socket connection required for file transfer. Also i will need to have the host names of these machines for identification purposes. What would be even more useful than the host name would be the ability to detect the user that is logged on. Is it possible to detect the user? Can i carry out a scan to see the other machines on the schools local area network and gain their IP addresses?

If this is not possible then I think i have an alternative solution. Since there is a shared remote drive at school i could place a text file on this. Every time a runs my application it gets the host name and IP address of the machine and writes this info to the text file. This is then deleted as it is closed. My application could then read from this file so the user can select who they wish to file transfer with. So this method would work for the IP and host name however how would i obtain the username of the person logged on to the machine?

Thanks in advance for any help that can point me in the right direction,

Regards Serb.