Lines Matching refs:connfd

85 static int send_interfaces(const uint8_t *descriptors, int connfd)  in send_interfaces()  argument
103 if (send(connfd, &iface, sizeof(iface), 0) != in send_interfaces()
148 static int send_device(const uint8_t *desc, int connfd) in send_device() argument
154 if (send(connfd, &dev, sizeof(dev), 0) != sizeof(dev)) { in send_device()
162 static int handle_device_list(const uint8_t *desc, int connfd) in handle_device_list() argument
172 if (send(connfd, &header, sizeof(header), 0) != sizeof(header)) { in handle_device_list()
180 if (send(connfd, &ndev, sizeof(ndev), 0) != sizeof(ndev)) { in handle_device_list()
185 send_device(desc, connfd); in handle_device_list()
187 send_interfaces(desc, connfd); in handle_device_list()
192 static void handle_usbip_submit(int connfd, struct usbip_header *hdr) in handle_usbip_submit() argument
199 read = recv(connfd, req, sizeof(*req), 0); in handle_usbip_submit()
214 static void handle_usbip_unlink(int connfd, struct usbip_header *hdr) in handle_usbip_unlink() argument
221 read = recv(connfd, &hdr->u, sizeof(hdr->u), 0); in handle_usbip_unlink()
232 static int handle_import(const uint8_t *desc, int connfd) in handle_import() argument
243 if (recv(connfd, busid, 32, 0) != sizeof(busid)) { in handle_import()
248 if (send(connfd, &header, sizeof(header), 0) != sizeof(header)) { in handle_import()
253 send_device(desc, connfd); in handle_import()
264 int listenfd, connfd; in usbip_start() local
310 connfd = accept4(listenfd, (struct sockaddr *)&client_addr, in usbip_start()
312 if (connfd < 0) { in usbip_start()
324 connfd_global = connfd; in usbip_start()
339 read = recv(connfd, &req, sizeof(req), 0); in usbip_start()
364 handle_device_list(desc, connfd); in usbip_start()
367 if (!handle_import(desc, connfd)) { in usbip_start()
382 read = recv(connfd, hdr, sizeof(*hdr), 0); in usbip_start()
406 handle_usbip_submit(connfd, &cmd); in usbip_start()
409 handle_usbip_unlink(connfd, &cmd); in usbip_start()
414 close(connfd); in usbip_start()
420 close(connfd); in usbip_start()