Network discovery on a Mac
There is a program called Bonjour Browser that will list well known services that have registered on your local network. I believe that most Macs have one or more registered protocols by default.
ping
the broadcast address (the broadcast address is printed as part of the output to ifconfig en0
)
The hosts answering are on your local network. (You may also try arp -a
but that only keeps track of recently contacted hosts so you may want to run it after the broadcast.)