/system/core/libcutils/ |
debugger.c | 32 static int send_request(int sock_fd, void* msg_ptr, size_t msg_len) { 34 if (TEMP_FAILURE_RETRY(write(sock_fd, msg_ptr, msg_len)) != (ssize_t) msg_len) { 38 if (TEMP_FAILURE_RETRY(read(sock_fd, &ack, 1)) != 1) { 51 int sock_fd = socket_local_client(DEBUGGER_SOCKET_NAME, ANDROID_SOCKET_NAMESPACE_ABSTRACT, local 53 if (sock_fd < 0) { 61 if (setsockopt(sock_fd, SOL_SOCKET, SO_RCVTIMEO, &tm, sizeof(tm)) == -1) { 65 if (setsockopt(sock_fd, SOL_SOCKET, SO_SNDTIMEO, &tm, sizeof(tm)) == -1) { 70 if (send_request(sock_fd, &msg, sizeof(msg)) < 0) { 71 close(sock_fd); 75 return sock_fd; 83 int sock_fd = make_dump_request(DEBUGGER_ACTION_DUMP_BACKTRACE, tid, timeout_secs); local 107 int sock_fd = make_dump_request(DEBUGGER_ACTION_DUMP_TOMBSTONE, tid, timeout_secs); local [all...] |
/system/bt/tools/bdtool/ |
bdtool.c | 210 int sock_fd = INVALID_FD; local 211 error = sock->listen(BTSOCK_SCO, NULL, NULL, 5, &sock_fd, 0, app_uid); 242 int sock_fd = INVALID_FD; local 243 error = sock->connect(&bt_remote_bdaddr, BTSOCK_SCO, NULL, 5, &sock_fd, 0, app_uid);
|
/device/huawei/angler/camera/QCamera2/stack/mm-camera-test/src/ |
mm_qcamera_socket.c | 546 int sock_fd = -1; local 563 sock_fd = socket(AF_INET, SOCK_STREAM, 0); 564 if (sock_fd < 0) { 566 return sock_fd; 570 socket_flag = fcntl(sock_fd, F_GETFL, 0); 571 fcntl(sock_fd, F_SETFL, socket_flag | O_NONBLOCK); 575 result = setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, 580 close(sock_fd); 581 sock_fd = -1; 582 return sock_fd; [all...] |
/device/lge/bullhead/camera/QCamera2/stack/mm-camera-test/src/ |
mm_qcamera_socket.c | 546 int sock_fd = -1; local 563 sock_fd = socket(AF_INET, SOCK_STREAM, 0); 564 if (sock_fd < 0) { 566 return sock_fd; 570 socket_flag = fcntl(sock_fd, F_GETFL, 0); 571 fcntl(sock_fd, F_SETFL, socket_flag | O_NONBLOCK); 575 result = setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, 580 close(sock_fd); 581 sock_fd = -1; 582 return sock_fd; [all...] |
/device/moto/shamu/camera/QCamera2/stack/mm-camera-test/src/ |
mm_qcamera_socket.c | 545 int sock_fd = -1; local 562 sock_fd = socket(AF_INET, SOCK_STREAM, 0); 563 if (sock_fd < 0) { 565 return sock_fd; 569 socket_flag = fcntl(sock_fd, F_GETFL, 0); 570 fcntl(sock_fd, F_SETFL, socket_flag | O_NONBLOCK); 574 result = setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, 579 close(sock_fd); 580 sock_fd = -1; 581 return sock_fd; [all...] |
/hardware/qcom/camera/QCamera2/stack/mm-camera-test/src/ |
mm_qcamera_socket.c | 551 int sock_fd = -1; local 568 sock_fd = socket(AF_INET, SOCK_STREAM, 0); 569 if (sock_fd < 0) { 571 return sock_fd; 575 socket_flag = fcntl(sock_fd, F_GETFL, 0); 576 fcntl(sock_fd, F_SETFL, socket_flag | O_NONBLOCK); 580 result = setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, 585 close(sock_fd); 586 sock_fd = -1; 587 return sock_fd; [all...] |
/system/core/debuggerd/ |
debuggerd.cpp | 369 int sock_fd = socket_local_client(DEBUGGER32_SOCKET_NAME, ANDROID_SOCKET_NAMESPACE_ABSTRACT, local 371 if (sock_fd < 0) { 376 if (TEMP_FAILURE_RETRY(write(sock_fd, &msg, sizeof(msg))) != (ssize_t) sizeof(msg)) { 378 close(sock_fd); 383 if (TEMP_FAILURE_RETRY(read(sock_fd, &ack, 1)) == -1) { 385 close(sock_fd); 391 while ((bytes_read = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer)))) > 0) { 412 close(sock_fd);
|
/external/ppp/pppd/ |
sys-linux.c | 179 static int sock_fd = -1; /* socket for doing interface ioctls */ variable 317 sock_fd = socket(AF_INET, SOCK_DGRAM, 0); 318 if (sock_fd < 0) 369 if (sock_fd >= 0) 370 close(sock_fd); 1200 if (ifunit >= 0 && ioctl(sock_fd, SIOCSIFMTU, (caddr_t) &ifr) < 0) 1215 if (ifunit >= 0 && ioctl(sock_fd, SIOCGIFMTU, (caddr_t) &ifr) < 0) { 1871 int ret, sock_fd; local [all...] |
/external/libpcap/ |
pcap-linux.c | 419 static int has_wext(int sock_fd, const char *device, char *ebuf); 421 static int enter_rfmon_mode(pcap_t *handle, int sock_fd, 669 add_mon_if(pcap_t *handle, int sock_fd, struct nl80211_state *state, 676 ifindex = iface_get_id(sock_fd, device, handle->errbuf); 765 del_mon_if(pcap_t *handle, int sock_fd, struct nl80211_state *state, 772 ifindex = iface_get_id(sock_fd, mondevice, handle->errbuf); 819 enter_rfmon_mode_mac80211(pcap_t *handle, int sock_fd, const char *device) 857 ret = add_mon_if(handle, sock_fd, &nlstate, device, mondevice); 905 if (ioctl(sock_fd, SIOCGIFFLAGS, &ifr) == -1) { 909 del_mon_if(handle, sock_fd, &nlstate, device 988 int sock_fd; local 3145 int sock_fd = -1, arptype; local [all...] |