/external/wayland/tests/ |
D | socket-test.c | 47 #define TOO_LONG (1 + sizeof example_sockaddr_un.sun_path) 75 strcpy(example_sockaddr_un.sun_path, "happy now clang?"); in TEST() 76 assert(example_sockaddr_un.sun_path[0] != '\0'); in TEST() 102 char path[sizeof example_sockaddr_un.sun_path]; in TEST() 124 len = snprintf(path, sizeof example_sockaddr_un.sun_path, "%s/%s", in TEST() 126 assert(len < sizeof example_sockaddr_un.sun_path in TEST() 145 char path[sizeof example_sockaddr_un.sun_path]; in TEST() 161 len = snprintf(path, sizeof example_sockaddr_un.sun_path, in TEST() 163 assert(len < sizeof example_sockaddr_un.sun_path in TEST() 170 len = snprintf(path, sizeof example_sockaddr_un.sun_path, in TEST() [all …]
|
/external/rust/crates/grpcio-sys/grpc/src/core/lib/iomgr/ |
D | unix_sockets_posix.cc | 82 if (un->sun_path[0] == '\0' && un->sun_path[1] != '\0') { in grpc_unlink_if_unix_domain_socket() 87 if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) { in grpc_unlink_if_unix_domain_socket() 88 unlink(un->sun_path); in grpc_unlink_if_unix_domain_socket() 100 if (unix_addr->sun_path[0] == '\0' && unix_addr->sun_path[1] != '\0') { in grpc_sockaddr_to_uri_unix_if_possible() 104 unix_addr->sun_path + 1, in grpc_sockaddr_to_uri_unix_if_possible() 107 return absl::StrCat("unix:", unix_addr->sun_path); in grpc_sockaddr_to_uri_unix_if_possible()
|
/external/strace/tests-mx32/ |
D | msg_name.c | 73 recv_fd, addr->sun_path, (int) sizeof(struct sockaddr_un), in test_msg_name() 82 recv_fd, addr->sun_path, (int) msg->msg_namelen, rc); in test_msg_name() 91 const size_t offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); in test_msg_name() 94 memset(addr->sun_path, 'A', sizeof(addr->sun_path)); in test_msg_name() 110 ((struct sockaddr_un *) msg->msg_name)->sun_path, in test_msg_name() 149 .sun_path = "msg_name-recvmsg.test.send.socket" in main() 152 (void) unlink(un.sun_path); in main() 155 (void) unlink(un.sun_path); in main()
|
D | recvfrom.c | 59 .sun_path = TEST_SOCKET ".send" in main() 62 (void) unlink(un.sun_path); in main() 65 (void) unlink(un.sun_path); in main() 67 un.sun_path[sizeof(TEST_SOCKET) - 1] = '\0'; in main() 68 (void) unlink(un.sun_path); in main() 83 (void) unlink(un.sun_path); in main()
|
D | mmsg_name.c | 54 const int offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); in print_msghdr() 67 if (len > (int) sizeof(un->sun_path)) in print_msghdr() 68 len = sizeof(un->sun_path); in print_msghdr() 69 printf(", sun_path=\"%.*s\"", len, un->sun_path); in print_msghdr() 94 int sun_len = i + 1 > (int) sizeof(send_addr[i].sun_path) in test_mmsg_name() 95 ? (int) sizeof(send_addr[i].sun_path) in test_mmsg_name() 99 memset(send_addr[i].sun_path, 'a' + i % 26, sun_len); in test_mmsg_name() 229 .sun_path = TEST_NAME "-recvmmsg.test.send.socket" in main() 232 (void) unlink(un.sun_path); in main() 235 (void) unlink(un.sun_path); in main()
|
D | accept.c | 73 .sun_path = TEST_SOCKET ".connect" in connect_un() 76 (void) unlink(un.sun_path); in connect_un() 79 (void) unlink(un.sun_path); in connect_un() 81 un.sun_path[sizeof(TEST_SOCKET) - 1] = '\0'; in connect_un() 97 .sun_path = TEST_SOCKET in main()
|
D | net-sockaddr.c | 60 memset(un->sun_path, '0', sizeof(un->sun_path)); in check_un() 65 (int) sizeof(un->sun_path), 0, len, ret); in check_un() 67 un->sun_path[1] = 0; in check_un() 72 un->sun_path[0] = 0; in check_un() 73 un->sun_path[2] = 1; in check_un() 77 (int) sizeof(un->sun_path) - 3, 0, len, ret); in check_un() 81 memset(un->sun_path, '0', sizeof(un->sun_path)); in check_un() 86 (int) sizeof(un->sun_path), 0, len, ret); in check_un() 88 un->sun_path[0] = 0; in check_un() 92 (int) sizeof(un->sun_path) - 1, 0, len, ret); in check_un() [all …]
|
D | net-accept-connect.c | 55 assert(len > 0 && len <= sizeof(addr.sun_path)); in main() 57 if (++len > sizeof(addr.sun_path)) in main() 58 len = sizeof(addr.sun_path); in main() 60 memcpy(addr.sun_path, av[1], len); in main() 61 len += offsetof(struct sockaddr_un, sun_path); in main()
|
D | sockname.c | 89 TEST_SYSCALL_STR, fd, PREFIX_S_STR, addr->sun_path, in test_sockname_syscall() 100 TEST_SYSCALL_STR, fd, PREFIX_S_STR, addr->sun_path, in test_sockname_syscall() 122 const size_t offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); in test_sockname_syscall() 124 memset(addr->sun_path, 'A', sizeof(addr->sun_path)); in test_sockname_syscall() 148 addr->sun_path, (int) sizeof(struct sockaddr), in test_sockname_syscall()
|
/external/strace/tests/ |
D | msg_name.c | 73 recv_fd, addr->sun_path, (int) sizeof(struct sockaddr_un), in test_msg_name() 82 recv_fd, addr->sun_path, (int) msg->msg_namelen, rc); in test_msg_name() 91 const size_t offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); in test_msg_name() 94 memset(addr->sun_path, 'A', sizeof(addr->sun_path)); in test_msg_name() 110 ((struct sockaddr_un *) msg->msg_name)->sun_path, in test_msg_name() 149 .sun_path = "msg_name-recvmsg.test.send.socket" in main() 152 (void) unlink(un.sun_path); in main() 155 (void) unlink(un.sun_path); in main()
|
D | recvfrom.c | 59 .sun_path = TEST_SOCKET ".send" in main() 62 (void) unlink(un.sun_path); in main() 65 (void) unlink(un.sun_path); in main() 67 un.sun_path[sizeof(TEST_SOCKET) - 1] = '\0'; in main() 68 (void) unlink(un.sun_path); in main() 83 (void) unlink(un.sun_path); in main()
|
D | mmsg_name.c | 54 const int offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); in print_msghdr() 67 if (len > (int) sizeof(un->sun_path)) in print_msghdr() 68 len = sizeof(un->sun_path); in print_msghdr() 69 printf(", sun_path=\"%.*s\"", len, un->sun_path); in print_msghdr() 94 int sun_len = i + 1 > (int) sizeof(send_addr[i].sun_path) in test_mmsg_name() 95 ? (int) sizeof(send_addr[i].sun_path) in test_mmsg_name() 99 memset(send_addr[i].sun_path, 'a' + i % 26, sun_len); in test_mmsg_name() 229 .sun_path = TEST_NAME "-recvmmsg.test.send.socket" in main() 232 (void) unlink(un.sun_path); in main() 235 (void) unlink(un.sun_path); in main()
|
D | accept.c | 73 .sun_path = TEST_SOCKET ".connect" in connect_un() 76 (void) unlink(un.sun_path); in connect_un() 79 (void) unlink(un.sun_path); in connect_un() 81 un.sun_path[sizeof(TEST_SOCKET) - 1] = '\0'; in connect_un() 97 .sun_path = TEST_SOCKET in main()
|
D | net-sockaddr.c | 60 memset(un->sun_path, '0', sizeof(un->sun_path)); in check_un() 65 (int) sizeof(un->sun_path), 0, len, ret); in check_un() 67 un->sun_path[1] = 0; in check_un() 72 un->sun_path[0] = 0; in check_un() 73 un->sun_path[2] = 1; in check_un() 77 (int) sizeof(un->sun_path) - 3, 0, len, ret); in check_un() 81 memset(un->sun_path, '0', sizeof(un->sun_path)); in check_un() 86 (int) sizeof(un->sun_path), 0, len, ret); in check_un() 88 un->sun_path[0] = 0; in check_un() 92 (int) sizeof(un->sun_path) - 1, 0, len, ret); in check_un() [all …]
|
D | net-accept-connect.c | 55 assert(len > 0 && len <= sizeof(addr.sun_path)); in main() 57 if (++len > sizeof(addr.sun_path)) in main() 58 len = sizeof(addr.sun_path); in main() 60 memcpy(addr.sun_path, av[1], len); in main() 61 len += offsetof(struct sockaddr_un, sun_path); in main()
|
/external/strace/tests-m32/ |
D | msg_name.c | 73 recv_fd, addr->sun_path, (int) sizeof(struct sockaddr_un), in test_msg_name() 82 recv_fd, addr->sun_path, (int) msg->msg_namelen, rc); in test_msg_name() 91 const size_t offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); in test_msg_name() 94 memset(addr->sun_path, 'A', sizeof(addr->sun_path)); in test_msg_name() 110 ((struct sockaddr_un *) msg->msg_name)->sun_path, in test_msg_name() 149 .sun_path = "msg_name-recvmsg.test.send.socket" in main() 152 (void) unlink(un.sun_path); in main() 155 (void) unlink(un.sun_path); in main()
|
D | recvfrom.c | 59 .sun_path = TEST_SOCKET ".send" in main() 62 (void) unlink(un.sun_path); in main() 65 (void) unlink(un.sun_path); in main() 67 un.sun_path[sizeof(TEST_SOCKET) - 1] = '\0'; in main() 68 (void) unlink(un.sun_path); in main() 83 (void) unlink(un.sun_path); in main()
|
D | mmsg_name.c | 54 const int offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); in print_msghdr() 67 if (len > (int) sizeof(un->sun_path)) in print_msghdr() 68 len = sizeof(un->sun_path); in print_msghdr() 69 printf(", sun_path=\"%.*s\"", len, un->sun_path); in print_msghdr() 94 int sun_len = i + 1 > (int) sizeof(send_addr[i].sun_path) in test_mmsg_name() 95 ? (int) sizeof(send_addr[i].sun_path) in test_mmsg_name() 99 memset(send_addr[i].sun_path, 'a' + i % 26, sun_len); in test_mmsg_name() 229 .sun_path = TEST_NAME "-recvmmsg.test.send.socket" in main() 232 (void) unlink(un.sun_path); in main() 235 (void) unlink(un.sun_path); in main()
|
D | accept.c | 73 .sun_path = TEST_SOCKET ".connect" in connect_un() 76 (void) unlink(un.sun_path); in connect_un() 79 (void) unlink(un.sun_path); in connect_un() 81 un.sun_path[sizeof(TEST_SOCKET) - 1] = '\0'; in connect_un() 97 .sun_path = TEST_SOCKET in main()
|
D | net-sockaddr.c | 60 memset(un->sun_path, '0', sizeof(un->sun_path)); in check_un() 65 (int) sizeof(un->sun_path), 0, len, ret); in check_un() 67 un->sun_path[1] = 0; in check_un() 72 un->sun_path[0] = 0; in check_un() 73 un->sun_path[2] = 1; in check_un() 77 (int) sizeof(un->sun_path) - 3, 0, len, ret); in check_un() 81 memset(un->sun_path, '0', sizeof(un->sun_path)); in check_un() 86 (int) sizeof(un->sun_path), 0, len, ret); in check_un() 88 un->sun_path[0] = 0; in check_un() 92 (int) sizeof(un->sun_path) - 1, 0, len, ret); in check_un() [all …]
|
D | net-accept-connect.c | 55 assert(len > 0 && len <= sizeof(addr.sun_path)); in main() 57 if (++len > sizeof(addr.sun_path)) in main() 58 len = sizeof(addr.sun_path); in main() 60 memcpy(addr.sun_path, av[1], len); in main() 61 len += offsetof(struct sockaddr_un, sun_path); in main()
|
D | sockname.c | 89 TEST_SYSCALL_STR, fd, PREFIX_S_STR, addr->sun_path, in test_sockname_syscall() 100 TEST_SYSCALL_STR, fd, PREFIX_S_STR, addr->sun_path, in test_sockname_syscall() 122 const size_t offsetof_sun_path = offsetof(struct sockaddr_un, sun_path); in test_sockname_syscall() 124 memset(addr->sun_path, 'A', sizeof(addr->sun_path)); in test_sockname_syscall() 148 addr->sun_path, (int) sizeof(struct sockaddr), in test_sockname_syscall()
|
/external/grpc-grpc/src/core/lib/iomgr/ |
D | unix_sockets_posix.cc | 47 GPR_ARRAY_SIZE(((struct sockaddr_un*)nullptr)->sun_path) - 1) { in grpc_resolve_unix_domain_address() 52 GPR_ARRAY_SIZE(un->sun_path) - 1); in grpc_resolve_unix_domain_address() 64 strncpy(un->sun_path, name, sizeof(un->sun_path)); in grpc_resolve_unix_domain_address() 66 static_cast<socklen_t>(strlen(un->sun_path) + sizeof(un->sun_family) + 1); in grpc_resolve_unix_domain_address() 124 if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) { in grpc_unlink_if_unix_domain_socket() 125 unlink(un->sun_path); in grpc_unlink_if_unix_domain_socket() 138 gpr_asprintf(&result, "unix:%s", ((struct sockaddr_un*)addr)->sun_path); in grpc_sockaddr_to_uri_unix_if_possible()
|
/external/wpa_supplicant_8/src/common/ |
D | wpa_ctrl.c | 127 ret = os_snprintf(ctrl->local.sun_path, in wpa_ctrl_open2() 128 sizeof(ctrl->local.sun_path), in wpa_ctrl_open2() 132 ret = os_snprintf(ctrl->local.sun_path, in wpa_ctrl_open2() 133 sizeof(ctrl->local.sun_path), in wpa_ctrl_open2() 138 if (os_snprintf_error(sizeof(ctrl->local.sun_path), ret)) { in wpa_ctrl_open2() 153 unlink(ctrl->local.sun_path); in wpa_ctrl_open2() 163 chmod(ctrl->local.sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP); in wpa_ctrl_open2() 170 unlink(ctrl->local.sun_path); in wpa_ctrl_open2() 174 chown(ctrl->local.sun_path, -1, gid_wifi); in wpa_ctrl_open2() 175 chown(ctrl->local.sun_path, uid_system, gid_wifi); in wpa_ctrl_open2() [all …]
|
/external/llvm-project/lldb/source/Host/posix/ |
D | DomainSocket.cpp | 25 (offsetof(struct sockaddr_un, sun_path) + strlen((ptr)->sun_path)) 36 if (name.size() + name_offset > sizeof(saddr_un->sun_path)) in SetSockAddr() 42 memcpy(saddr_un->sun_path + name_offset, name.data(), name.size()); in SetSockAddr() 51 offsetof(struct sockaddr_un, sun_path) + name_offset + name.size(); in SetSockAddr() 136 std::string name(saddr_un.sun_path + GetNameOffset(), in GetSocketName() 138 offsetof(struct sockaddr_un, sun_path) - in GetSocketName()
|