/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | skc_to_unix_sock.c | 14 int err, sockfd = 0; local 31 sockfd = socket(AF_UNIX, SOCK_STREAM, 0); 32 if (!ASSERT_GT(sockfd, 0, "socket failed")) 40 err = bind(sockfd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)); 44 err = listen(sockfd, 1); 51 if (sockfd) 52 close(sockfd);
|
H A D | decap_sanity.c | 26 int sockfd, err; local 58 sockfd = socket(AF_INET6, SOCK_DGRAM, 0); 59 if (!ASSERT_NEQ(sockfd, -1, "socket")) 61 err = sendto(sockfd, buf, sizeof(buf), 0, (void *)&addr, addrlen); 62 close(sockfd);
|
H A D | d_path.c | 43 int sockfd = -1, procfd = -1, devfd = -1; local 53 sockfd = socket(AF_INET, SOCK_STREAM, 0); 54 if (CHECK(sockfd < 0, "trigger", "socket failed\n")) 78 ret = set_pathname(sockfd, pid); 97 fstat(sockfd, &fileStat); 111 close(sockfd);
|
H A D | token.c | 147 static int sendfd(int sockfd, int fd) argument 172 err = sendmsg(sockfd, &msg, 0); 182 static int recvfd(int sockfd, int *fd) argument 202 err = recvmsg(sockfd, &msg, 0);
|
H A D | sockmap_listen.c | 473 int sockfd; member in struct:connect_accept_ctx 491 s = ctx->sockfd; 555 ctx.sockfd = s; 584 s = ctx->sockfd; 617 ctx.sockfd = s;
|
/linux-master/tools/usb/usbip/src/ |
H A D | usbip_network.c | 95 static ssize_t usbip_net_xmit(int sockfd, void *buff, size_t bufflen, argument 106 nbytes = send(sockfd, buff, bufflen, 0); 108 nbytes = recv(sockfd, buff, bufflen, MSG_WAITALL); 122 ssize_t usbip_net_recv(int sockfd, void *buff, size_t bufflen) argument 124 return usbip_net_xmit(sockfd, buff, bufflen, 0); 127 ssize_t usbip_net_send(int sockfd, void *buff, size_t bufflen) argument 129 return usbip_net_xmit(sockfd, buff, bufflen, 1); 140 int usbip_net_send_op_common(int sockfd, uint32_t code, uint32_t status) argument 153 rc = usbip_net_send(sockfd, &op_common, sizeof(op_common)); 162 int usbip_net_recv_op_common(int sockfd, uint16_ argument 210 usbip_net_set_reuseaddr(int sockfd) argument 222 usbip_net_set_nodelay(int sockfd) argument 234 usbip_net_set_keepalive(int sockfd) argument 246 usbip_net_set_v6only(int sockfd) argument 264 int sockfd; local [all...] |
H A D | usbip_attach.c | 81 static int import_device(int sockfd, struct usbip_usb_device *udev) argument 102 rc = usbip_vhci_attach_device(port, sockfd, udev->busnum, 120 static int query_import_device(int sockfd, char *busid) argument 132 rc = usbip_net_send_op_common(sockfd, OP_REQ_IMPORT, 0); 142 rc = usbip_net_send(sockfd, (void *) &request, sizeof(request)); 149 rc = usbip_net_recv_op_common(sockfd, &code, &status); 156 rc = usbip_net_recv(sockfd, (void *) &reply, sizeof(reply)); 171 return import_device(sockfd, &reply.udev); 176 int sockfd; local 180 sockfd [all...] |
H 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);
|
H A D | usbip_list.c | 44 static int get_exported_devices(char *host, int sockfd) argument 56 rc = usbip_net_send_op_common(sockfd, OP_REQ_DEVLIST, 0); 62 rc = usbip_net_recv_op_common(sockfd, &code, &status); 70 rc = usbip_net_recv(sockfd, &reply, sizeof(reply)); 89 rc = usbip_net_recv(sockfd, &udev, sizeof(udev)); 106 rc = usbip_net_recv(sockfd, &uintf, sizeof(uintf)); 131 int sockfd; local 133 sockfd = usbip_net_tcp_connect(host, usbip_port_string); 134 if (sockfd < 0) { 136 usbip_port_string, gai_strerror(sockfd)); [all...] |
H A D | usbipd.c | 91 static int recv_request_import(int sockfd) argument 103 rc = usbip_net_recv(sockfd, &req, sizeof(req)); 121 usbip_net_set_nodelay(sockfd); 124 status = usbip_export_device(edev, sockfd); 132 rc = usbip_net_send_op_common(sockfd, OP_REP_IMPORT, status); 146 rc = usbip_net_send(sockfd, &pdu_udev, sizeof(pdu_udev));
|
/linux-master/tools/testing/selftests/bpf/ |
H A D | xdp_features.c | 226 int sockfd = *(int *)arg; local 234 n = recvfrom(sockfd, buf, sizeof(buf), MSG_WAITALL, 242 sendto(sockfd, buf, sizeof(buf), MSG_NOSIGNAL | MSG_CONFIRM, 247 close(sockfd); 252 static int dut_run_echo_thread(pthread_t *t, int *sockfd) argument 256 sockfd = start_reuseport_server(AF_INET6, SOCK_DGRAM, NULL, 258 if (!sockfd) { 266 err = pthread_create(t, NULL, dut_echo_thread, sockfd); 271 free_fds(sockfd, 1); 339 static int recv_msg(int sockfd, voi argument 363 int state, err = 0, *sockfd, ctrl_sockfd, echo_sockfd; local 528 send_and_recv_msg(int sockfd, enum test_commands cmd, void *val, size_t val_size) argument 553 int sockfd, n; local 579 int i, err, sockfd; local [all...] |
H A D | test_sock.c | 419 int sockfd = -1; local 423 sockfd = socket(domain, type, 0); 424 if (sockfd < 0) 447 if (bind(sockfd, (const struct sockaddr *)&addr, len) == -1) { 465 if (bind(sockfd, (const struct sockaddr *)&addr, len) == -1) { 476 close(sockfd);
|
H A D | test_sock_addr.c | 1113 static int recvmsg_from_client(int sockfd, struct sockaddr_storage *src_addr) argument 1122 FD_SET(sockfd, &rfds); 1127 if (select(sockfd + 1, &rfds, NULL, NULL, &tv) <= 0 || 1128 !FD_ISSET(sockfd, &rfds)) 1141 return recvmsg(sockfd, &hdr, 0);
|
/linux-master/tools/usb/usbip/libsrc/ |
H 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,
|
H A D | vhci_driver.c | 53 int sockfd; local 60 &devid, &sockfd, lbusid); 69 dbg("sockfd %u lbusid %s", sockfd, lbusid); 357 int usbip_vhci_attach_device2(uint8_t port, int sockfd, uint32_t devid, argument 366 port, sockfd, devid, speed); 391 int usbip_vhci_attach_device(uint8_t port, int sockfd, uint8_t busnum, argument 396 return usbip_vhci_attach_device2(port, sockfd, devid, speed);
|
H A D | usbip_host_common.h | 88 int usbip_export_device(struct usbip_exported_device *edev, int sockfd);
|
H A D | usbip_host_common.c | 212 int usbip_export_device(struct usbip_exported_device *edev, int sockfd) argument 247 size = snprintf(sockfd_buff, sizeof(sockfd_buff), "%d\n", sockfd); 257 err("write_sysfs_attribute failed: sockfd %s to %s",
|
/linux-master/drivers/usb/usbip/ |
H A D | stub_dev.c | 46 int sockfd = 0; local 57 rv = sscanf(buf, "%d", &sockfd); 61 if (sockfd != -1) { 74 socket = sockfd_lookup(sockfd, &err); 107 sdev->ud.sockfd = sockfd; 164 dev_dbg(&sdev->udev->dev, "shutdown sockfd %d\n", ud->sockfd); 187 ud->sockfd = -1; 283 sdev->ud.sockfd [all...] |
H A D | vhci_sysfs.c | 23 * hub port sta spd dev sockfd local_busid 35 * hole, the change is made to use sockfd instead. 51 vdev->ud.sockfd, 154 "hub port sta spd dev sockfd local_busid\n"); 312 int sockfd = 0; local 325 * @sockfd: socket descriptor of an established TCP connection 329 if (sscanf(buf, "%u %u %u %u", &port, &sockfd, &devid, &speed) != 4) 336 usbip_dbg_vhci_sysfs("sockfd(%u) devid(%u) speed(%u)\n", 337 sockfd, devid, speed); 360 socket = sockfd_lookup(sockfd, [all...] |
H A D | vudc_sysfs.c | 99 int sockfd = 0; local 107 rv = kstrtoint(in, 0, &sockfd); 124 if (sockfd != -1) { 138 socket = sockfd_lookup(sockfd, &err);
|
H A D | usbip_common.h | 270 int sockfd; member in struct:usbip_device
|
H A D | vhci_hcd.c | 1017 pr_debug("shutdown tcp_socket %d\n", ud->sockfd); 1036 vdev->ud.sockfd = -1; 1083 ud->sockfd = -1;
|
/linux-master/tools/include/io_uring/ |
H A D | mini_liburing.h | 231 int sockfd, 238 sqe->fd = sockfd; 258 static inline void io_uring_prep_send(struct io_uring_sqe *sqe, int sockfd, argument 263 sqe->fd = sockfd; 269 static inline void io_uring_prep_sendzc(struct io_uring_sqe *sqe, int sockfd, argument 273 io_uring_prep_send(sqe, sockfd, buf, len, flags); 230 io_uring_prep_cmd(struct io_uring_sqe *sqe, int op, int sockfd, int level, int optname, const void *optval, int optlen) argument
|
/linux-master/tools/virtio/ |
H A D | vhost_net_test.c | 124 int sockfd = dev->sock; local 132 ret = sendto(sockfd, sendbuf, TEST_BUF_LEN, 0,
|