| /OK3568_Linux_fs/kernel/tools/usb/usbip/src/ |
| H A 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() 140 int usbip_net_send_op_common(int sockfd, uint32_t code, uint32_t status) in usbip_net_send_op_common() argument 153 rc = usbip_net_send(sockfd, &op_common, sizeof(op_common)); in usbip_net_send_op_common() 162 int usbip_net_recv_op_common(int sockfd, uint16_t *code, int *status) in usbip_net_recv_op_common() argument [all …]
|
| H A 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 …]
|
| H A 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 …]
|
| 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 | 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()
|
| /OK3568_Linux_fs/kernel/tools/testing/selftests/android/ion/ |
| H A 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 …]
|
| H A 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()
|
| H A 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()
|
| H A 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);
|
| H A 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()
|
| /OK3568_Linux_fs/external/camera_engine_rkaiq/rkaiq/ipc_server/ |
| H A D | socket_server.cpp | 31 : tool_mode_on(false), sockfd(-1), client_socket(-1), quit_(0), in SocketServer() 137 int rkaiq_ipc_send(int sockfd, int id, int ack, int seqn, void *data, in rkaiq_ipc_send() argument 158 ret = send(sockfd, out_data, out_len, 0); in rkaiq_ipc_send() 250 int sockfd = -1; in rkaiq_params_tuning() local 258 sockfd = tunning_ctx->socketfd; in rkaiq_params_tuning() 262 LOGI_IPC("[TCP]%d,%d,%d--->PC CMD STRING:\n%s\n", sockfd, aiq_data->cmd_id, in rkaiq_params_tuning() 287 rkaiq_ipc_send(sockfd, AIQ_IPC_CMD_READ, 0, 0, out_data, strlen(out_data)); in rkaiq_params_tuning() 408 setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, (char *)&interval, in Accepted() 413 int fds[2] = {sockfd, _stop_fds[0]}; in Accepted() 423 client_socket = accept(sockfd, (struct sockaddr *)&clientAddress, &sosize); in Accepted() [all …]
|
| /OK3568_Linux_fs/external/rkwifibt-app/test/ |
| H A D | rkbtsource.c | 38 static int sockfd = 0, spp_client_fd = 0; variable 91 close(sockfd); in rk_bt_check_server() 117 ret = recvmsg(sockfd, &msg, MSG_CMSG_CLOEXEC); in rk_bt_recv() 221 sockfd = socket(AF_UNIX, SOCK_DGRAM, 0); in main() 222 if (sockfd < 0) { in main() 230 ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(addr)); in main() 237 setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, (const char *)&t, sizeof(t)); in main() 307 ret = sendto(sockfd, &msg, sizeof(bt_msg_t), 0, (struct sockaddr *)&dst, sizeof(dst)); in main() 315 if(sockfd) in main() 316 close(sockfd); in main()
|
| H A D | rkbtsource_server.c | 65 static int sockfd = 0; variable 134 if (sendmsg(sockfd, &msg, 0) < 0) in rk_bt_send_custom_evt() 164 if (sendmsg(sockfd, &msg, 0) < 0) in rk_bt_send_evt() 205 if (sendmsg(sockfd, &msg, 0) == -1) in rk_bt_send_spp_client_fd() 543 sockfd = socket(AF_UNIX, SOCK_DGRAM, 0); in main() 544 if (sockfd < 0) { in main() 552 ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(addr)); in main() 559 setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, (const char *)&t, sizeof(t)); in main() 565 ret = recvfrom(sockfd, buff, sizeof(buff), 0, NULL, NULL); in main() 742 if(sockfd) { in main() [all …]
|
| /OK3568_Linux_fs/buildroot/dl/rtmpdump/git/ |
| H A D | rtmpgw.c | 329 int sockfd // client connection socket in processTCPrequest() argument 364 FD_SET(sockfd, &fds); in processTCPrequest() 366 if (select(sockfd + 1, &fds, NULL, NULL, &tv) <= 0) in processTCPrequest() 373 nRead = recv(sockfd, header, 2047, 0); in processTCPrequest() 384 send(sockfd, buf, len, 0); in processTCPrequest() 533 send(sockfd, buf, len, 0); in processTCPrequest() 598 if ((nWritten = send(sockfd, buffer, nRead, 0)) < 0) in processTCPrequest() 649 if (sockfd) in processTCPrequest() 650 closesocket(sockfd); in processTCPrequest() 660 send(sockfd, buf, len, 0); in processTCPrequest() [all …]
|
| H A D | rtmpsuck.c | 741 int sockfd = server->socket; in doServe() local 753 FD_SET(sockfd, &rfds); in doServe() 755 if (select(sockfd + 1, &rfds, NULL, NULL, &tv) <= 0) in doServe() 764 server->rs.m_sb.sb_socket = sockfd; in doServe() 808 FD_SET(sockfd, &rfds); in doServe() 1023 int sockfd = in serverThread() local 1026 if (sockfd > 0) in serverThread() 1032 getsockopt(sockfd, SOL_IP, SO_ORIGINAL_DST, &dest, &destlen); in serverThread() 1041 srv2->socket = sockfd; in serverThread() 1059 int sockfd, tmp; in startStreaming() local [all …]
|
| H A D | rtmpsrv.c | 876 int sockfd // client connection socket in doServe() argument 892 FD_SET(sockfd, &fds); in doServe() 894 if (select(sockfd + 1, &fds, NULL, NULL, &tv) <= 0) in doServe() 902 rtmp->m_sb.sb_socket = sockfd; in doServe() 958 int sockfd = in serverThread() local 961 if (sockfd > 0) in serverThread() 967 getsockopt(sockfd, SOL_IP, SO_ORIGINAL_DST, &dest, &destlen); in serverThread() 976 doServe(server, sockfd); in serverThread() 992 int sockfd, tmp; in startStreaming() local 995 sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); in startStreaming() [all …]
|
| /OK3568_Linux_fs/app/forlinx/quectelCM/ |
| H A D | util.c | 69 int sockfd = -1; in cm_open_proxy() local 75 sockfd = socket(AF_LOCAL, SOCK_STREAM, 0); in cm_open_proxy() 76 if (sockfd < 0) in cm_open_proxy() 77 return sockfd; in cm_open_proxy() 85 if(connect(sockfd, (struct sockaddr *)&sockaddr, alen) < 0) { in cm_open_proxy() 86 close(sockfd); in cm_open_proxy() 90 setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &reuse_addr,sizeof(reuse_addr)); in cm_open_proxy() 91 fcntl(sockfd, F_SETFL, fcntl(sockfd,F_GETFL) | O_NONBLOCK); in cm_open_proxy() 92 fcntl(sockfd, F_SETFD, FD_CLOEXEC); in cm_open_proxy() 94 dbg_time("connect to %s sockfd = %d", name, sockfd); in cm_open_proxy() [all …]
|
| /OK3568_Linux_fs/kernel/tools/testing/selftests/bpf/prog_tests/ |
| H A D | d_path.c | 30 int sockfd = -1, procfd = -1, devfd = -1; in trigger_fstat_events() local 40 sockfd = socket(AF_INET, SOCK_STREAM, 0); in trigger_fstat_events() 41 if (CHECK(sockfd < 0, "trigger", "socket failed\n")) in trigger_fstat_events() 65 ret = set_pathname(sockfd, pid); in trigger_fstat_events() 84 fstat(sockfd, &fileStat); in trigger_fstat_events() 94 close(sockfd); in trigger_fstat_events()
|
| /OK3568_Linux_fs/app/forlinx/flapp/src/plugins/rtc/ |
| H A D | datetimewidget.cpp | 159 …int sockfd, n; // Socket file descriptor and the n return result from writing/reading from the soc… in NTPGetTimeBeijingMSeconds() local 205 sockfd = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); // Create a UDP socket. in NTPGetTimeBeijingMSeconds() 207 if ( sockfd < 0 ) in NTPGetTimeBeijingMSeconds() 229 if ( ::connect( sockfd, ( struct sockaddr * ) &serv_addr, sizeof( serv_addr) ) < 0 ) in NTPGetTimeBeijingMSeconds() 232 n = write( sockfd, ( char* ) &packet, sizeof( ntp_packet ) ); in NTPGetTimeBeijingMSeconds() 239 n = read( sockfd, ( char* ) &packet, sizeof( ntp_packet ) ); in NTPGetTimeBeijingMSeconds()
|
| /OK3568_Linux_fs/external/rkwifibt-app/include/ |
| H A D | Rk_socket_app.h | 31 void RK_socket_client_teardown(int sockfd); 34 int RK_socket_send(int sockfd, char *msg, int len); 35 int RK_socket_recieve(int sockfd, char *msg, int len);
|
| /OK3568_Linux_fs/kernel/drivers/usb/usbip/ |
| H 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() 162 dev_dbg(&sdev->udev->dev, "shutdown sockfd %d\n", ud->sockfd); in stub_shutdown_connection() 185 ud->sockfd = -1; in stub_shutdown_connection() 281 sdev->ud.sockfd = -1; in stub_device_alloc()
|
| H A D | vhci_sysfs.c | 51 vdev->ud.sockfd, in port_show_vhci() 312 int sockfd = 0; in attach_store() local 329 if (sscanf(buf, "%u %u %u %u", &port, &sockfd, &devid, &speed) != 4) in attach_store() 337 sockfd, devid, speed); in attach_store() 360 socket = sockfd_lookup(sockfd, &err); in attach_store() 416 pdev_nr, rhport, sockfd); in attach_store() 422 vdev->ud.sockfd = sockfd; in attach_store()
|
| /OK3568_Linux_fs/kernel/tools/usb/usbip/libsrc/ |
| H 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()
|
| 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,
|
| /OK3568_Linux_fs/kernel/tools/testing/selftests/bpf/ |
| H A 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()
|