FreeBSD/contrib/ntp/ntpd/ntp_io.c
/*
 * create_sockets - create a socket for each interface plus a default
 *			socket for when we don't know where to send
 */
create a socket for each interface plus a default
socket for when we don't know where to send
create a socket for each interface plus a default socket for when we don ' t know where to send
static int
create_sockets(
	u_short port
	)
{
#ifndef HAVE_IO_COMPLETION_PORT
	maxactivefd = 0;
	FD_ZERO(&activefds);
#endif
	DPRINTF(2, ("create_sockets(%d)\n", port));
	create_wildcards(port);
	update_interfaces(port, NULL, NULL);
	set_reuseaddr(0);
	DPRINTF(2, ("create_sockets: Total interfaces = %d\n", ninterfaces));
	return ninterfaces;
}
static int create_sockets ( u_short port ) { #ifndef HAVE_IO_COMPLETION_PORT maxactivefd = 0 ; FD_ZERO ( & activefds ) ; #endif DPRINTF ( 2 , ( " \n " , port ) ) ; create_wildcards ( port ) ; update_interfaces ( port , NULL , NULL ) ; set_reuseaddr ( 0 ) ; DPRINTF ( 2 , ( " \n " , ninterfaces ) ) ; return ninterfaces ; }
create_sockets - create a socket for each interface plus a default
                      socket for when we don't know where to send
create_sockets - create a socket for each interface plus a default socket for when we don ' t know where to send
/*
	 * I/O Completion Ports don't care about the select and FD_SET
	 */ /*
	 * Now that we have opened all the sockets, turn off the reuse
	 * flag for security.
	 */