/bionic/tests/ |
D | ifaddrs_test.cpp | 50 for (ifaddrs* addr = addrs; addr != nullptr; addr = addr->ifa_next) { in TEST() local 51 if (addr->ifa_name && strcmp(addr->ifa_name, "lo") == 0) { in TEST() 52 if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET) lo_inet4 = addr; in TEST() 53 else if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_INET6) lo_inet6 = addr; in TEST() 54 else if (addr->ifa_addr && addr->ifa_addr->sa_family == AF_PACKET) lo_packet = addr; in TEST() 83 for (ifaddrs* addr = addrs; addr != nullptr; addr = addr->ifa_next) { in TEST() local 84 int family = addr->ifa_addr ? addr->ifa_addr->sa_family : in TEST() 85 addr->ifa_broadaddr ? addr->ifa_broadaddr->sa_family : in TEST() 89 ifaddrs_socks.push_back(std::string(addr->ifa_name)); in TEST() 133 in_addr_t addr = sock->sin_addr.s_addr; in CheckAddressIsInSet() local [all …]
|
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 | 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 | 108 sockaddr_in6 *addr = reinterpret_cast<sockaddr_in6*>(ai->ai_addr); in TEST() local 109 ASSERT_EQ(addr->sin6_family, AF_INET6); in TEST() 110 ASSERT_EQ(0, memcmp(&addr->sin6_addr, &in6addr_loopback, sizeof(in6_addr))); in TEST() 144 sockaddr_in addr; in TEST() local 146 memset(&addr, 0, sizeof(sockaddr_in)); in TEST() 147 addr.sin_family = AF_INET; in TEST() 148 addr.sin_addr.s_addr = htonl(0x7f000001); in TEST() 149 ASSERT_EQ(0, getnameinfo(reinterpret_cast<sockaddr*>(&addr), sizeof(addr), in TEST() 162 sockaddr_in6 addr; in TEST() local 164 memset(&addr, 0, sizeof(sockaddr_in6)); in TEST() [all …]
|
/bionic/libc/bionic/ |
D | ether_ntoa.c | 38 ether_ntoa_r (const struct ether_addr *addr, char * buf) in ether_ntoa_r() argument 41 addr->ether_addr_octet[0], addr->ether_addr_octet[1], in ether_ntoa_r() 42 addr->ether_addr_octet[2], addr->ether_addr_octet[3], in ether_ntoa_r() 43 addr->ether_addr_octet[4], addr->ether_addr_octet[5]); in ether_ntoa_r() 51 ether_ntoa (const struct ether_addr *addr) in ether_ntoa() argument 54 return ether_ntoa_r(addr, buf); in ether_ntoa()
|
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 | ether_aton.c | 53 ether_aton_r (const char *asc, struct ether_addr * addr) in ether_aton_r() argument 67 addr->ether_addr_octet[i] = (u_int8_t)((val0 << 4) + val1); in ether_aton_r() 77 return addr; in ether_aton_r() 87 static struct ether_addr addr; in ether_aton() local 88 return ether_aton_r(asc, &addr); in ether_aton()
|
D | mmap.cpp | 44 void* mmap64(void* addr, size_t size, int prot, int flags, int fd, off64_t offset) { in mmap64() argument 61 void* result = __mmap2(addr, size, prot, flags, fd, offset >> MMAP2_SHIFT); in mmap64() 75 void* mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset) { in mmap() argument 76 return mmap64(addr, size, prot, flags, fd, static_cast<off64_t>(offset)); in mmap()
|
D | system_property_set.cpp | 64 sockaddr_un addr; in PropertyServiceConnection() local 65 memset(&addr, 0, sizeof(addr)); in PropertyServiceConnection() 66 strlcpy(addr.sun_path, property_service_socket, sizeof(addr.sun_path)); in PropertyServiceConnection() 67 addr.sun_family = AF_LOCAL; in PropertyServiceConnection() 71 reinterpret_cast<sockaddr*>(&addr), alen)) == -1) { in PropertyServiceConnection()
|
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 | 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 | 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()
|
/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/malloc_debug/ |
D | MapData.cpp | 81 static inline bool get_val(MapEntry* entry, uintptr_t addr, T* store) { in get_val() argument 82 if (!(entry->flags & PROT_READ) || addr < entry->start || addr + sizeof(T) > entry->end) { in get_val() 86 if (addr & (sizeof(T) - 1)) { in get_val() 89 *store = *reinterpret_cast<T*>(addr); in get_val() 94 uintptr_t addr = entry->start; in valid_elf() local 96 if (__builtin_add_overflow(addr, SELFMAG, &end) || end >= entry->end) { in valid_elf() 100 return memcmp(reinterpret_cast<void*>(addr), ELFMAG, SELFMAG) == 0; in valid_elf() 105 uintptr_t addr = entry->start; in read_loadbias() local 107 if (!get_val<ElfW(Half)>(entry, addr + offsetof(ElfW(Ehdr), e_phnum), &ehdr.e_phnum)) { in read_loadbias() 110 if (!get_val<ElfW(Off)>(entry, addr + offsetof(ElfW(Ehdr), e_phoff), &ehdr.e_phoff)) { in read_loadbias() [all …]
|
/bionic/libc/kernel/uapi/linux/ |
D | if_pppol2tp.h | 28 struct sockaddr_in addr; member 37 struct sockaddr_in6 addr; member 42 struct sockaddr_in addr; member 51 struct sockaddr_in6 addr; member
|
D | ip_vs.h | 99 __be32 addr; member 108 __be32 addr; member 134 __be32 addr; member 145 __be32 addr; member 158 __be32 addr; member
|
D | nvme_ioctl.h | 29 __u64 addr; member 44 __u64 addr; member 64 __u64 addr; member
|
/bionic/libc/private/ |
D | WriteProtected.h | 77 auto addr = &contents; in set_protection() local 81 addr = untag_address(addr); in set_protection() 83 if (mprotect(reinterpret_cast<void*>(addr), PAGE_SIZE, prot) == -1) { in set_protection()
|
/bionic/libc/dns/net/ |
D | getnameinfo.c | 179 const char *addr; in getnameinfo_inet() local 208 addr = (const char *)(const void *)sa + afd->a_off; in getnameinfo_inet() 295 if ((error = ip6_parsenumeric(sa, addr, host, in getnameinfo_inet() 302 if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr)) in getnameinfo_inet() 315 hp = android_gethostbyaddrfornetcontext_proxy(addr, afd->a_addrlen, afd->a_af, &netcontext); in getnameinfo_inet() 343 if ((error = ip6_parsenumeric(sa, addr, host, in getnameinfo_inet() 351 if (inet_ntop(afd->a_af, addr, host, in getnameinfo_inet() 363 ip6_parsenumeric(const struct sockaddr *sa, const char *addr, char *host, in ip6_parsenumeric() argument 370 assert(addr != NULL); in ip6_parsenumeric() 373 if (inet_ntop(AF_INET6, addr, numaddr, sizeof(numaddr)) == NULL) in ip6_parsenumeric()
|
D | getaddrinfo.c | 274 #define GET_AI(ai, afd, addr) \ argument 277 (ai) = get_ai(pai, (afd), (addr)); \ 380 sockaddr_union addr = { .in6 = sin6_test }; in _have_ipv6() local 381 return _find_src_addr(&addr.generic, NULL, mark, uid) == 1; in _have_ipv6() 390 sockaddr_union addr = { .in = sin_test }; in _have_ipv4() local 391 return _find_src_addr(&addr.generic, NULL, mark, uid) == 1; in _have_ipv4() 1024 char *cp, *hostname2 = NULL, *scope, *addr; in explore_numeric_scope() 1057 addr = hostname2; in explore_numeric_scope() 1060 error = explore_numeric(pai, addr, servname, res, hostname); in explore_numeric_scope() 1099 get_ai(const struct addrinfo *pai, const struct afd *afd, const char *addr) in get_ai() argument [all …]
|
/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 | 41 __u64 addr; member 49 __u64 addr; member 68 __u64 addr; member
|
/bionic/libc/kernel/uapi/asm-arm/asm/ |
D | mman.h | 20 #define arch_mmap_check(addr,len,flags) (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? - E… argument
|