net.c revision 1a69a1a78cfaa86f3b68bbc965232b7876d4da2a
499b34cea04a46823d003d4c0520c8b03e8513cbBrian Wellington * Copyright (C) 1999, 2000 Internet Software Consortium.
6d4886fa7430889a96dbf9b88a2a4eb6f9d04674Brian Wellington * Permission to use, copy, modify, and distribute this software for any
6d4886fa7430889a96dbf9b88a2a4eb6f9d04674Brian Wellington * purpose with or without fee is hereby granted, provided that the above
6d4886fa7430889a96dbf9b88a2a4eb6f9d04674Brian Wellington * copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
15a44745412679c30a6d022733925af70a38b715David Lawrence * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
15a44745412679c30a6d022733925af70a38b715David Lawrence * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
15a44745412679c30a6d022733925af70a38b715David Lawrence * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
15a44745412679c30a6d022733925af70a38b715David Lawrence * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15a44745412679c30a6d022733925af70a38b715David Lawrence * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
15a44745412679c30a6d022733925af70a38b715David Lawrence * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
100d0d2ec64ab1a85f8c0d2da9b47ae411a10b21Brian Wellington#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
6028d1ce0380d0ba7f6c6ecd1ad20b31ddd1becbDavid Lawrenceconst struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
a5e73f3e9d909e86baca18713c5697f52aca87caBrian Wellingtonstatic isc_result_t ipv4_result = ISC_R_NOTFOUND;
6d4886fa7430889a96dbf9b88a2a4eb6f9d04674Brian Wellingtonstatic isc_result_t ipv6_result = ISC_R_NOTFOUND;
6d4886fa7430889a96dbf9b88a2a4eb6f9d04674Brian Wellington if (s == -1) {
1e2749dba8aae3233b8962f1efe15385e92a77d9Brian Wellington "socket() failed: %s",
4755b174df8221dff7e872f21d42b3572a74bf2fAndreas Gustafsson RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
4755b174df8221dff7e872f21d42b3572a74bf2fAndreas Gustafsson * Check if the system's kernel supports IPv4.
e61793f0865117ad87a19d6e245bea8f3b712d1bDanny Mayer * Check if the system's kernel supports IPv6.