FreeBSD/contrib/ntp/ntpd/ntp_io.c
/*
 * Remove a broadcast address from a given socket
 * The socket is in the ep_list all we need to do is disable
 * broadcasting. It is not this function's job to select the socket
 */
Remove a broadcast address from a given socket
The socket is in the ep_list all we need to do is disable
broadcasting. It is not this function's job to select the socket
Remove a broadcast address from a given socket The socket is in the ep_list all we need to do is disable broadcasting . It is not this function ' s job to select the socket
static isc_boolean_t
socket_broadcast_disable(
	struct interface *	iface,
	sockaddr_u *		baddr
	)
{
#ifdef SO_BROADCAST
	int off = 0;	
	if (IS_IPV4(baddr) && setsockopt(iface->fd, SOL_SOCKET,
	    SO_BROADCAST, (char *)&off, sizeof(off)))
		msyslog(LOG_ERR,
			"setsockopt(SO_BROADCAST) disable failure on address %s: %m",
			stoa(baddr));
	iface->flags &= ~INT_BCASTXMIT;
	return ISC_TRUE;
#else
	return ISC_FALSE;
#endif 
}
static isc_boolean_t socket_broadcast_disable ( struct interface * iface , sockaddr_u * baddr ) { #ifdef SO_BROADCAST int off = 0 ; if ( IS_IPV4 ( baddr ) && setsockopt ( iface -> fd , SOL_SOCKET , SO_BROADCAST , ( char * ) & off , sizeof ( off ) ) ) msyslog ( LOG_ERR , " " , stoa ( baddr ) ) ; iface -> flags &= ~ INT_BCASTXMIT ; return ISC_TRUE ; #else return ISC_FALSE ; #endif }
Remove a broadcast address from a given socket
 The socket is in the ep_list all we need to do is disable
 broadcasting.
Remove a broadcast address from a given socket The socket is in the ep_list all we need to do is disable broadcasting .
/* This seems to be OK as an int */ /* SO_BROADCAST */