Re: UDP Broadcasts
Re: UDP Broadcasts
- Subject: Re: UDP Broadcasts
- From: Josh Graessley <email@hidden>
- Date: Sat, 27 Apr 2002 11:59:10 -0700
On 4/27/02 2:40 AM, "Jens Bauer" <email@hidden> wrote:
>
Hi Tomas,
>
>
(Sorry for cross-posting, but I believe that there are more people on the
>
network list, who knows about this)
>
>
On Fri, 26 Apr, 2002, Tomas Zahradnicky, Jr. <email@hidden> wrote:
>
>
> is possible to make an udp broadcast to look for an entity
>
> registered somewhere in the subnet and be non root? I haven't found
>
> any other way which will be cross platform then registering on some
>
> udp port and wait for broadcasts and respond to the broadcast
>
> originator with my data. NSL seems to be not working properly and
>
> ldap module is no longer supported.
>
>
As far as I know, any UDP access needs root access.
>
(anybody, correct me if I'm wrong)
UDP only requires root privileges if your trying to bind to a port number
less than 1024 or is it 4096? I can never remember. There should be no
issues using UDP on ports greater than that arbitrary magic number. There
should also be no problem using multicast or broadcast to find other nodes
on your network. I would recommend you use multicast instead of broadcast.
Multicast will let you find all nodes on the local network without having to
know all of the subnets.
For example, if you've got a setup with a class C network (192.168.15.1/24)
the subnet broadcast would be 192.168.15.255. If, on the same network,
you've also got another class C (10.0.1.1/24), the subnet broadcast would be
10.0.1.255. If you send a broadcast to 192.168.15.255 you will only get
responses from other computers on the 192.168.15.0/24 network. Any machine
configured with a 10.0.1.* address will not respond (unless it also has a
192.168.15.* address).
If you use multicast and send to the all-hosts multicast address (I think
it's 224.0.0.1 but my memory is not very reliable), any hosts on the local
link that are listening for traffic to the all-hosts multicast will receive
the packet.
For more documentation on multicast, I recommend Stevens' Unix Network
Programming Volume 1.
-josh
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.