net.c revision 9c3531d72aeaad6c5f01efe6a1c82023e1379e4d
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 1999, 2000 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * copyright notice and this permission notice appear in all copies.
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
4b01d45a49f1c2cc4bddc9a1b4c78232867de134Andreas Gustafsson/* $Id: net.c,v 1.10 2000/06/22 21:58:43 tale Exp $ */
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
194e2dfffa6a167b8eef0ad11864026b423a1c30Mark Andrewsconst struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrewsstatic isc_result_t ipv4_result = ISC_R_NOTFOUND;
938440694b33cd752e9e4b71a526368b4811c177Tinderbox Userstatic isc_result_t ipv6_result = ISC_R_NOTFOUND;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein if (s == -1) {
821350367e2c7313c02eb275e8e05d5193b47cfdJeremy C. Reed "socket() failed: %s",
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * Check if the system's kernel supports IPv4.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein * Check if the system's kernel supports IPv6.