Lines Matching defs:sock

331 static isc_boolean_t portavailable(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
688 "shutting down; detaching from sock %p, task %p",
811 isc_socket_t *sock = NULL;
835 sock = dispsock->socket;
873 result = open_socket(sockmgr, &localaddr, bindoptions, &sock);
895 dispsock->socket = sock;
908 if (sock != NULL)
909 isc_socket_detach(&sock);
1748 isc_socket_t *sock;
1751 sock = *sockp;
1752 if (sock == NULL) {
1754 isc_sockettype_udp, &sock);
1757 isc_socket_setname(sock, "dispatcher", NULL);
1759 result = isc_socket_open(sock);
1765 isc_socket_ipv6only(sock, ISC_TRUE);
1767 result = isc_socket_bind(sock, local, options);
1770 isc_socket_detach(&sock);
1772 isc_socket_close(sock);
1776 *sockp = sock;
2165 portavailable(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
2174 REQUIRE(sock != NULL || sockaddrp != NULL);
2177 if (sock != NULL) {
2179 result = isc_socket_getsockname(sock, sockaddrp);
2501 dns_dispatch_createtcp(dns_dispatchmgr_t *mgr, isc_socket_t *sock,
2514 REQUIRE(isc_socket_gettype(sock) == isc_sockettype_tcp);
2539 isc_socket_attach(sock, &disp->socket);
2685 isc_socket_t *sock = NULL;
2720 0, &sock);
2729 *sockp = sock;
2740 ISC_SOCKET_REUSEADDRESS, &sock);
2743 *sockp = sock;
2752 result = open_socket(sockmgr, localaddr, 0, &sock);
2755 else if (portavailable(mgr, sock, NULL))
2759 held[i++] = sock;
2760 sock = NULL;
2772 *sockp = sock;
2793 isc_socket_t *sock = NULL;
2805 result = get_udpsocket(mgr, disp, sockmgr, localaddr, &sock);
2819 result = open_socket(sockmgr, localaddr, 0, &sock);
2820 if (sock != NULL)
2821 isc_socket_detach(&sock);
2842 disp->socket = sock;