/tools/usb/usbip/src/ |
D | usbip_network.c | 95 static ssize_t usbip_net_xmit(int sockfd, void *buff, size_t bufflen, in usbip_net_xmit() argument 106 nbytes = send(sockfd, buff, bufflen, 0); in usbip_net_xmit() 108 nbytes = recv(sockfd, buff, bufflen, MSG_WAITALL); in usbip_net_xmit() 122 ssize_t usbip_net_recv(int sockfd, void *buff, size_t bufflen) in usbip_net_recv() argument 124 return usbip_net_xmit(sockfd, buff, bufflen, 0); in usbip_net_recv() 127 ssize_t usbip_net_send(int sockfd, void *buff, size_t bufflen) in usbip_net_send() argument 129 return usbip_net_xmit(sockfd, buff, bufflen, 1); in usbip_net_send() 132 int usbip_net_send_op_common(int sockfd, uint32_t code, uint32_t status) in usbip_net_send_op_common() argument 145 rc = usbip_net_send(sockfd, &op_common, sizeof(op_common)); in usbip_net_send_op_common() 154 int usbip_net_recv_op_common(int sockfd, uint16_t *code, int *status) in usbip_net_recv_op_common() argument [all …]
|
D | usbip_attach.c | 81 static int import_device(int sockfd, struct usbip_usb_device *udev) in import_device() argument 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() 142 rc = usbip_net_send(sockfd, (void *) &request, sizeof(request)); 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() [all …]
|
D | usbip_network.h | 174 ssize_t usbip_net_recv(int sockfd, void *buff, size_t bufflen); 175 ssize_t usbip_net_send(int sockfd, void *buff, size_t bufflen); 176 int usbip_net_send_op_common(int sockfd, uint32_t code, uint32_t status); 177 int usbip_net_recv_op_common(int sockfd, uint16_t *code, int *status); 178 int usbip_net_set_reuseaddr(int sockfd); 179 int usbip_net_set_nodelay(int sockfd); 180 int usbip_net_set_keepalive(int sockfd); 181 int usbip_net_set_v6only(int sockfd);
|
D | usbip_list.c | 43 static int get_exported_devices(char *host, int sockfd) in get_exported_devices() argument 55 rc = usbip_net_send_op_common(sockfd, OP_REQ_DEVLIST, 0); in get_exported_devices() 61 rc = usbip_net_recv_op_common(sockfd, &code, &status); in get_exported_devices() 69 rc = usbip_net_recv(sockfd, &reply, sizeof(reply)); in get_exported_devices() 88 rc = usbip_net_recv(sockfd, &udev, sizeof(udev)); in get_exported_devices() 105 rc = usbip_net_recv(sockfd, &uintf, sizeof(uintf)); in get_exported_devices() 130 int sockfd; in list_exported_devices() local 132 sockfd = usbip_net_tcp_connect(host, usbip_port_string); in list_exported_devices() 133 if (sockfd < 0) { in list_exported_devices() 135 usbip_port_string, gai_strerror(sockfd)); in list_exported_devices() [all …]
|
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()
|
/tools/testing/selftests/android/ion/ |
D | ipcsocket.c | 14 int opensocket(int *sockfd, const char *name, int connecttype) in opensocket() argument 30 *sockfd = ret; in opensocket() 31 if (setsockopt(*sockfd, SOL_SOCKET, SO_REUSEADDR, in opensocket() 51 ret = bind(*sockfd, (struct sockaddr *)&skaddr, in opensocket() 59 ret = listen(*sockfd, 5); in opensocket() 69 ret = accept(*sockfd, (struct sockaddr *)&skaddr, in opensocket() 78 *sockfd = clientfd; in opensocket() 87 ret = connect(*sockfd, (struct sockaddr *)&skaddr, in opensocket() 99 if (*sockfd) in opensocket() 100 close(*sockfd); in opensocket() [all …]
|
D | ipcsocket.h | 23 int opensocket(int *sockfd, const char *name, int connecttype); 26 int sendtosocket(int sockfd, struct socketdata *data); 29 int receivefromsocket(int sockfd, struct socketdata *data); 32 int closesocket(int sockfd, char *name);
|
D | ionapp_import.c | 23 int sockfd, shared_fd; in main() local 30 status = opensocket(&sockfd, SOCKET_NAME, 0); in main() 37 skinfo.sockfd = sockfd; in main() 76 closesocket(sockfd, SOCKET_NAME); in main()
|
D | ionapp_export.c | 32 int sockfd, client_fd, shared_fd; in main() local 90 status = opensocket(&sockfd, SOCKET_NAME, 1); in main() 95 skinfo.sockfd = sockfd; in main() 124 closesocket(sockfd, SOCKET_NAME); in main()
|
D | ionutils.c | 208 int fd, sockfd; in socket_send_fd() local 216 sockfd = info->sockfd; in socket_send_fd() 221 status = sendtosocket(sockfd, &skdata); in socket_send_fd() 233 int fd, sockfd; in socket_receive_fd() local 241 sockfd = info->sockfd; in socket_receive_fd() 243 status = receivefromsocket(sockfd, &skdata); in socket_receive_fd()
|
D | ionutils.h | 13 int sockfd; member
|
/tools/usb/usbip/libsrc/ |
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,
|
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()
|
D | usbip_host_common.h | 88 int usbip_export_device(struct usbip_exported_device *edev, int sockfd);
|
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()
|
/tools/testing/selftests/bpf/ |
D | test_sock.c | 360 int sockfd = -1; in bind_sock() local 364 sockfd = socket(domain, type, 0); in bind_sock() 365 if (sockfd < 0) in bind_sock() 388 if (bind(sockfd, (const struct sockaddr *)&addr, len) == -1) in bind_sock() 395 close(sockfd); in bind_sock()
|
D | test_sock_addr.c | 1319 static int recvmsg_from_client(int sockfd, struct sockaddr_storage *src_addr) in recvmsg_from_client() argument 1328 FD_SET(sockfd, &rfds); in recvmsg_from_client() 1333 if (select(sockfd + 1, &rfds, NULL, NULL, &tv) <= 0 || in recvmsg_from_client() 1334 !FD_ISSET(sockfd, &rfds)) in recvmsg_from_client() 1347 return recvmsg(sockfd, &hdr, 0); in recvmsg_from_client()
|