Jules Richardson wrote:
Even assuming it can, and the DHCP server assigns it
an IP
address, I'm not sure how client controlling machines would then locate
it on the network, though. Doubtless both questions are easily answered
by a trained network admin, though :-)
You send a packet to the broadcast address.
Say your client is 10.0.0.1, and the target device is 10.0.0.2, and the subnet
mask is 255.0.0.0. That means your broadcast address is 10.255.255.255.
Sending a packet to the broadcast address means any device on that subnet will
receive the packet. So the target listens on whatever port it's using, the
source machine sends out a broadcast, and the target responds by sending a
unicast packet (e.g. 10.0.0.2 to 10.0.0.1) back to the source to advertise its
presence.
As far as protocols go, UDP is nice and simple, but doesn't offer any form of
guarantee that a sent packet will arrive, so you'd probably need to hack
together some form of send/acknowledge/repeat-if-scrambled/repeat type system.
[All of this is on-topic enough, but is it of interest
to the majority?
Or is it something better taken to a mailing list for those interested
that's set up with the specific aim of bashing out some ideas and
hopefully getting something closer to realisation?]
Jules, if you want a mailing list setting up, email me off-list and I'll set
you one up on my server. Assuming you don't mind it running on Mailman, that is.
--
Phil. | (\_/) This is Bunny. Copy and paste Bunny
classiccmp at philpem.me.uk | (='.'=) into your signature to help him gain
http://www.philpem.me.uk/ | (")_(") world domination.