| 1130 | } |
| 1131 | |
| 1132 | int |
| 1133 | in_ifaddr_broadcast(struct in_addr in, struct in_ifaddr *ia) |
| 1134 | { |
| 1135 | |
| 1136 | return ((in.s_addr == ia->ia_broadaddr.sin_addr.s_addr || |
| 1137 | /* |
| 1138 | * Check for old-style (host 0) broadcast, but |
| 1139 | * taking into account that RFC 3021 obsoletes it. |
| 1140 | */ |
| 1141 | (ia->ia_subnetmask != IN_RFC3021_MASK && |
| 1142 | ntohl(in.s_addr) == ia->ia_subnet)) && |
| 1143 | /* |
| 1144 | * Check for an all one subnetmask. These |
| 1145 | * only exist when an interface gets a secondary |
| 1146 | * address. |
| 1147 | */ |
| 1148 | ia->ia_subnetmask != (u_long)0xffffffff); |
| 1149 | } |
| 1150 | |
| 1151 | /* |
| 1152 | * Return 1 if the address might be a local broadcast address. |
no outgoing calls
no test coverage detected