Home
last modified time | relevance | path

Searched refs:sock_fd (Results 1 – 25 of 26) sorted by relevance

12

/third_party/mesa3d/src/gallium/winsys/virgl/vtest/
Dvirgl_vtest_socket.c140 virgl_block_write(vws->sock_fd, &buf, sizeof(buf)); in virgl_vtest_send_init()
141 virgl_block_write(vws->sock_fd, (void *)cmdline, strlen(cmdline) + 1); in virgl_vtest_send_init()
155 virgl_block_write(vws->sock_fd, &vtest_hdr, sizeof(vtest_hdr)); in virgl_vtest_negotiate_version()
161 virgl_block_write(vws->sock_fd, &vtest_hdr, sizeof(vtest_hdr)); in virgl_vtest_negotiate_version()
162 virgl_block_write(vws->sock_fd, &busy_wait_buf, sizeof(busy_wait_buf)); in virgl_vtest_negotiate_version()
164 ret = virgl_block_read(vws->sock_fd, vtest_hdr, sizeof(vtest_hdr)); in virgl_vtest_negotiate_version()
169 ret = virgl_block_read(vws->sock_fd, vtest_hdr, sizeof(vtest_hdr)); in virgl_vtest_negotiate_version()
171 ret = virgl_block_read(vws->sock_fd, busy_wait_result, sizeof(busy_wait_result)); in virgl_vtest_negotiate_version()
177 virgl_block_write(vws->sock_fd, &vtest_hdr, sizeof(vtest_hdr)); in virgl_vtest_negotiate_version()
178 virgl_block_write(vws->sock_fd, &version_buf, sizeof(version_buf)); in virgl_vtest_negotiate_version()
[all …]
Dvirgl_vtest_winsys.h47 int sock_fd; member
/third_party/ltp/testcases/network/stress/ns-tools/
Dns-udpserver.c141 void respond_to_client(int sock_fd) in respond_to_client() argument
151 if (getsockopt(sock_fd, SOL_SOCKET, SO_RCVBUF, in respond_to_client()
154 close(sock_fd); in respond_to_client()
162 close(sock_fd); in respond_to_client()
168 if ((msglen = recvfrom(sock_fd, msgbuf, msgbuf_size, 0, in respond_to_client()
178 if (sendto(sock_fd, msgbuf, msglen, 0, in respond_to_client()
196 int sock_fd; /* socket binded open ports */ in main() local
296 sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); in main()
297 if (sock_fd < 0) in main()
305 (sock_fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(int))) in main()
[all …]
Dns-tcpclient.c135 int sock_fd; /* socket descriptor for a connection */ in main() local
270 sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); in main()
271 if (sock_fd < 0) in main()
276 if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int))) in main()
281 maximize_sockbuf(sock_fd); in main()
284 if (connect(sock_fd, res->ai_addr, res->ai_addrlen) < 0) in main()
298 (sock_fd, SOL_SOCKET, SO_RCVBUF, &recvbuf_size, &sock_optlen) < 0) in main()
301 fprintf(stderr, "recvbuf size of socket(%d) is %d\n", sock_fd, in main()
319 recvbyte_size = recv(sock_fd, recvbuf, recvbuf_size, 0); in main()
337 if (close(sock_fd) < 0) in main()
Dns-icmpv4_sender.c315 int sock_fd; /* Socket for ioctl() */ in complete_eth_addrs() local
318 if ((sock_fd = socket(AF_PACKET, SOCK_DGRAM, 0)) < 0) in complete_eth_addrs()
329 get_ifinfo(&ifinfo, sock_fd, fake_p->src_ifname, SIOCGIFHWADDR); in complete_eth_addrs()
333 get_ifinfo(&ifinfo, sock_fd, fake_p->src_ifname, SIOCGIFINDEX); in complete_eth_addrs()
337 close(sock_fd); in complete_eth_addrs()
546 int sock_fd; in send_packets() local
552 sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_IP)); in send_packets()
553 if (sock_fd < 0) in send_packets()
557 retval = bind(sock_fd, (struct sockaddr *)&(fake_p->saddr_ll), in send_packets()
582 retval = sendto(sock_fd, &pkt, fake_p->pkt_size, 0, in send_packets()
[all …]
Dns-udpclient.c148 int sock_fd; /* socket descriptor to access */ in main() local
274 sock_fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); in main()
275 if (sock_fd < 0) in main()
280 if (setsockopt(sock_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(int))) in main()
309 if (sendto(sock_fd, message, MESSAGE_LEN, 0, in main()
320 if ((recvlen = recvfrom(sock_fd, recvbuf, MESSAGE_LEN, 0, in main()
Dns-icmpv6_sender.c176 int sock_fd; /* Socket for ioctl() */ in specify_hw_addr() local
179 if ((sock_fd = socket(AF_PACKET, SOCK_DGRAM, 0)) < 0) in specify_hw_addr()
189 get_ifinfo(&ifinfo, sock_fd, ifname, SIOCGIFHWADDR); in specify_hw_addr()
194 close(sock_fd); in specify_hw_addr()
716 int sock_fd; in send_packets() local
722 sock_fd = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_IPV6)); in send_packets()
723 if (sock_fd < 0) in send_packets()
727 retval = bind(sock_fd, (struct sockaddr *)&(info_p->saddr_ll), in send_packets()
752 retval = sendto(sock_fd, &pkt, info_p->pkt_size, 0, in send_packets()
772 close(sock_fd); in send_packets()
Dns-tcpserver.c291 int communicate_client(struct server_info *info_p, int sock_fd) in communicate_client() argument
304 (sock_fd, SOL_SOCKET, SO_SNDBUF, &sndbuf_size, in communicate_client()
307 if (close(sock_fd)) in communicate_client()
319 if (close(sock_fd)) in communicate_client()
333 sntbyte_size = send(sock_fd, sendmsg, sndbuf_size, 0); in communicate_client()
362 if (close(sock_fd)) in communicate_client()
Dns-common.c304 void get_ifinfo(struct ifreq *ans, int sock_fd, const char *ifname, int query) in get_ifinfo() argument
309 if (ioctl(sock_fd, query, ans) < 0) in get_ifinfo()
Dns-traffic.h232 void get_ifinfo(struct ifreq *ans, int sock_fd, const char *ifname, int query);
/third_party/ltp/testcases/kernel/containers/share/
Dns_ifmove.c52 int sock_fd; in get_intf_index_from_name() local
58 sock_fd = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in get_intf_index_from_name()
59 if (sock_fd == -1) { in get_intf_index_from_name()
65 if (ioctl(sock_fd, SIOCGIFINDEX, &ifr) == -1) { in get_intf_index_from_name()
67 close(sock_fd); in get_intf_index_from_name()
71 close(sock_fd); in get_intf_index_from_name()
/third_party/ltp/testcases/kernel/syscalls/ftruncate/
Dftruncate03.c31 static int sock_fd, read_fd, fd; variable
39 {&sock_fd, 4, EINVAL},
67 sock_fd = SAFE_SOCKET(PF_INET, SOCK_STREAM, 0); in setup()
76 if (sock_fd > 0) in cleanup()
77 SAFE_CLOSE(sock_fd); in cleanup()
/third_party/ltp/testcases/kernel/syscalls/fsync/
Dfsync03.c25 static int sock_fd, bad_fd = -1; variable
34 {&sock_fd, EINVAL},
52 sock_fd = SAFE_SOCKET(AF_UNIX, SOCK_STREAM, 0); in setup()
80 SAFE_CLOSE(sock_fd); in cleanup()
/third_party/ltp/testcases/kernel/syscalls/setsockopt/
Dsetsockopt03.c55 int ret, sock_fd; in run() local
58 sock_fd = SAFE_SOCKET(AF_INET, SOCK_DGRAM, 0); in run()
71 ret = setsockopt(sock_fd, SOL_IP, IPT_SO_SET_REPLACE, in run()
/third_party/python/Modules/
Dsocketmodule.c545 #define IS_SELECTABLE(s) (_PyIsSelectable_fd((s)->sock_fd) || (s)->sock_timeout <= 0)
669 if (ioctl(s->sock_fd, FIONBIO, (unsigned int *)&block) == -1) in internal_setblocking()
672 delay_flag = fcntl(s->sock_fd, F_GETFL, 0); in internal_setblocking()
680 if (fcntl(s->sock_fd, F_SETFL, new_delay_flag) == -1) in internal_setblocking()
685 if (ioctlsocket(s->sock_fd, FIONBIO, &arg) != 0) in internal_setblocking()
725 if (s->sock_fd == INVALID_SOCKET) in internal_select()
731 pollfd.fd = s->sock_fd; in internal_select()
768 FD_SET(s->sock_fd, &fds); in internal_select()
775 FD_SET(s->sock_fd, &efds); in internal_select()
781 n = select(Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int), in internal_select()
[all …]
Dsocketmodule.h284 SOCKET_T sock_fd; /* Socket file descriptor */ member
D_ssl.c840 SSL_set_fd(self->ssl, Py_SAFE_DOWNCAST(sock->sock_fd, SOCKET_T, int)); in newPySSLSocket()
2246 if (s->sock_fd == INVALID_SOCKET) in PySSL_select()
2252 pollfd.fd = s->sock_fd; in PySSL_select()
2264 if (!_PyIsSelectable_fd(s->sock_fd)) in PySSL_select()
2270 FD_SET(s->sock_fd, &fds); in PySSL_select()
2274 nfds = Py_SAFE_DOWNCAST(s->sock_fd+1, SOCKET_T, int); in PySSL_select()
2579 if ((((PyObject*)sock) == Py_None) || (sock->sock_fd == INVALID_SOCKET)) { in _ssl__SSLSocket_shutdown_impl()
/third_party/libwebsockets/lib/event-libs/libevent/
Dlibevent.c103 lws_event_cb(evutil_socket_t sock_fd, short revents, void *ctx) in lws_event_cb() argument
125 eventfd.fd = sock_fd; in lws_event_cb()
137 wsi = wsi_from_fd(context, sock_fd); in lws_event_cb()
161 lws_event_sigint_cb(evutil_socket_t sock_fd, short revents, void *ctx) in lws_event_sigint_cb() argument
167 pt->context->eventlib_signal_cb((void *)(lws_intptr_t)sock_fd, in lws_event_sigint_cb()
/third_party/mesa3d/src/virtio/vulkan/
Dvn_renderer_vtest.c54 int sock_fd; member
102 const ssize_t ret = read(vtest->sock_fd, buf, size); in vtest_read()
131 if (recvmsg(vtest->sock_fd, &msg, 0) < 0) { in vtest_receive_fd()
150 const ssize_t ret = write(vtest->sock_fd, buf, size); in vtest_write()
973 if (vtest->sock_fd >= 0) { in vtest_destroy()
974 shutdown(vtest->sock_fd, SHUT_RDWR); in vtest_destroy()
975 close(vtest->sock_fd); in vtest_destroy()
1041 vtest->sock_fd = in vtest_init()
1043 if (vtest->sock_fd < 0) in vtest_init()
1109 vtest->sock_fd = -1; in vn_renderer_create_vtest()
/third_party/mbedtls/programs/ssl/
Dssl_mail_client.c308 static int write_and_get_response( mbedtls_net_context *sock_fd, unsigned char *buf, size_t len ) in write_and_get_response() argument
316 if( len && ( ret = mbedtls_net_send( sock_fd, buf, len ) ) <= 0 ) in write_and_get_response()
326 ret = mbedtls_net_recv( sock_fd, data, len ); in write_and_get_response()
/third_party/skia/third_party/externals/egl-registry/extensions/KHR/
DEGL_KHR_stream_cross_process_fd.txt296 int sock_fd;
303 sock_fd = socket(PF_UNIX, SOCK_STREAM, 0);
304 if (sock_fd < 0) FATAL_ERROR();
312 while (connect(sock_fd,
338 if (sendmsg(sock_fd, &msg, 0) <= 0) FATAL_ERROR();
340 close(sock_fd);
/third_party/EGL/extensions/KHR/
DEGL_KHR_stream_cross_process_fd.txt296 int sock_fd;
303 sock_fd = socket(PF_UNIX, SOCK_STREAM, 0);
304 if (sock_fd < 0) FATAL_ERROR();
312 while (connect(sock_fd,
338 if (sendmsg(sock_fd, &msg, 0) <= 0) FATAL_ERROR();
340 close(sock_fd);
/third_party/libfuse/util/
Dfusermount.c1149 static int send_fd(int sock_fd, int fd) in send_fd() argument
1177 while ((retval = sendmsg(sock_fd, &msg, 0)) == -1 && errno == EINTR); in send_fd()
/third_party/python/Lib/test/test_asyncio/
Dtest_selector_events.py510 self.sock_fd = self.sock.fileno.return_value = 7
891 remove_writer.assert_called_with(self.sock_fd)
905 self.sock_fd = self.sock.fileno.return_value = 7
/third_party/libabigail/tests/data/test-read-dwarf/
Dtest15-pr18892.so.abi7763 …<parameter type-id='type-id-6' name='sock_fd' filepath='../../.././libsanitizer/sanitizer_common/s…
15131 <parameter type-id='type-id-6' name='sock_fd'/>

12