/external/mesa3d/src/gallium/winsys/virgl/vtest/ |
H A D | virgl_vtest_socket.c | 99 virgl_block_write(vws->sock_fd, &buf, sizeof(buf)); 100 virgl_block_write(vws->sock_fd, (void *)cmdline, strlen(cmdline) + 1); 124 vws->sock_fd = sock; 139 virgl_block_write(vws->sock_fd, &get_caps_buf, sizeof(get_caps_buf)); 141 ret = virgl_block_read(vws->sock_fd, resp_buf, sizeof(resp_buf)); 145 ret = virgl_block_read(vws->sock_fd, &caps->caps, sizeof(union virgl_caps)); 178 virgl_block_write(vws->sock_fd, &vtest_hdr, sizeof(vtest_hdr)); 179 virgl_block_write(vws->sock_fd, &res_create_buf, sizeof(res_create_buf)); 192 virgl_block_write(vws->sock_fd, &vtest_hdr, sizeof(vtest_hdr)); 193 virgl_block_write(vws->sock_fd, cbu [all...] |
H A D | virgl_vtest_winsys.h | 46 int sock_fd; member in struct:virgl_vtest_winsys
|
/external/ltp/testcases/network/stress/ns-tools/ |
H A D | 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 < [all...] |
H A D | 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) < [all...] |
H A D | 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,
|
H A D | 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, [all...] |
H A D | ns-tcpserver.c | 284 * sock_fd: socket descriptor to communicate with client 291 int communicate_client(struct server_info *info_p, int sock_fd) argument 304 (sock_fd, SOL_SOCKET, SO_SNDBUF, &sndbuf_size, 307 if (close(sock_fd)) 319 if (close(sock_fd)) 333 sntbyte_size = send(sock_fd, sendmsg, sndbuf_size, 0); 362 if (close(sock_fd))
|
H A D | 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...] |
H A D | ns-traffic.h | 232 void get_ifinfo(struct ifreq *ans, int sock_fd, const char *ifname, int query);
|
H A D | ns-common.c | 296 * sock_fd : socket file descriptor 304 void get_ifinfo(struct ifreq *ans, int sock_fd, const char *ifname, int query) argument 309 if (ioctl(sock_fd, query, ans) < 0)
|
/external/ltp/testcases/kernel/containers/share/ |
H A D | 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);
|
/external/ltp/testcases/cve/ |
H A D | 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/libpcap/ |
H A D | 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, argument 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, argument 801 ifindex = iface_get_id(sock_fd, mondevice, handle->errbuf); 848 enter_rfmon_mode_mac80211(pcap_t *handle, int sock_fd, const char *device) argument 886 ret = add_mon_if(handle, sock_fd, 1019 int sock_fd; local 2878 map_arphrd_to_dlt(pcap_t *handle, int sock_fd, int arptype, const char *device, int cooked_ok) argument 3320 int sock_fd = -1, arptype; local 5335 has_wext(int sock_fd, const char *device, char *ebuf) argument 5383 enter_rfmon_mode_wext(pcap_t *handle, int sock_fd, const char *device) argument 5999 enter_rfmon_mode(pcap_t *handle, int sock_fd, const char *device) argument [all...] |
/external/ppp/pppd/ |
H A D | 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) { 1383 if (ioctl(sock_fd, SIOCGPPPSTATS, &req) < 0) { 1649 if (ioctl(sock_fd, SIOCADDRT, &rt) < 0) { 1682 if (ioctl(sock_fd, SIOCDELR 1871 int ret, sock_fd; local [all...] |
/external/python/cpython2/Modules/ |
H A D | 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) argument 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, FIONBI 3154 long sock_fd; local [all...] |
H A D | socketmodule.h | 126 SOCKET_T sock_fd; /* Socket file descriptor */ member in struct:__anon19538
|
H A D | _ssl.c | 570 SSL_set_fd(self->ssl, Py_SAFE_DOWNCAST(sock->sock_fd, SOCKET_T, int)); 1624 if (s->sock_fd < 0) 1634 pollfd.fd = s->sock_fd; 1648 if (!_PyIsSelectable_fd(s->sock_fd)) 1655 FD_SET(s->sock_fd, &fds); 1660 rc = select(s->sock_fd+1, NULL, &fds, NULL, &tv); 1662 rc = select(s->sock_fd+1, &fds, NULL, NULL, &tv); 1900 if (sock->sock_fd < 0) {
|
/external/python/cpython3/Modules/ |
H A D | 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 4596 long sock_fd; local [all...] |
H A D | socketmodule.h | 170 SOCKET_T sock_fd; /* Socket file descriptor */ member in struct:__anon20166
|
H A D | _ssl.c | 627 SSL_set_fd(self->ssl, Py_SAFE_DOWNCAST(sock->sock_fd, SOCKET_T, int)); 1895 if (s->sock_fd == INVALID_SOCKET) 1901 pollfd.fd = s->sock_fd; 1913 if (!_PyIsSelectable_fd(s->sock_fd)) 1919 FD_SET(s->sock_fd, &fds); 1923 nfds = Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int); 2219 if ((((PyObject*)sock) == Py_None) || (sock->sock_fd == INVALID_SOCKET)) {
|
/external/wayland/src/ |
H A D | wayland-server.c | 1311 * \param sock_fd The existing socket file descriptor to be used 1321 wl_display_add_socket_fd(struct wl_display *display, int sock_fd) argument 1327 if (sock_fd < 0 || fstat(sock_fd, &buf) < 0 || !S_ISSOCK(buf.st_mode)) { 1335 s->source = wl_event_loop_add_fd(display->loop, sock_fd, 1345 s->fd = sock_fd;
|
H A D | wayland-server-core.h | 128 wl_display_add_socket_fd(struct wl_display *display, int sock_fd);
|
/external/python/cpython3/Lib/test/test_asyncio/ |
H A D | test_selector_events.py | 802 self.sock_fd = self.sock.fileno.return_value = 7 1140 remove_writer.assert_called_with(self.sock_fd)
|
/external/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_common_interceptors.inc | 2168 INTERCEPTOR(int, getsockname, int sock_fd, void *addr, int *addrlen) { 2170 COMMON_INTERCEPTOR_ENTER(ctx, getsockname, sock_fd, addr, addrlen); 2176 int res = REAL(getsockname)(sock_fd, addr, addrlen);
|