/bionic/tests/ |
D | netinet_ether_test.cpp | 35 ether_addr addr; in TEST() local 36 memset(&addr, 0, sizeof(addr)); in TEST() 37 ether_addr* a = ether_aton_r("12:34:56:78:9a:Bc", &addr); in TEST() 38 ASSERT_EQ(&addr, a); in TEST() 39 ASSERT_EQ(0x12, addr.ether_addr_octet[0]); in TEST() 40 ASSERT_EQ(0x34, addr.ether_addr_octet[1]); in TEST() 41 ASSERT_EQ(0x56, addr.ether_addr_octet[2]); in TEST() 42 ASSERT_EQ(0x78, addr.ether_addr_octet[3]); in TEST() 43 ASSERT_EQ(0x9a, addr.ether_addr_octet[4]); in TEST() 44 ASSERT_EQ(0xbc, addr.ether_addr_octet[5]); in TEST() [all …]
|
D | ifaddrs_test.cpp | 55 for (ifaddrs* addr = addrs; addr != nullptr; addr = addr->ifa_next) { in TEST() local 56 if (addr->ifa_name && strcmp(addr->ifa_name, "lo") == 0) { in TEST() 57 if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET) lo_inet4 = addr; in TEST() 58 else if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET6) lo_inet6 = addr; in TEST() 59 else if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_PACKET) lo_packet = addr; in TEST() 88 for (ifaddrs* addr = addrs; addr != nullptr; addr = addr->ifa_next) { in TEST() local 89 int family = addr->ifa_addr ? addr->ifa_addr->sa_family : in TEST() 90 addr->ifa_broadaddr ? addr->ifa_broadaddr->sa_family : in TEST() 94 ifaddrs_socks.push_back(std::string(addr->ifa_name)); in TEST() 138 in_addr_t addr = sock->sin_addr.s_addr; in CheckAddressIsInSet() local [all …]
|
D | sys_socket_test.cpp | 45 struct sockaddr_un addr; in ConnectFn() local 46 memset(&addr, 0, sizeof(addr)); in ConnectFn() 47 addr.sun_family = AF_UNIX; in ConnectFn() 48 addr.sun_path[0] = '\0'; in ConnectFn() 49 strcpy(addr.sun_path + 1, pdata->sock_path); in ConnectFn() 51 if (connect(fd, reinterpret_cast<struct sockaddr*>(&addr), sizeof(addr)) < 0) { in ConnectFn() 69 struct sockaddr_un addr; in RunTest() local 70 memset(&addr, 0, sizeof(addr)); in RunTest() 71 addr.sun_family = AF_UNIX; in RunTest() 72 addr.sun_path[0] = '\0'; in RunTest() [all …]
|
D | netdb_test.cpp | 109 sockaddr_in6 *addr = reinterpret_cast<sockaddr_in6*>(ai->ai_addr); in TEST() local 110 ASSERT_EQ(addr->sin6_family, AF_INET6); in TEST() 111 ASSERT_EQ(0, memcmp(&addr->sin6_addr, &in6addr_loopback, sizeof(in6_addr))); in TEST() 145 sockaddr_in addr; in TEST() local 147 memset(&addr, 0, sizeof(sockaddr_in)); in TEST() 148 addr.sin_family = AF_INET; in TEST() 149 addr.sin_addr.s_addr = htonl(0x7f000001); in TEST() 150 ASSERT_EQ(0, getnameinfo(reinterpret_cast<sockaddr*>(&addr), sizeof(addr), in TEST() 163 sockaddr_in6 addr; in TEST() local 165 memset(&addr, 0, sizeof(sockaddr_in6)); in TEST() [all …]
|
/bionic/libc/bionic/ |
D | netinet_ether.cpp | 33 ether_addr* ether_aton_r(const char* asc, ether_addr* addr) { in ether_aton_r() argument 41 addr->ether_addr_octet[i] = bytes[i]; in ether_aton_r() 43 return addr; in ether_aton_r() 47 static ether_addr addr; in ether_aton() local 48 return ether_aton_r(asc, &addr); in ether_aton() 51 char* ether_ntoa_r(const ether_addr* addr, char* buf) { in ether_ntoa_r() argument 53 addr->ether_addr_octet[0], addr->ether_addr_octet[1], in ether_ntoa_r() 54 addr->ether_addr_octet[2], addr->ether_addr_octet[3], in ether_ntoa_r() 55 addr->ether_addr_octet[4], addr->ether_addr_octet[5]); in ether_ntoa_r() 59 char* ether_ntoa(const ether_addr* addr) { in ether_ntoa() argument [all …]
|
D | ifaddrs.cpp | 59 sockaddr_storage addr; member 78 ifa.ifa_addr = CopyAddress(family, data, byteCount, &addr); in SetAddress() 102 ifa.ifa_dstaddr = reinterpret_cast<sockaddr*>(memcpy(&ifa_ifu, &addr, sizeof(addr))); in SetLocalAddress() 105 ifa.ifa_addr = CopyAddress(family, data, byteCount, &addr); in SetLocalAddress() 122 sockaddr_ll* sll = reinterpret_cast<sockaddr_ll*>(&addr); in SetPacketAttributes() 178 if (RTA_PAYLOAD(rta) < sizeof(new_addr->addr)) { in __getifaddrs_callback() 252 ifaddrs_storage* addr = reinterpret_cast<ifaddrs_storage*>(*list); in resolve_or_remove_nameless_interfaces() local 254 while (addr != nullptr) { in resolve_or_remove_nameless_interfaces() 255 ifaddrs* next_addr = addr->ifa.ifa_next; in resolve_or_remove_nameless_interfaces() 258 if (strlen(addr->name) == 0) { in resolve_or_remove_nameless_interfaces() [all …]
|
D | arpa_inet.cpp | 31 in_addr addr; in inet_addr() local 32 return inet_aton(cp, &addr) ? addr.s_addr : INADDR_NONE; in inet_addr() 35 int inet_aton(const char* cp, in_addr* addr) { in inet_aton() argument 70 if (addr != nullptr) addr->s_addr = htonl(result); in inet_aton()
|
D | ptrace.cpp | 32 extern "C" long __ptrace(int req, pid_t pid, void* addr, void* data); 41 void* addr = va_arg(args, void*); in ptrace() local 50 long result = __ptrace(req, pid, addr, data); in ptrace()
|
D | NetdClientDispatch.cpp | 57 int accept4(int fd, sockaddr* addr, socklen_t* addr_length, int flags) { in accept4() argument 58 return FDTRACK_CREATE(__netdClientDispatch.accept4(fd, addr, addr_length, flags)); in accept4() 61 int connect(int fd, const sockaddr* addr, socklen_t addr_length) { in connect() argument 62 return __netdClientDispatch.connect(fd, addr, addr_length); in connect()
|
D | android_unsafe_frame_pointer_chase.cpp | 85 uintptr_t addr = __bionic_clear_pac_bits(frame->return_addr); in android_unsafe_frame_pointer_chase() local 86 if (addr == 0) { in android_unsafe_frame_pointer_chase() 89 buf[num_frames] = addr; in android_unsafe_frame_pointer_chase()
|
D | accept.cpp | 19 int accept(int sockfd, sockaddr* addr, socklen_t* addrlen) { in accept() argument 20 return accept4(sockfd, addr, addrlen, 0); in accept()
|
D | posix_madvise.cpp | 34 int posix_madvise(void* addr, size_t len, int advice) { in posix_madvise() argument 41 return (madvise(addr, len, advice) == 0 ? 0 : errno); in posix_madvise()
|
D | system_property_set.cpp | 77 sockaddr_un addr; in PropertyServiceConnection() local 78 memset(&addr, 0, sizeof(addr)); in PropertyServiceConnection() 79 strlcpy(addr.sun_path, socket, sizeof(addr.sun_path)); in PropertyServiceConnection() 80 addr.sun_family = AF_LOCAL; in PropertyServiceConnection() 84 reinterpret_cast<sockaddr*>(&addr), alen)) == -1) { in PropertyServiceConnection()
|
/bionic/libc/upstream-openbsd/lib/libc/net/ |
D | inet_makeaddr.c | 41 in_addr_t addr; in inet_makeaddr() local 44 addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST); in inet_makeaddr() 46 addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST); in inet_makeaddr() 48 addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST); in inet_makeaddr() 50 addr = net | host; in inet_makeaddr() 51 addr = htonl(addr); in inet_makeaddr() 52 return (*(struct in_addr *)&addr); in inet_makeaddr()
|
/bionic/libc/private/ |
D | WriteProtected.h | 77 auto addr = &contents; in contents_addr() local 81 __asm__ __volatile__("" : "+r"(addr)); in contents_addr() 82 return addr; in contents_addr() 86 auto addr = contents_addr(); in set_protection() local 90 addr = untag_address(addr); in set_protection() 92 if (mprotect(reinterpret_cast<void*>(addr), max_android_page_size(), prot) == -1) { in set_protection()
|
/bionic/benchmarks/ |
D | syscall_mm_benchmark.cpp | 52 void* addr = mmap(area, params.size, params.prot, params.flags, fd, 0); in MmapBenchmarkImpl() local 53 if (addr == MAP_FAILED) { in MmapBenchmarkImpl() 61 MakeAllocationResident(addr, params.size, page_sz); in MmapBenchmarkImpl() 66 if (munmap(addr, params.size) != 0) { in MmapBenchmarkImpl() 267 void* addr = mmap(nullptr, params.size, params.prot, params.flags, 0, 0); in MadviseBenchmark() local 268 if (addr == MAP_FAILED) { in MadviseBenchmark() 275 MakeAllocationResident(addr, params.size, page_sz); in MadviseBenchmark() 279 madvise(addr, params.size, madvise_flags); in MadviseBenchmark() 282 if (munmap(addr, params.size) != 0) { in MadviseBenchmark() 317 void MprotectBenchmark(benchmark::State& state, const struct MprotectParams& params, void* addr) { in MprotectBenchmark() argument [all …]
|
/bionic/libc/kernel/uapi/linux/ |
D | if_pppol2tp.h | 16 struct sockaddr_in addr; member 25 struct sockaddr_in6 addr; member 30 struct sockaddr_in addr; member 39 struct sockaddr_in6 addr; member
|
D | virtio_mem.h | 20 __virtio64 addr; member 25 __virtio64 addr; member 30 __virtio64 addr; member 64 __le64 addr; member
|
D | nvme_ioctl.h | 17 __u64 addr; member 32 __u64 addr; member 52 __u64 addr; member 76 __u64 addr; member
|
D | elf-fdpic.h | 12 Elf32_Addr addr; member 23 Elf64_Addr addr; member
|
/bionic/libdl/ |
D | libdl_cfi.cpp | 48 uintptr_t addr = reinterpret_cast<uintptr_t>(untag_address(p)); in shadow_load() local 49 uintptr_t ofs = CFIShadow::MemToShadowOffset(addr); in shadow_load() 55 uintptr_t addr = reinterpret_cast<uintptr_t>(Ptr); in cfi_check_addr() local 59 uintptr_t aligned_addr = align_down(addr, CFIShadow::kShadowAlign) + CFIShadow::kShadowAlign; in cfi_check_addr()
|
/bionic/libc/kernel/uapi/xen/ |
D | privcmd.h | 29 __u64 addr; member 37 __u64 addr; member 56 __u64 addr; member 71 __u64 addr; member
|
/bionic/libc/dns/net/ |
D | getnameinfo.c | 182 const char *addr; in getnameinfo_inet() local 211 addr = (const char *)(const void *)sa + afd->a_off; in getnameinfo_inet() 298 if ((error = ip6_parsenumeric(sa, addr, host, in getnameinfo_inet() 305 if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr)) in getnameinfo_inet() 318 hp = android_gethostbyaddrfornetcontext_proxy(addr, afd->a_addrlen, afd->a_af, &netcontext); in getnameinfo_inet() 346 if ((error = ip6_parsenumeric(sa, addr, host, in getnameinfo_inet() 354 if (inet_ntop(afd->a_af, addr, host, in getnameinfo_inet() 366 ip6_parsenumeric(const struct sockaddr *sa, const char *addr, char *host, in ip6_parsenumeric() argument 373 assert(addr != NULL); in ip6_parsenumeric() 376 if (inet_ntop(AF_INET6, addr, numaddr, sizeof(numaddr)) == NULL) in ip6_parsenumeric()
|
/bionic/libc/kernel/uapi/asm-arm/asm/ |
D | mman.h | 8 #define arch_mmap_check(addr,len,flags) (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? - E… argument
|
/bionic/libc/kernel/uapi/asm-x86/asm/ |
D | setup_data.h | 34 __u64 addr; member 37 __u64 addr; member 60 __u64 addr; member
|