| /linux/tools/usb/usbip/src/ |
| A D | usbip_network.c | 106 nbytes = send(sockfd, buff, bufflen, 0); in usbip_net_xmit() 210 int usbip_net_set_reuseaddr(int sockfd) in usbip_net_set_reuseaddr() argument 222 int usbip_net_set_nodelay(int sockfd) in usbip_net_set_nodelay() argument 234 int usbip_net_set_keepalive(int sockfd) in usbip_net_set_keepalive() argument 246 int usbip_net_set_v6only(int sockfd) in usbip_net_set_v6only() argument 264 int sockfd; in usbip_net_tcp_connect() local 283 if (sockfd < 0) in usbip_net_tcp_connect() 287 usbip_net_set_nodelay(sockfd); in usbip_net_tcp_connect() 289 usbip_net_set_keepalive(sockfd); in usbip_net_tcp_connect() 294 close(sockfd); in usbip_net_tcp_connect() [all …]
|
| A D | usbip_attach.c | 102 rc = usbip_vhci_attach_device(port, sockfd, udev->busnum, in import_device() 120 static int query_import_device(int sockfd, char *busid) in query_import_device() argument 132 rc = usbip_net_send_op_common(sockfd, OP_REQ_IMPORT, 0); in query_import_device() 149 rc = usbip_net_recv_op_common(sockfd, &code, &status); in query_import_device() 156 rc = usbip_net_recv(sockfd, (void *) &reply, sizeof(reply)); in query_import_device() 171 return import_device(sockfd, &reply.udev); in query_import_device() 176 int sockfd; in attach_device() local 180 sockfd = usbip_net_tcp_connect(host, usbip_port_string); in attach_device() 181 if (sockfd < 0) { in attach_device() 186 rhport = query_import_device(sockfd, busid); in attach_device() [all …]
|
| A D | usbip_network.h | 168 ssize_t usbip_net_recv(int sockfd, void *buff, size_t bufflen); 169 ssize_t usbip_net_send(int sockfd, void *buff, size_t bufflen); 170 int usbip_net_send_op_common(int sockfd, uint32_t code, uint32_t status); 171 int usbip_net_recv_op_common(int sockfd, uint16_t *code, int *status); 172 int usbip_net_set_reuseaddr(int sockfd); 173 int usbip_net_set_nodelay(int sockfd); 174 int usbip_net_set_keepalive(int sockfd); 175 int usbip_net_set_v6only(int sockfd);
|
| A D | usbip_list.c | 44 static int get_exported_devices(char *host, int sockfd) in get_exported_devices() argument 56 rc = usbip_net_send_op_common(sockfd, OP_REQ_DEVLIST, 0); in get_exported_devices() 62 rc = usbip_net_recv_op_common(sockfd, &code, &status); in get_exported_devices() 70 rc = usbip_net_recv(sockfd, &reply, sizeof(reply)); in get_exported_devices() 89 rc = usbip_net_recv(sockfd, &udev, sizeof(udev)); in get_exported_devices() 106 rc = usbip_net_recv(sockfd, &uintf, sizeof(uintf)); in get_exported_devices() 131 int sockfd; in list_exported_devices() local 134 if (sockfd < 0) { in list_exported_devices() 136 usbip_port_string, gai_strerror(sockfd)); in list_exported_devices() 141 rc = get_exported_devices(host, sockfd); in list_exported_devices() [all …]
|
| A D | usbipd.c | 91 static int recv_request_import(int sockfd) in recv_request_import() argument 103 rc = usbip_net_recv(sockfd, &req, sizeof(req)); in recv_request_import() 121 usbip_net_set_nodelay(sockfd); in recv_request_import() 124 status = usbip_export_device(edev, sockfd); in recv_request_import() 132 rc = usbip_net_send_op_common(sockfd, OP_REP_IMPORT, status); in recv_request_import() 146 rc = usbip_net_send(sockfd, &pdu_udev, sizeof(pdu_udev)); in recv_request_import()
|
| /linux/tools/testing/selftests/bpf/ |
| A D | xdp_features.c | 247 close(sockfd); in dut_echo_thread() 258 if (!sockfd) { in dut_run_echo_thread() 370 if (!sockfd) { in dut_run() 490 free_fds(sockfd, 1); in dut_run() 553 int sockfd, n; in send_echo_msg() local 556 if (sockfd < 0) { in send_echo_msg() 568 close(sockfd); in send_echo_msg() 579 int i, err, sockfd; in tester_run() local 583 if (sockfd < 0) { in tester_run() 603 close(sockfd); in tester_run() [all …]
|
| A D | network_helpers.c | 577 int sockfd, err; in get_hw_ring_size() local 579 sockfd = socket(AF_INET, SOCK_DGRAM, 0); in get_hw_ring_size() 580 if (sockfd < 0) in get_hw_ring_size() 588 if (ioctl(sockfd, SIOCETHTOOL, &ifr) < 0) { in get_hw_ring_size() 590 close(sockfd); in get_hw_ring_size() 594 close(sockfd); in get_hw_ring_size() 601 int sockfd, err; in set_hw_ring_size() local 603 sockfd = socket(AF_INET, SOCK_DGRAM, 0); in set_hw_ring_size() 604 if (sockfd < 0) in set_hw_ring_size() 614 close(sockfd); in set_hw_ring_size() [all …]
|
| A D | test_sock.c | 419 int sockfd = -1; in bind_sock() local 423 sockfd = socket(domain, type, 0); in bind_sock() 424 if (sockfd < 0) in bind_sock() 447 if (bind(sockfd, (const struct sockaddr *)&addr, len) == -1) { in bind_sock() 465 if (bind(sockfd, (const struct sockaddr *)&addr, len) == -1) { in bind_sock() 476 close(sockfd); in bind_sock()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| A D | skc_to_unix_sock.c | 14 int err, sockfd = 0; in test_skc_to_unix_sock() local 31 sockfd = socket(AF_UNIX, SOCK_STREAM, 0); in test_skc_to_unix_sock() 32 if (!ASSERT_GT(sockfd, 0, "socket failed")) in test_skc_to_unix_sock() 40 err = bind(sockfd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)); in test_skc_to_unix_sock() 44 err = listen(sockfd, 1); in test_skc_to_unix_sock() 51 if (sockfd) in test_skc_to_unix_sock() 52 close(sockfd); in test_skc_to_unix_sock()
|
| A D | crypto_sanity.c | 91 int sockfd, err, pfd; in test_crypto_sanity() local 147 sockfd = socket(AF_INET6, SOCK_DGRAM, 0); in test_crypto_sanity() 148 if (!ASSERT_NEQ(sockfd, -1, "encrypt socket")) in test_crypto_sanity() 150 err = sendto(sockfd, plain_text, sizeof(plain_text), 0, (void *)&addr, addrlen); in test_crypto_sanity() 151 close(sockfd); in test_crypto_sanity() 172 sockfd = socket(AF_INET6, SOCK_DGRAM, 0); in test_crypto_sanity() 173 if (!ASSERT_NEQ(sockfd, -1, "decrypt socket")) in test_crypto_sanity() 175 err = sendto(sockfd, afalg_dst, sizeof(afalg_dst), 0, (void *)&addr, addrlen); in test_crypto_sanity() 176 close(sockfd); in test_crypto_sanity()
|
| A D | decap_sanity.c | 25 int sockfd, err; in test_decap_sanity() local 57 sockfd = socket(AF_INET6, SOCK_DGRAM, 0); in test_decap_sanity() 58 if (!ASSERT_NEQ(sockfd, -1, "socket")) in test_decap_sanity() 60 err = sendto(sockfd, buf, sizeof(buf), 0, (void *)&addr, addrlen); in test_decap_sanity() 61 close(sockfd); in test_decap_sanity()
|
| A D | d_path.c | 43 int sockfd = -1, procfd = -1, devfd = -1; in trigger_fstat_events() local 53 sockfd = socket(AF_INET, SOCK_STREAM, 0); in trigger_fstat_events() 54 if (CHECK(sockfd < 0, "trigger", "socket failed\n")) in trigger_fstat_events() 78 ret = set_pathname(sockfd, pid); in trigger_fstat_events() 97 fstat(sockfd, &fileStat); in trigger_fstat_events() 111 close(sockfd); in trigger_fstat_events()
|
| A D | token.c | 147 static int sendfd(int sockfd, int fd) in sendfd() argument 172 err = sendmsg(sockfd, &msg, 0); in sendfd() 182 static int recvfd(int sockfd, int *fd) in recvfd() argument 202 err = recvmsg(sockfd, &msg, 0); in recvfd()
|
| A D | sockmap_listen.c | 475 int sockfd; member 493 s = ctx->sockfd; in connect_accept_thread() 557 ctx.sockfd = s; in test_syn_recv_insert_delete() 586 s = ctx->sockfd; in listen_thread() 619 ctx.sockfd = s; in test_race_insert_listen()
|
| /linux/drivers/usb/usbip/ |
| A D | stub_dev.c | 46 int sockfd = 0; in usbip_sockfd_store() local 57 rv = sscanf(buf, "%d", &sockfd); in usbip_sockfd_store() 61 if (sockfd != -1) { in usbip_sockfd_store() 74 socket = sockfd_lookup(sockfd, &err); in usbip_sockfd_store() 107 sdev->ud.sockfd = sockfd; in usbip_sockfd_store() 164 dev_dbg(&sdev->udev->dev, "shutdown sockfd %d\n", ud->sockfd); in stub_shutdown_connection() 187 ud->sockfd = -1; in stub_shutdown_connection() 283 sdev->ud.sockfd = -1; in stub_device_alloc()
|
| A D | vhci_sysfs.c | 51 vdev->ud.sockfd, in port_show_vhci() 313 int sockfd = 0; in attach_store() local 330 if (sscanf(buf, "%u %u %u %u", &port, &sockfd, &devid, &speed) != 4) in attach_store() 338 sockfd, devid, speed); in attach_store() 361 socket = sockfd_lookup(sockfd, &err); in attach_store() 417 pdev_nr, rhport, sockfd); in attach_store() 423 vdev->ud.sockfd = sockfd; in attach_store()
|
| A D | vudc_sysfs.c | 99 int sockfd = 0; in usbip_sockfd_store() local 107 rv = kstrtoint(in, 0, &sockfd); in usbip_sockfd_store() 124 if (sockfd != -1) { in usbip_sockfd_store() 138 socket = sockfd_lookup(sockfd, &err); in usbip_sockfd_store()
|
| A D | usbip_common.h | 270 int sockfd; member
|
| /linux/tools/usb/usbip/libsrc/ |
| A D | vhci_driver.c | 53 int sockfd; in parse_status() local 60 &devid, &sockfd, lbusid); in parse_status() 69 dbg("sockfd %u lbusid %s", sockfd, lbusid); in parse_status() 357 int usbip_vhci_attach_device2(uint8_t port, int sockfd, uint32_t devid, in usbip_vhci_attach_device2() argument 366 port, sockfd, devid, speed); in usbip_vhci_attach_device2() 391 int usbip_vhci_attach_device(uint8_t port, int sockfd, uint8_t busnum, in usbip_vhci_attach_device() argument 396 return usbip_vhci_attach_device2(port, sockfd, devid, speed); in usbip_vhci_attach_device()
|
| A D | vhci_driver.h | 56 int usbip_vhci_attach_device2(uint8_t port, int sockfd, uint32_t devid, 60 int usbip_vhci_attach_device(uint8_t port, int sockfd, uint8_t busnum,
|
| A D | usbip_host_common.c | 212 int usbip_export_device(struct usbip_exported_device *edev, int sockfd) in usbip_export_device() argument 247 size = snprintf(sockfd_buff, sizeof(sockfd_buff), "%d\n", sockfd); in usbip_export_device()
|
| A D | usbip_host_common.h | 88 int usbip_export_device(struct usbip_exported_device *edev, int sockfd);
|
| /linux/Documentation/netlink/specs/ |
| A D | handshake.yaml | 45 name: sockfd 81 name: sockfd 105 - sockfd 120 - sockfd
|
| /linux/tools/include/io_uring/ |
| A D | mini_liburing.h | 231 int sockfd, in io_uring_prep_cmd() argument 238 sqe->fd = sockfd; in io_uring_prep_cmd() 258 static inline void io_uring_prep_send(struct io_uring_sqe *sqe, int sockfd, in io_uring_prep_send() argument 263 sqe->fd = sockfd; in io_uring_prep_send() 269 static inline void io_uring_prep_sendzc(struct io_uring_sqe *sqe, int sockfd, in io_uring_prep_sendzc() argument 273 io_uring_prep_send(sqe, sockfd, buf, len, flags); in io_uring_prep_sendzc()
|
| /linux/tools/virtio/ |
| A D | vhost_net_test.c | 124 int sockfd = dev->sock; in vdev_send_packet() local 132 ret = sendto(sockfd, sendbuf, TEST_BUF_LEN, 0, in vdev_send_packet()
|