Home
last modified time | relevance | path

Searched refs:sockfd (Results 1 – 24 of 24) sorted by relevance

/Linux-v4.19/tools/usb/usbip/src/
Dusbip_network.c107 static ssize_t usbip_net_xmit(int sockfd, void *buff, size_t bufflen, in usbip_net_xmit() argument
118 nbytes = send(sockfd, buff, bufflen, 0); in usbip_net_xmit()
120 nbytes = recv(sockfd, buff, bufflen, MSG_WAITALL); in usbip_net_xmit()
134 ssize_t usbip_net_recv(int sockfd, void *buff, size_t bufflen) in usbip_net_recv() argument
136 return usbip_net_xmit(sockfd, buff, bufflen, 0); in usbip_net_recv()
139 ssize_t usbip_net_send(int sockfd, void *buff, size_t bufflen) in usbip_net_send() argument
141 return usbip_net_xmit(sockfd, buff, bufflen, 1); in usbip_net_send()
144 int usbip_net_send_op_common(int sockfd, uint32_t code, uint32_t status) in usbip_net_send_op_common() argument
157 rc = usbip_net_send(sockfd, &op_common, sizeof(op_common)); in usbip_net_send_op_common()
166 int usbip_net_recv_op_common(int sockfd, uint16_t *code, int *status) in usbip_net_recv_op_common() argument
[all …]
Dusbip_attach.c93 static int import_device(int sockfd, struct usbip_usb_device *udev) in import_device() argument
114 rc = usbip_vhci_attach_device(port, sockfd, udev->busnum, in import_device()
132 static int query_import_device(int sockfd, char *busid) in query_import_device() argument
144 rc = usbip_net_send_op_common(sockfd, OP_REQ_IMPORT, 0); in query_import_device()
154 rc = usbip_net_send(sockfd, (void *) &request, sizeof(request)); in query_import_device()
161 rc = usbip_net_recv_op_common(sockfd, &code, &status); in query_import_device()
168 rc = usbip_net_recv(sockfd, (void *) &reply, sizeof(reply)); in query_import_device()
183 return import_device(sockfd, &reply.udev); in query_import_device()
188 int sockfd; in attach_device() local
192 sockfd = usbip_net_tcp_connect(host, usbip_port_string); in attach_device()
[all …]
Dusbip_list.c55 static int get_exported_devices(char *host, int sockfd) in get_exported_devices() argument
67 rc = usbip_net_send_op_common(sockfd, OP_REQ_DEVLIST, 0); in get_exported_devices()
73 rc = usbip_net_recv_op_common(sockfd, &code, &status); in get_exported_devices()
81 rc = usbip_net_recv(sockfd, &reply, sizeof(reply)); in get_exported_devices()
100 rc = usbip_net_recv(sockfd, &udev, sizeof(udev)); in get_exported_devices()
117 rc = usbip_net_recv(sockfd, &uintf, sizeof(uintf)); in get_exported_devices()
142 int sockfd; in list_exported_devices() local
144 sockfd = usbip_net_tcp_connect(host, usbip_port_string); in list_exported_devices()
145 if (sockfd < 0) { in list_exported_devices()
147 usbip_port_string, gai_strerror(sockfd)); in list_exported_devices()
[all …]
Dusbip_network.h174 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);
Dusbipd.c103 static int recv_request_import(int sockfd) in recv_request_import() argument
115 rc = usbip_net_recv(sockfd, &req, sizeof(req)); in recv_request_import()
133 usbip_net_set_nodelay(sockfd); in recv_request_import()
136 status = usbip_export_device(edev, sockfd); in recv_request_import()
144 rc = usbip_net_send_op_common(sockfd, OP_REP_IMPORT, status); in recv_request_import()
158 rc = usbip_net_send(sockfd, &pdu_udev, sizeof(pdu_udev)); in recv_request_import()
/Linux-v4.19/tools/testing/selftests/android/ion/
Dipcsocket.c14 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 …]
Dionapp_import.c32 int sockfd, shared_fd; in main() local
39 status = opensocket(&sockfd, SOCKET_NAME, 0); in main()
46 skinfo.sockfd = sockfd; in main()
85 closesocket(sockfd, SOCKET_NAME); in main()
Dipcsocket.h23 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);
Dionutils.c208 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()
Dionapp_export.c41 int sockfd, client_fd, shared_fd; in main() local
99 status = opensocket(&sockfd, SOCKET_NAME, 1); in main()
104 skinfo.sockfd = sockfd; in main()
133 closesocket(sockfd, SOCKET_NAME); in main()
Dionutils.h13 int sockfd; member
/Linux-v4.19/drivers/usb/usbip/
Dstub_dev.c46 int sockfd = 0; in usbip_sockfd_store() local
55 rv = sscanf(buf, "%d", &sockfd); in usbip_sockfd_store()
59 if (sockfd != -1) { in usbip_sockfd_store()
71 socket = sockfd_lookup(sockfd, &err); in usbip_sockfd_store()
76 sdev->ud.sockfd = sockfd; in usbip_sockfd_store()
153 dev_dbg(&sdev->udev->dev, "shutdown sockfd %d\n", ud->sockfd); in stub_shutdown_connection()
176 ud->sockfd = -1; in stub_shutdown_connection()
271 sdev->ud.sockfd = -1; in stub_device_alloc()
Dvhci_sysfs.c51 vdev->ud.sockfd, in port_show_vhci()
307 int sockfd = 0; in attach_store() local
322 if (sscanf(buf, "%u %u %u %u", &port, &sockfd, &devid, &speed) != 4) in attach_store()
330 sockfd, devid, speed); in attach_store()
351 socket = sockfd_lookup(sockfd, &err); in attach_store()
377 pdev_nr, rhport, sockfd); in attach_store()
383 vdev->ud.sockfd = sockfd; in attach_store()
Dvudc_sysfs.c98 int sockfd = 0; in usbip_sockfd_store() local
104 rv = kstrtoint(in, 0, &sockfd); in usbip_sockfd_store()
120 if (sockfd != -1) { in usbip_sockfd_store()
134 socket = sockfd_lookup(sockfd, &err); in usbip_sockfd_store()
Dusbip_common.h259 int sockfd; member
Dvhci_hcd.c1008 pr_debug("shutdown tcp_socket %d\n", ud->sockfd); in vhci_shutdown_connection()
1027 vdev->ud.sockfd = -1; in vhci_shutdown_connection()
1074 ud->sockfd = -1; in vhci_device_reset()
/Linux-v4.19/tools/usb/usbip/libsrc/
Dvhci_driver.c53 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()
Dvhci_driver.h56 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,
Dusbip_host_common.c224 int usbip_export_device(struct usbip_exported_device *edev, int sockfd) in usbip_export_device() argument
259 size = snprintf(sockfd_buff, sizeof(sockfd_buff), "%d\n", sockfd); in usbip_export_device()
Dusbip_host_common.h100 int usbip_export_device(struct usbip_exported_device *edev, int sockfd);
/Linux-v4.19/tools/testing/selftests/bpf/
Dtest_sock.c350 int sockfd = -1; in bind_sock() local
354 sockfd = socket(domain, type, 0); in bind_sock()
355 if (sockfd < 0) in bind_sock()
378 if (bind(sockfd, (const struct sockaddr *)&addr, len) == -1) in bind_sock()
385 close(sockfd); in bind_sock()
Dtest_sock_addr.c1076 static int recvmsg_from_client(int sockfd, struct sockaddr_storage *src_addr) in recvmsg_from_client() argument
1085 FD_SET(sockfd, &rfds); in recvmsg_from_client()
1090 if (select(sockfd + 1, &rfds, NULL, NULL, &tv) <= 0 || in recvmsg_from_client()
1091 !FD_ISSET(sockfd, &rfds)) in recvmsg_from_client()
1104 return recvmsg(sockfd, &hdr, 0); in recvmsg_from_client()
/Linux-v4.19/Documentation/networking/
Dudplite.txt141 setsockopt(sockfd, SOL_SOCKET, SO_NO_CHECK, ... );
145 getsockopt(sockfd, SOL_SOCKET, SO_NO_CHECK, &value, ...);
Dfilter.txt149 * setsockopt(sockfd, SOL_SOCKET, SO_ATTACH_FILTER, &val, sizeof(val));
150 * setsockopt(sockfd, SOL_SOCKET, SO_DETACH_FILTER, &val, sizeof(val));
151 * setsockopt(sockfd, SOL_SOCKET, SO_LOCK_FILTER, &val, sizeof(val));