Re: broadcast address of a network interface
Re: broadcast address of a network interface
- Subject: Re: broadcast address of a network interface
- From: Peter Sichel <email@hidden>
- Date: Mon, 9 Feb 2009 13:25:26 -0500
On Feb 9, 2009, at 12:20 PM, Joel Reymont wrote:
Last but not least, I can't seem to be able to get hold of a
broadcast address by enumerating the interfaces, whether on my Mac
or iPhone. ifa_broadaddr is null and so is ifa_netmask!
I don't know how much of the system configuration framework is
available on the iPhone, but you should be able to find broadcast
addresses there.
In the BSD network stack, UDP broadcast requires that you use the
subnet broadcast address to determine which interface will transmit
the packet. In a dynamic IP environment, this is unreliable since
your configuration can change or be inconsistent with other nodes on
the LAN.
It's common practice to use libpcap for receive and bpftransmit for
send when implementing DHCP servers or clients (which use IP
broadcast). The BSD stack doesn't handle broadcast terribly well so
your best bet might be to go around it.
Kind Regards,
- Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden