/external/ltp/testcases/kernel/containers/share/ |
ns_ifmove.c | 52 int sock_fd; local 58 sock_fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); 59 if (sock_fd == -1) { 65 if (ioctl(sock_fd, SIOCGIFINDEX, &ifr) == -1) { 67 close(sock_fd); 71 close(sock_fd);
|
/system/connectivity/wifilogd/ |
os.cpp | 44 int sock_fd = raw_os_->GetControlSocket(socket_name.c_str()); local 45 if (sock_fd < 0) { 48 return {sock_fd, 0};
|
/external/ltp/testcases/cve/ |
cve-2016-4997.c | 103 int ret, sock_fd; local 106 sock_fd = SAFE_SOCKET(AF_INET, SOCK_DGRAM, 0); 119 ret = setsockopt(sock_fd, SOL_IP, IPT_SO_SET_REPLACE,
|
/external/ltp/testcases/network/stress/ns-tools/ |
ns-tcpclient.c | 135 int sock_fd; /* socket descriptor for a connection */ local 270 sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); 271 if (sock_fd < 0) 276 if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int))) 281 maximize_sockbuf(sock_fd); 284 if (connect(sock_fd, res->ai_addr, res->ai_addrlen) < 0) 298 (sock_fd, SOL_SOCKET, SO_RCVBUF, &recvbuf_size, &sock_optlen) < 0) 301 fprintf(stderr, "recvbuf size of socket(%d) is %d\n", sock_fd, 319 recvbyte_size = recv(sock_fd, recvbuf, recvbuf_size, 0); 337 if (close(sock_fd) < 0 [all...] |
ns-udpclient.c | 148 int sock_fd; /* socket descriptor to access */ local 274 sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); 275 if (sock_fd < 0) 280 if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int))) 309 if (sendto(sock_fd, message, MESSAGE_LEN, 0, 320 if ((recvlen = recvfrom(sock_fd, recvbuf, MESSAGE_LEN, 0,
|
ns-udpserver.c | 136 * sock_fd: socket file descriptor 141 void respond_to_client(sock_fd) 151 if (getsockopt(sock_fd, SOL_SOCKET, SO_RCVBUF, 154 close(sock_fd); 162 close(sock_fd); 168 if ((msglen = recvfrom(sock_fd, msgbuf, msgbuf_size, 0, 178 if (sendto(sock_fd, msgbuf, msglen, 0, 196 int sock_fd; /* socket binded open ports */ local 296 sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); 297 if (sock_fd < 0 [all...] |
ns-icmpv4_sender.c | 315 int sock_fd; /* Socket for ioctl() */ local 318 if ((sock_fd = socket(AF_PACKET, SOCK_DGRAM, 0)) < 0) 329 get_ifinfo(&ifinfo, sock_fd, fake_p->src_ifname, SIOCGIFHWADDR); 333 get_ifinfo(&ifinfo, sock_fd, fake_p->src_ifname, SIOCGIFINDEX); 337 close(sock_fd); 546 int sock_fd; local 552 sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); 553 if (sock_fd < 0) 557 retval = bind(sock_fd, (struct sockaddr *)&(fake_p->saddr_ll), 582 retval = sendto(sock_fd, &pkt, fake_p->pkt_size, 0 [all...] |
ns-icmpv6_sender.c | 176 int sock_fd; /* Socket for ioctl() */ local 179 if ((sock_fd = socket(AF_PACKET, SOCK_DGRAM, 0)) < 0) 189 get_ifinfo(&ifinfo, sock_fd, ifname, SIOCGIFHWADDR); 194 close(sock_fd); 716 int sock_fd; local 722 sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6)); 723 if (sock_fd < 0) 727 retval = bind(sock_fd, (struct sockaddr *)&(info_p->saddr_ll), 752 retval = sendto(sock_fd, &pkt, info_p->pkt_size, 0, 772 close(sock_fd); [all...] |
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/PyMod-2.7.2/Modules/ |
socketmodule.h | 126 SOCKET_T sock_fd; /* Socket file descriptor */
member in struct:__anon4241
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Modules/ |
socketmodule.h | 126 SOCKET_T sock_fd; /* Socket file descriptor */
member in struct:__anon4816
|
/external/mesa3d/src/gallium/winsys/virgl/vtest/ |
virgl_vtest_winsys.h | 46 int sock_fd; member in struct:virgl_vtest_winsys
|
/system/bt/tools/bdtool/ |
bdtool.c | 224 int sock_fd = INVALID_FD; local 225 error = sock->listen(BTSOCK_SCO, NULL, NULL, 5, &sock_fd, 0, app_uid); 261 int sock_fd = INVALID_FD; local 262 error = sock->connect(&bt_remote_bdaddr, BTSOCK_SCO, NULL, 5, &sock_fd, 0,
|
/device/google/marlin/camera/QCamera2/stack/mm-camera-test/src/ |
mm_qcamera_socket.c | 553 int sock_fd = -1; local 570 sock_fd = socket(AF_INET, SOCK_STREAM, 0); 571 if (sock_fd < 0) { 573 return sock_fd; 577 socket_flag = fcntl(sock_fd, F_GETFL, 0); 578 fcntl(sock_fd, F_SETFL, socket_flag | O_NONBLOCK); 582 result = setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, 587 close(sock_fd); 588 sock_fd = -1; 589 return sock_fd; [all...] |
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Modules/ |
socketmodule.h | 126 SOCKET_T sock_fd; /* Socket file descriptor */
member in struct:__anon4475
|
socketmodule.c | 471 #define IS_SELECTABLE(s) (_PyIsSelectable_fd((s)->sock_fd) || (s)->sock_timeout <= 0.0)
605 sendsegmented(int sock_fd, char *buf, int len, int flags)
614 n = send(sock_fd, buf, segment, flags);
640 setsockopt(s->sock_fd, SOL_SOCKET, SO_NONBLOCK,
647 ioctl(s->sock_fd, FIONBIO, (caddr_t)&block, sizeof(block));
650 ioctl(s->sock_fd, FIONBIO, (unsigned int *)&block);
652 delay_flag = fcntl(s->sock_fd, F_GETFL, 0);
657 fcntl(s->sock_fd, F_SETFL, delay_flag);
661 ioctlsocket(s->sock_fd, FIONBIO, (u_long*)&block);
665 socketioctl(s->sock_fd, FIONBIO, (u_long*)&block); 3129 long sock_fd; local [all...] |
/external/python/cpython2/Modules/ |
socketmodule.h | 126 SOCKET_T sock_fd; /* Socket file descriptor */ member in struct:__anon32870
|
socketmodule.c | 495 #define IS_SELECTABLE(s) (_PyIsSelectable_fd((s)->sock_fd) || (s)->sock_timeout <= 0.0) 629 sendsegmented(int sock_fd, char *buf, int len, int flags) 638 n = send(sock_fd, buf, segment, flags); 664 setsockopt(s->sock_fd, SOL_SOCKET, SO_NONBLOCK, 671 ioctl(s->sock_fd, FIONBIO, (caddr_t)&block, sizeof(block)); 674 ioctl(s->sock_fd, FIONBIO, (unsigned int *)&block); 676 delay_flag = fcntl(s->sock_fd, F_GETFL, 0); 681 fcntl(s->sock_fd, F_SETFL, delay_flag); 685 ioctlsocket(s->sock_fd, FIONBIO, (u_long*)&block); 689 socketioctl(s->sock_fd, FIONBIO, (u_long*)&block) 3154 long sock_fd; local [all...] |
/external/python/cpython3/Modules/ |
socketmodule.h | 170 SOCKET_T sock_fd; /* Socket file descriptor */ member in struct:__anon33498
|
socketmodule.c | 521 #define IS_SELECTABLE(s) (_PyIsSelectable_fd((s)->sock_fd) || (s)->sock_timeout <= 0) 646 if (ioctl(s->sock_fd, FIONBIO, (unsigned int *)&block) == -1) 649 delay_flag = fcntl(s->sock_fd, F_GETFL, 0); 657 if (fcntl(s->sock_fd, F_SETFL, new_delay_flag) == -1) 662 if (ioctlsocket(s->sock_fd, FIONBIO, &arg) != 0) 705 if (s->sock_fd == INVALID_SOCKET) 711 pollfd.fd = s->sock_fd; 737 FD_SET(s->sock_fd, &fds); 744 FD_SET(s->sock_fd, &efds); 750 n = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int) 4596 long sock_fd; local [all...] |
/hardware/qcom/camera/msm8998/QCamera2/stack/mm-camera-test/src/ |
mm_qcamera_socket.c | 554 int sock_fd = -1; local 571 sock_fd = socket(AF_INET, SOCK_STREAM, 0); 572 if (sock_fd < 0) { 574 return sock_fd; 578 socket_flag = fcntl(sock_fd, F_GETFL, 0); 579 fcntl(sock_fd, F_SETFL, socket_flag | O_NONBLOCK); 583 result = setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, 588 close(sock_fd); 589 sock_fd = -1; 590 return sock_fd; [all...] |
/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 | 430 static int has_wext(int sock_fd, const char *device, char *ebuf); 432 static int enter_rfmon_mode(pcap_t *handle, int sock_fd, 679 del_mon_if(pcap_t *handle, int sock_fd, struct nl80211_state *state, 683 add_mon_if(pcap_t *handle, int sock_fd, struct nl80211_state *state, 691 ifindex = iface_get_id(sock_fd, device, handle->errbuf); 780 del_mon_if(handle, sock_fd, state, device, mondevice); 794 del_mon_if(pcap_t *handle, int sock_fd, struct nl80211_state *state, 801 ifindex = iface_get_id(sock_fd, mondevice, handle->errbuf); 848 enter_rfmon_mode_mac80211(pcap_t *handle, int sock_fd, const char *device) 886 ret = add_mon_if(handle, sock_fd, &nlstate, device, mondevice) 1019 int sock_fd; local 3320 int sock_fd = -1, arptype; local [all...] |