/external/skia/experimental/Networking/ |
D | SkSockets.cpp | 30 int sockfd = socket(AF_INET, SOCK_STREAM, 0); in createSocket() local 31 if (sockfd < 0) { in createSocket() 37 if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(int)) < 0) { in createSocket() 42 this->setNonBlocking(sockfd); in createSocket() 46 return sockfd; in createSocket() 49 void SkSocket::closeSocket(int sockfd) { in closeSocket() argument 53 close(sockfd); in closeSocket() 56 if (FD_ISSET(sockfd, &fMasterSet)) { in closeSocket() 57 FD_CLR(sockfd, &fMasterSet); in closeSocket() 58 if (sockfd >= fMaxfd) { in closeSocket() [all …]
|
D | SkSockets.h | 109 void closeSocket(int sockfd); 116 virtual void onFailedConnection(int sockfd); 121 void setNonBlocking(int sockfd); 128 void addToMasterSet(int sockfd); 192 virtual void onFailedConnection(int sockfd);
|
/external/curl/lib/ |
D | connect.c | 87 static bool verifyconnect(curl_socket_t sockfd, int *error); 108 curl_socket_t sockfd) in tcpkeepalive() argument 113 if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, in tcpkeepalive() 115 infof(data, "Failed to set SO_KEEPALIVE on fd %d\n", sockfd); in tcpkeepalive() 128 if(WSAIoctl(sockfd, SIO_KEEPALIVE_VALS, (LPVOID) &vals, sizeof(vals), in tcpkeepalive() 131 (int)sockfd, WSAGetLastError()); in tcpkeepalive() 137 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE, in tcpkeepalive() 139 infof(data, "Failed to set TCP_KEEPIDLE on fd %d\n", sockfd); in tcpkeepalive() 145 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL, in tcpkeepalive() 147 infof(data, "Failed to set TCP_KEEPINTVL on fd %d\n", sockfd); in tcpkeepalive() [all …]
|
D | nonblock.c | 47 int curlx_nonblock(curl_socket_t sockfd, /* operate on this */ in curlx_nonblock() argument 58 flags = sfcntl(sockfd, F_GETFL, 0); in curlx_nonblock() 60 return sfcntl(sockfd, F_SETFL, flags | O_NONBLOCK); in curlx_nonblock() 62 return sfcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK)); in curlx_nonblock() 68 return ioctl(sockfd, FIONBIO, &flags); in curlx_nonblock() 74 return ioctlsocket(sockfd, FIONBIO, &flags); in curlx_nonblock() 80 return IoctlSocket(sockfd, FIONBIO, (char *)&flags); in curlx_nonblock() 86 return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b)); in curlx_nonblock()
|
D | memdebug.c | 349 curl_socket_t sockfd = socket(domain, type, protocol); in curl_socket() local 351 if(source && (sockfd != CURL_SOCKET_BAD)) in curl_socket() 352 curl_memlog(fmt, source, line, sockfd); in curl_socket() 354 return sockfd; in curl_socket() 389 curl_socket_t sockfd = accept(s, addr, addrlen); in curl_accept() local 391 if(source && (sockfd != CURL_SOCKET_BAD)) in curl_accept() 392 curl_memlog(fmt, source, line, sockfd); in curl_accept() 394 return sockfd; in curl_accept() 398 void curl_mark_sclose(curl_socket_t sockfd, int line, const char *source) in curl_mark_sclose() argument 407 curl_memlog(fmt, source, line, sockfd); in curl_mark_sclose() [all …]
|
D | sendf.c | 127 const curl_socket_t sockfd = conn->sock[num]; in pre_receive_plain() local 138 const int readymask = Curl_socket_check(sockfd, CURL_SOCKET_BAD, in pre_receive_plain() 149 psnd->bindsock = sockfd; /* Used only for DEBUGASSERT */ in pre_receive_plain() 155 DEBUGASSERT(psnd->bindsock == sockfd); in pre_receive_plain() 156 recvedbytes = sread(sockfd, psnd->buffer + psnd->recv_size, in pre_receive_plain() 253 CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn, in Curl_sendf() argument 275 result = Curl_write(conn, sockfd, sptr, write_len, &bytes_written); in Curl_sendf() 306 curl_socket_t sockfd, in Curl_write() argument 313 int num = (sockfd == conn->sock[SECONDARYSOCKET]); in Curl_write() 341 curl_socket_t sockfd = conn->sock[num]; in Curl_send_plain() local [all …]
|
D | sendf.h | 27 CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *, 60 CURLcode Curl_read_plain(curl_socket_t sockfd, 71 CURLcode Curl_read(struct connectdata *conn, curl_socket_t sockfd, 76 curl_socket_t sockfd, 82 curl_socket_t sockfd,
|
D | connect.h | 65 void Curl_sndbufset(curl_socket_t sockfd); 70 void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd); 103 curl_socket_t *sockfd); 105 void Curl_tcpnodelay(struct connectdata *conn, curl_socket_t sockfd);
|
D | memdebug.h | 57 CURL_EXTERN void curl_mark_sclose(curl_socket_t sockfd, 59 CURL_EXTERN int curl_sclose(curl_socket_t sockfd, 142 #define sclose(sockfd) curl_sclose(sockfd,__LINE__,__FILE__) argument 144 #define fake_sclose(sockfd) curl_mark_sclose(sockfd,__LINE__,__FILE__) argument
|
D | gopher.c | 79 curl_socket_t sockfd = conn->sock[FIRSTSOCKET]; in gopher_do() local 121 result = Curl_write(conn, sockfd, sel, k, &amount); in gopher_do() 147 Curl_socket_ready(CURL_SOCKET_BAD, sockfd, 100); in gopher_do() 154 result = Curl_sendf(sockfd, conn, "\r\n"); in gopher_do()
|
/external/iptables/extensions/ |
D | libxt_set.h | 19 int res, sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); in get_version() local 23 if (sockfd < 0) in get_version() 27 if (fcntl(sockfd, F_SETFD, FD_CLOEXEC) == -1) { in get_version() 34 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req_version, &size); in get_version() 41 return sockfd; in get_version() 49 int res, sockfd; in get_set_byid() local 51 sockfd = get_version(&req.version); in get_set_byid() 54 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req, &size); in get_set_byid() 55 close(sockfd); in get_set_byid() 78 int res, sockfd; in get_set_byname() local [all …]
|
/external/curl/docs/examples/ |
D | sendrecv.c | 32 static int wait_on_socket(curl_socket_t sockfd, int for_recv, long timeout_ms) in wait_on_socket() argument 45 FD_SET(sockfd, &errfd); /* always check for error */ in wait_on_socket() 48 FD_SET(sockfd, &infd); in wait_on_socket() 51 FD_SET(sockfd, &outfd); in wait_on_socket() 55 res = select(sockfd + 1, &infd, &outfd, &errfd, &tv); in wait_on_socket() 65 curl_socket_t sockfd; /* socket */ in main() local 101 sockfd = (curl_socket_t)sockextr; in main() 104 if(!wait_on_socket(sockfd, 0, 60000L)) { in main() 124 wait_on_socket(sockfd, 1, 60000L); in main()
|
D | externalsocket.c | 65 curl_socket_t sockfd; in opensocket() local 68 sockfd = *(curl_socket_t *)clientp; in opensocket() 71 return sockfd; in opensocket() 89 curl_socket_t sockfd; in main() local 110 if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == CURL_SOCKET_BAD) { in main() 122 if(connect(sockfd, (struct sockaddr *) &servaddr, sizeof(servaddr)) == in main() 124 close(sockfd); in main() 137 curl_easy_setopt(curl, CURLOPT_OPENSOCKETDATA, &sockfd); in main()
|
D | multi-uv.c | 52 curl_socket_t sockfd; member 55 curl_context_t* create_curl_context(curl_socket_t sockfd) in create_curl_context() argument 61 context->sockfd = sockfd; in create_curl_context() 63 uv_poll_init_socket(loop, &context->poll_handle, sockfd); in create_curl_context() 151 curl_multi_socket_action(curl_handle, context->sockfd, flags, in curl_perform()
|
/external/toybox/toys/other/ |
D | netcat.c | 95 int sockfd=-1, pollcount=2; in netcat_main() local 114 sockfd = xsocket(AF_INET, SOCK_STREAM, 0); in netcat_main() 115 fcntl(sockfd, F_SETFD, FD_CLOEXEC); in netcat_main() 117 setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &temp, sizeof(temp)); in netcat_main() 124 if (bind(sockfd, (struct sockaddr *)&address, sizeof(address))) in netcat_main() 134 temp = connect(sockfd, (struct sockaddr *)&address, sizeof(address)); in netcat_main() 136 pollfds[0].fd = sockfd; in netcat_main() 143 if (listen(sockfd, 5)) error_exit("listen"); in netcat_main() 145 getsockname(sockfd, (struct sockaddr *)&address, &len); in netcat_main() 163 pollfds[0].fd = accept(sockfd, (struct sockaddr *)&address, &len); in netcat_main() [all …]
|
D | ifconfig.c | 56 int sockfd; in GLOBALS() argument 113 if (ioctl(TT.sockfd, SIOCGIFFLAGS, &ifre)<0) perror_exit_raw(name); in display_ifconfig() 118 i = ioctl(TT.sockfd, SIOCGIFHWADDR, &ifre); in display_ifconfig() 134 ioctl(TT.sockfd, SIOCGIFADDR, &ifre); in display_ifconfig() 155 if (addr[i].ioctl && ioctl(TT.sockfd, addr[i].ioctl, &ifre)) in display_ifconfig() 222 if (ioctl(TT.sockfd, SIOCGIFMTU, &ifre) < 0) ifre.ifr_mtu = 0; in display_ifconfig() 224 if (ioctl(TT.sockfd, SIOCGIFMETRIC, &ifre) < 0) ifre.ifr_metric = 0; in display_ifconfig() 239 if (ioctl(TT.sockfd, SIOCGIFTXQLEN, &ifre) >= 0) val[16] = ifre.ifr_qlen; in display_ifconfig() 251 if(!ioctl(TT.sockfd, SIOCGIFMAP, &ifre) && (ifre.ifr_map.irq || in display_ifconfig() 317 xioctl(TT.sockfd, SIOCGIFCONF, &ifcon); in show_iface() [all …]
|
/external/toybox/toys/pending/ |
D | brctl.c | 39 int sockfd; in GLOBALS() argument 54 xioctl(TT.sockfd, SIOCDEVPRIVATE, &ifr); 68 if (ioctl(TT.sockfd, SIOCDEVPRIVATE, &ifr) < 0) { in get_br_info() 82 num = ioctl(TT.sockfd, SIOCGIFBR, args); //ret is num of bridges found in br_show() 119 xioctl(TT.sockfd, SIOCBRADDBR, argv[0]); in br_addbr() 122 xioctl(TT.sockfd, SIOCSIFBR, args); in br_addbr() 132 xioctl(TT.sockfd, SIOCBRDELBR, argv[0]); in br_delbr() 135 xioctl(TT.sockfd, SIOCSIFBR, args); in br_delbr() 148 xioctl(TT.sockfd, SIOCBRADDIF, &ifr); in br_addif() 153 xioctl(TT.sockfd, SIOCDEVPRIVATE, &ifr); in br_addif() [all …]
|
D | dhcp.c | 178 int sockfd; member 581 if (state->sockfd > 0) close(state->sockfd); in mode_raw() 584 state->sockfd = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); in mode_raw() 585 if (state->sockfd < 0) { in mode_raw() 586 dbg("MODE RAW : socket fail ERROR : %d\n", state->sockfd); in mode_raw() 589 dbg("Got raw socket fd %d\n", state->sockfd); in mode_raw() 595 if (bind(state->sockfd, (struct sockaddr *) &sock, sizeof(sock))) { in mode_raw() 597 close(state->sockfd); in mode_raw() 601 …if (setsockopt(state->sockfd, SOL_SOCKET, SO_ATTACH_FILTER, &filter_prog, sizeof(filter_prog)) < 0) in mode_raw() 615 if (state->sockfd > 0) close(state->sockfd); in mode_app() [all …]
|
/external/ppp/pppd/plugins/radius/ |
D | sendserver.c | 194 int sockfd; in rc_send_server() local 235 sockfd = socket (AF_INET, SOCK_DGRAM, 0); in rc_send_server() 236 if (sockfd < 0) in rc_send_server() 249 if (bind (sockfd, (struct sockaddr *) sin, length) < 0 || in rc_send_server() 250 getsockname (sockfd, (struct sockaddr *) sin, &length) < 0) in rc_send_server() 252 close (sockfd); in rc_send_server() 296 sendto (sockfd, (char *) auth, (unsigned int) total_length, (int) 0, in rc_send_server() 302 FD_SET (sockfd, &readfds); in rc_send_server() 303 if (select (sockfd + 1, &readfds, NULL, NULL, &authtime) < 0) in rc_send_server() 309 close (sockfd); in rc_send_server() [all …]
|
/external/iproute2/tc/ |
D | em_ipset.c | 74 int res, sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); in get_version() local 78 if (sockfd < 0) { in get_version() 84 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req_version, &size); in get_version() 91 return sockfd; in get_version() 96 int sockfd, res; in do_getsockopt() local 98 sockfd = get_version(&req->version); in do_getsockopt() 99 if (sockfd < 0) in do_getsockopt() 101 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, req, &size); in do_getsockopt() 104 close(sockfd); in do_getsockopt()
|
/external/nanopb-c/examples/network_server/ |
D | client.c | 90 int sockfd; in main() local 97 sockfd = socket(AF_INET, SOCK_STREAM, 0); in main() 104 if (connect(sockfd, (struct sockaddr *)&servaddr, sizeof(servaddr)) != 0) in main() 110 if (!listdir(sockfd, path)) in main() 113 close(sockfd); in main()
|
/external/mdnsresponder/mDNSPosix/ |
D | mDNSUNP.c | 95 int sockfd = -1; in get_ifi_info_linuxv6() local 104 sockfd = socket(AF_INET6, SOCK_DGRAM, 0); in get_ifi_info_linuxv6() 105 if (sockfd < 0) { in get_ifi_info_linuxv6() 174 if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0) { in get_ifi_info_linuxv6() 207 if (sockfd != -1) { in get_ifi_info_linuxv6() 209 int sockfd_closed = close(sockfd); in get_ifi_info_linuxv6() 225 int sockfd, sockf6, len, lastlen, flags, myflags; in get_ifi_info() local 242 sockfd = -1; in get_ifi_info() 247 sockfd = socket(AF_INET, SOCK_DGRAM, 0); in get_ifi_info() 248 if (sockfd < 0) { in get_ifi_info() [all …]
|
/external/curl/tests/server/ |
D | sockfilt.c | 914 curl_socket_t sockfd = CURL_SOCKET_BAD; in juggle() local 955 sockfd = listenfd; in juggle() 957 FD_SET(sockfd, &fds_read); in juggle() 958 maxfd = (int)sockfd; in juggle() 963 sockfd = *sockfdp; in juggle() 964 if(CURL_SOCKET_BAD == sockfd) { in juggle() 971 FD_SET(sockfd, &fds_read); in juggle() 973 FD_SET(sockfd, &fds_err); in juggle() 975 maxfd = (int)sockfd; in juggle() 981 sockfd = *sockfdp; in juggle() [all …]
|
/external/autotest/client/site_tests/platform_CompressedSwapPerf/src/ |
D | hog.c | 89 int sockfd; in main() local 108 sockfd = socket(AF_UNIX, SOCK_STREAM, 0); in main() 110 if (sockfd < 0) { in main() 127 if (bind(sockfd, (struct sockaddr *)&test_sock_addr, sizeof test_sock_addr)) { in main() 132 if (listen(sockfd, 1)) { in main() 138 if ((connfd = accept(sockfd, NULL, NULL)) < 0) { in main()
|
/external/mdnsresponder/mDNSShared/ |
D | dnssd_clientstub.c | 120 #define DNSServiceRefValid(X) (dnssd_SocketValid((X)->sockfd) && (((X)->sockfd ^ (X)->validator) ==… 132 dnssd_sock_t sockfd; // Connected socket between client and daemon member 387 if ((x->sockfd ^ x->validator) != ValidatorBits) in FreeDNSServiceOp() 388 …ssd_clientstub attempt to dispose invalid DNSServiceRef %p %08X %08X", x, x->sockfd, x->validator); in FreeDNSServiceOp() 393 x->sockfd = dnssd_InvalidSocket; in FreeDNSServiceOp() 439 (*ref), (*ref)->sockfd, (*ref)->validator); in ConnectToServer() 460 sdr->sockfd = dnssd_InvalidSocket; in ConnectToServer() 461 sdr->validator = sdr->sockfd ^ ValidatorBits; in ConnectToServer() 485 sdr->sockfd = (*ref)->sockfd; // Inherit primary's socket in ConnectToServer() 496 sdr->sockfd = socket(AF_DNSSD, SOCK_STREAM, 0); in ConnectToServer() [all …]
|