Using propriety broadcasting protocol is a very common technique for detecting devices on network without knowing it's name. However there's a better option:
UPNP, is an excellent protocol for achieving your goals. libupnp can get you started in no time.