MCPcopy Create free account
hub / github.com/F-Stack/f-stack / in_ifaddr_broadcast

Function in_ifaddr_broadcast

freebsd/netinet/in.c:1132–1149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1130}
1131
1132int
1133in_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.

Callers 2

ip_outputFunction · 0.85
in_broadcastFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected