ADC Home > Reference Library > Technical Q&As > Networking > Carbon >

Not Recommended Documentclose button

Important: The information in this document is Not Recommended and should not be used for new development.

Current information on this Reference Library topic can be found here:

fBroadCastAddr Always Zero



Q:When I call OTInetGetInterfaceInfo, the fBroadcastAddr field always comes back as zero. Is this a bug?

A: Not really. The field describes how the broadcast address was configured. If it is zero, the broadcast address has not been explicitly configured. In this case, IP will synthesize a broadcast address based on the IP address and subnet mask.

If the broadcast address was explicitly configured, fBroadcastAddr will be the configured address. On current systems, the only time fBroadcastAddr is non-zero is when a DHCP server supplies it via DHCP option 28.

You can calculate the actual broadcast address being used with the following code.

broadcastAddr = info.fBroadcastAddr;
if (broadcastAddr == 0) {
    broadcastAddr = info.fAddress | ~info.fNetmask;
}

[Mar 08 1999]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.