interfacemgr.c revision ff64dc5d7f8072239e7c760e56551ad3c232da6f
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * Copyright (C) 1999 Internet Software Consortium.
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * Permission to use, copy, modify, and distribute this software for any
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * purpose with or without fee is hereby granted, provided that the above
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * copyright notice and this permission notice appear in all copies.
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews#define VALID_IFMGR(t) ((t) != NULL && (t)->magic == IFMGR_MAGIC)
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews isc_socketmgr_t * socketmgr; /* Socket manager. */
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews ns_dispatch_func * dispatch; /* Dispatch function */
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews unsigned int generation; /* Current generation no. */
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews ISC_LIST(ns_interface_t) interfaces; /* List of interfaces. */
30370d905e9be3be7d9b947fd432bacecbb13bb9Evan Hunt#define VALID_IFACE(t) ((t) != NULL && (t)->magic == IFACE_MAGIC)
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews ns_interfacemgr_t * mgr; /* Interface manager. */
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews unsigned int generation; /* Generation number. */
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrewsns_interfacemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrewsns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
goto udp_socket_failure;
goto udp_bind_failure;
goto tcp_socket_failure;
goto tcp_bind_failure;
return (DNS_R_SUCCESS);
return (DNS_R_UNEXPECTED);
static dns_result_t
return (DNS_R_SUCCESS);
static isc_boolean_t
static ns_interface_t *
return (ifp);
* XXX insert code to match against named.conf "listen-on"
if (ifp) {
const char *addrstr;
return (DNS_R_SUCCESS);