/frameworks/base/core/java/android/net/ |
D | MacAddress.java | 48 private static final byte[] ETHER_ADDR_BROADCAST = addr(0xff, 0xff, 0xff, 0xff, 0xff, 0xff); 100 private MacAddress(long addr) { in MacAddress() argument 101 mAddr = (VALID_LONG_MASK & addr); in MacAddress() 197 public static boolean isMacAddress(byte[] addr) { in isMacAddress() argument 198 return MacAddressUtils.isMacAddress(addr); in isMacAddress() 212 public static int macAddressType(byte[] addr) { in macAddressType() argument 213 if (!isMacAddress(addr)) { in macAddressType() 216 return MacAddress.fromBytes(addr).getAddressType(); in macAddressType() 230 public static @NonNull byte[] byteAddrFromStringAddr(String addr) { in byteAddrFromStringAddr() argument 231 Preconditions.checkNotNull(addr); in byteAddrFromStringAddr() [all …]
|
/frameworks/base/core/java/android/net/util/ |
D | DnsUtils.java | 120 public SortableAddress(@NonNull InetAddress addr, @Nullable InetAddress srcAddr) { in SortableAddress() argument 121 address = addr; in SortableAddress() 123 label = findLabel(addr); in SortableAddress() 124 scope = findScope(addr); in SortableAddress() 125 precedence = findPrecedence(addr); in SortableAddress() 128 if (isIpv6Address(addr) && isIpv6Address(srcAddr)) { in SortableAddress() 129 prefixMatchLen = compareIpv6PrefixMatchLen(srcAddr, addr); in SortableAddress() 145 for (InetAddress addr : answers) { in rfc6724Sort() 146 sortableAnswerList.add(new SortableAddress(addr, findSrcAddress(network, addr))); in rfc6724Sort() 160 @NonNull InetAddress addr) { in findSrcAddress() argument [all …]
|
/frameworks/rs/script_api/ |
D | rs_atomic.spec | 37 arg: volatile int32_t* addr, "Address of the value to modify." 41 Atomicly adds a value to the value at addr, i.e. <code>*addr += value</code>. 48 arg: volatile uint32_t* addr 56 arg: volatile int32_t* addr, "Address of the value to modify." 60 Atomicly performs a bitwise and of two values, storing the result back at addr, 61 i.e. <code>*addr &= value</code>. 68 arg: volatile uint32_t* addr 76 arg: volatile int32_t* addr, "Address of the value to compare and replace if the test passes." 81 If the value at addr matches compareValue then the newValue is written at addr, 82 i.e. <code>if (*addr == compareValue) { *addr = newValue; }</code>. [all …]
|
/frameworks/rs/script_api/include/ |
D | rs_atomic.rsh | 42 * Atomicly adds a value to the value at addr, i.e. *addr += value. 45 * addr: Address of the value to modify. 48 * Returns: Value of *addr prior to the operation. 52 rsAtomicAdd(volatile int32_t* addr, int32_t value); 57 rsAtomicAdd(volatile uint32_t* addr, uint32_t value); 63 * Atomicly performs a bitwise and of two values, storing the result back at addr, 64 * i.e. *addr &= value. 67 * addr: Address of the value to modify. 70 * Returns: Value of *addr prior to the operation. 74 rsAtomicAnd(volatile int32_t* addr, int32_t value); [all …]
|
/frameworks/libs/net/common/src_frameworkcommon/android/net/util/ |
D | MacAddressUtils.java | 79 long addr; in createRandomUnicastAddress() local 82 addr = r.nextLong() & VALID_LONG_MASK; in createRandomUnicastAddress() 84 addr = (longAddrFromByteAddr(base.toByteArray()) & OUI_MASK) in createRandomUnicastAddress() 87 addr |= LOCALLY_ASSIGNED_MASK; in createRandomUnicastAddress() 88 addr &= ~MULTICAST_MASK; in createRandomUnicastAddress() 89 MacAddress mac = MacAddress.fromBytes(byteAddrFromLongAddr(addr)); in createRandomUnicastAddress() 99 public static long longAddrFromByteAddr(byte[] addr) { in longAddrFromByteAddr() argument 100 Objects.requireNonNull(addr); in longAddrFromByteAddr() 101 if (!isMacAddress(addr)) { in longAddrFromByteAddr() 103 Arrays.toString(addr) + " was not a valid MAC address"); in longAddrFromByteAddr() [all …]
|
/frameworks/base/location/tests/locationtests/src/android/location/ |
D | GeocoderTest.java | 42 Address addr = addresses1.get(0); in testGeocoder() local 43 assertEquals("94305", addr.getFeatureName()); in testGeocoder() 44 assertEquals("Palo Alto, CA 94305", addr.getAddressLine(0)); in testGeocoder() 45 assertEquals("USA", addr.getAddressLine(1)); in testGeocoder() 46 assertEquals("94305", addr.getPostalCode()); in testGeocoder() 47 assertFalse(Math.abs(addr.getLatitude() - 37.4240385) > 0.1); in testGeocoder() 53 addr = addresses2.get(0); in testGeocoder() 54 assertEquals("San Francisco", addr.getFeatureName()); in testGeocoder() 55 assertEquals("San Francisco, CA", addr.getAddressLine(0)); in testGeocoder() 56 assertEquals("United States", addr.getAddressLine(1)); in testGeocoder() [all …]
|
/frameworks/native/libs/binder/include/binder/ |
D | IpPrefix.h | 41 IpPrefix(const struct in6_addr& addr, int32_t plen): in IpPrefix() argument 42 mUnion(addr), mPrefixLength(plen), mIsIpv6(true) { } in IpPrefix() 44 IpPrefix(const struct in_addr& addr, int32_t plen): in IpPrefix() argument 45 mUnion(addr), mPrefixLength(plen), mIsIpv6(false) { } in IpPrefix() 47 bool getAddressAsIn6Addr(struct in6_addr* addr) const; 48 bool getAddressAsInAddr(struct in_addr* addr) const; 58 void setAddress(const struct in6_addr& addr); 59 void setAddress(const struct in_addr& addr); 77 explicit InternalUnion(const struct in6_addr &addr):mIn6Addr(addr) { }; in InternalUnion() argument 78 explicit InternalUnion(const struct in_addr &addr):mInAddr(addr) { }; in InternalUnion() argument
|
/frameworks/base/telephony/java/com/android/internal/telephony/cdma/ |
D | SmsMessage.java | 115 public SmsMessage(SmsAddress addr, SmsEnvelope env) { in SmsMessage() argument 116 mOriginatingAddress = addr; in SmsMessage() 472 CdmaSmsAddress addr = new CdmaSmsAddress(); in parsePdu() local 482 addr.digitMode = dis.readByte(); in parsePdu() 483 addr.numberMode = dis.readByte(); in parsePdu() 484 addr.ton = dis.readByte(); in parsePdu() 485 addr.numberPlan = dis.readByte(); in parsePdu() 488 addr.numberOfDigits = length; in parsePdu() 496 addr.origBytes = new byte[length]; in parsePdu() 497 dis.read(addr.origBytes, 0, length); // digits in parsePdu() [all …]
|
/frameworks/base/telephony/java/com/android/internal/telephony/cdma/sms/ |
D | CdmaSmsAddress.java | 204 CdmaSmsAddress addr = new CdmaSmsAddress(); in parse() local 205 addr.address = address; in parse() 206 addr.ton = TON_UNKNOWN; in parse() 207 addr.digitMode = DIGIT_MODE_4BIT_DTMF; in parse() 208 addr.numberPlan = NUMBERING_PLAN_UNKNOWN; in parse() 209 addr.numberMode = NUMBER_MODE_NOT_DATA_NETWORK; in parse() 216 addr.digitMode = DIGIT_MODE_8BIT_CHAR; in parse() 217 addr.numberMode = NUMBER_MODE_DATA_NETWORK; in parse() 222 addr.ton = TON_NATIONAL_OR_EMAIL; in parse() 228 addr.ton = TON_INTERNATIONAL_OR_IP; in parse() [all …]
|
/frameworks/base/libs/hwui/tests/common/ |
D | TestUtils.cpp | 129 const uint8_t* addr = pixmap.addr8(x, y); in getColor() local 130 return SkColorSetRGB(*addr, *addr, *addr); in getColor() 133 const uint8_t* addr = pixmap.addr8(x, y); in getColor() local 134 return SkColorSetA(0, addr[0]); in getColor() 137 const uint16_t* addr = pixmap.addr16(x, y); in getColor() local 138 return SkPixel16ToColor(addr[0]); in getColor() 141 const uint16_t* addr = pixmap.addr16(x, y); in getColor() local 142 SkPMColor c = SkPixel4444ToPixel32(addr[0]); in getColor() 146 const uint32_t* addr = pixmap.addr32(x, y); in getColor() local 147 SkPMColor c = SkSwizzle_BGRA_to_PMColor(addr[0]); in getColor() [all …]
|
/frameworks/libs/net/common/src_frameworkcommon/com/android/net/module/util/ |
D | Inet4AddressUtils.java | 69 byte [] addr = inetAddr.getAddress(); in inet4AddressToIntHTH() 70 return ((addr[0] & 0xff) << 24) | ((addr[1] & 0xff) << 16) in inet4AddressToIntHTH() 71 | ((addr[2] & 0xff) << 8) | (addr[3] & 0xff); in inet4AddressToIntHTH() 150 public static Inet4Address getBroadcastAddress(Inet4Address addr, int prefixLength) in getBroadcastAddress() argument 152 final int intBroadcastAddr = inet4AddressToIntHTH(addr) in getBroadcastAddress()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cdma/ |
D | SmsMessageConverter.java | 43 CdmaSmsAddress addr = new CdmaSmsAddress(); in newCdmaSmsMessageFromRil() local 68 addr.digitMode = (byte) (0xFF & addressDigitMode); in newCdmaSmsMessageFromRil() 69 addr.numberMode = (byte) (0xFF & cdmaSmsMessage.address.numberMode); in newCdmaSmsMessageFromRil() 70 addr.ton = cdmaSmsMessage.address.numberType; in newCdmaSmsMessageFromRil() 71 addr.numberPlan = (byte) (0xFF & cdmaSmsMessage.address.numberPlan); in newCdmaSmsMessageFromRil() 73 addr.numberOfDigits = count; in newCdmaSmsMessageFromRil() 84 addr.origBytes = data; in newCdmaSmsMessageFromRil() 125 env.origAddress = addr; in newCdmaSmsMessageFromRil() 128 SmsMessage msg = new SmsMessage(addr, env); in newCdmaSmsMessageFromRil()
|
/frameworks/av/media/codec2/vndk/ |
D | C2AllocatorIon.cpp | 92 void **addr /* nonnull */) override; 93 virtual c2_status_t unmap(void *addr, size_t size, C2Fence *fenceFd) override; 175 c2_status_t map(size_t offset, size_t size, C2MemoryUsage usage, C2Fence *fence, void **addr) { in map() argument 177 *addr = nullptr; in map() 203 … c2_status_t err = mapInternal(mapSize, mapOffset, alignmentBytes, prot, flags, &(map.addr), addr); in map() 204 if (map.addr) { in map() 210 c2_status_t unmap(void *addr, size_t size, C2Fence *fence) { in unmap() argument 216 if (addr != (uint8_t *)it->addr + it->alignmentBytes || in unmap() 220 int err = munmap(it->addr, it->size); in unmap() 229 ALOGV("successfully unmapped: addr=%p size=%zu fd=%d", addr, size, mHandle.bufferFd()); in unmap() [all …]
|
D | C2AllocatorGralloc.cpp | 257 C2PlanarLayout *layout /* nonnull */, uint8_t **addr /* nonnull */) override; 259 uint8_t **addr /* nonnull */, C2Rect rect, C2Fence *fence /* nullable */) override; 318 uint8_t* addr[C2PlanarLayout::MAX_NUM_PLANES] = {}; in ~C2AllocationGralloc() local 319 unmap(addr, C2Rect(), nullptr); in ~C2AllocationGralloc() 340 C2PlanarLayout *layout /* nonnull */, uint8_t **addr /* nonnull */) { in map() argument 353 if (!layout || !addr) { in map() 398 addr[C2PlanarLayout::PLANE_Y] = (uint8_t *)pointer; in map() 399 addr[C2PlanarLayout::PLANE_U] = (uint8_t *)pointer; in map() 400 addr[C2PlanarLayout::PLANE_V] = (uint8_t *)pointer; in map() 401 addr[C2PlanarLayout::PLANE_A] = (uint8_t *)pointer; in map() [all …]
|
/frameworks/base/packages/Tethering/src/android/net/util/ |
D | PrefixUtils.java | 62 for (LinkAddress addr : lp.getAllLinkAddresses()) { in localPrefixesFrom() 63 if (addr.getAddress().isLinkLocalAddress()) continue; in localPrefixesFrom() 64 localPrefixes.add(asIpPrefix(addr)); in localPrefixesFrom() 73 public static IpPrefix asIpPrefix(LinkAddress addr) { in asIpPrefix() argument 74 return new IpPrefix(addr.getAddress(), addr.getPrefixLength()); in asIpPrefix()
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/cdma/sms/ |
D | CdmaSmsTest.java | 50 CdmaSmsAddress addr = CdmaSmsAddress.parse("6502531000"); in testCdmaSmsAddrParsing() local 51 assertEquals(addr.ton, CdmaSmsAddress.TON_UNKNOWN); in testCdmaSmsAddrParsing() 52 assertEquals(addr.digitMode, CdmaSmsAddress.DIGIT_MODE_4BIT_DTMF); in testCdmaSmsAddrParsing() 53 assertEquals(addr.numberMode, CdmaSmsAddress.NUMBER_MODE_NOT_DATA_NETWORK); in testCdmaSmsAddrParsing() 54 assertEquals(addr.numberOfDigits, 10); in testCdmaSmsAddrParsing() 55 assertEquals(addr.origBytes.length, 10); in testCdmaSmsAddrParsing() 58 assertEquals(addr.origBytes[i], data[i]); in testCdmaSmsAddrParsing() 60 addr = CdmaSmsAddress.parse("(650) 253-1000"); in testCdmaSmsAddrParsing() 61 assertEquals(addr.ton, CdmaSmsAddress.TON_UNKNOWN); in testCdmaSmsAddrParsing() 62 assertEquals(addr.digitMode, CdmaSmsAddress.DIGIT_MODE_4BIT_DTMF); in testCdmaSmsAddrParsing() [all …]
|
/frameworks/av/media/libstagefright/rtsp/ |
D | UDPPusher.cpp | 40 struct sockaddr_in addr; in UDPPusher() local 41 memset(addr.sin_zero, 0, sizeof(addr.sin_zero)); in UDPPusher() 42 addr.sin_family = AF_INET; in UDPPusher() 43 addr.sin_addr.s_addr = INADDR_ANY; in UDPPusher() 44 addr.sin_port = 0; in UDPPusher() 46 CHECK_EQ(0, bind(mSocket, (const struct sockaddr *)&addr, sizeof(addr))); in UDPPusher()
|
D | ARTPSession.cpp | 104 struct sockaddr_in addr; in MakeUDPSocket() local 105 memset(addr.sin_zero, 0, sizeof(addr.sin_zero)); in MakeUDPSocket() 106 addr.sin_family = AF_INET; in MakeUDPSocket() 107 addr.sin_addr.s_addr = INADDR_ANY; in MakeUDPSocket() 108 addr.sin_port = htons(port); in MakeUDPSocket() 110 CHECK_EQ(0, bind(s, (const struct sockaddr *)&addr, sizeof(addr))); in MakeUDPSocket()
|
/frameworks/native/libs/binder/ |
D | IpPrefix.cpp | 104 bool IpPrefix::getAddressAsIn6Addr(struct in6_addr* addr) const in getAddressAsIn6Addr() 107 *addr = mUnion.mIn6Addr; in getAddressAsIn6Addr() 113 bool IpPrefix::getAddressAsInAddr(struct in_addr* addr) const in getAddressAsInAddr() 116 *addr = mUnion.mInAddr; in getAddressAsInAddr() 137 void IpPrefix::setAddress(const struct in6_addr& addr) in setAddress() argument 139 mUnion.mIn6Addr = addr; in setAddress() 143 void IpPrefix::setAddress(const struct in_addr& addr) in setAddress() argument 145 mUnion.mInAddr = addr; in setAddress()
|
/frameworks/compile/mclinker/lib/Target/X86/ |
D | X86PLT.cpp | 155 *offset = m_GOTPLT.addr() + 4; in applyPLT0() 157 *offset = m_GOTPLT.addr() + 8; in applyPLT0() 165 assert(m_Section.addr() && ".plt base address is NULL!"); in applyPLT1() 176 GOTEntryOffset += m_GOTPLT.addr(); in applyPLT1() 238 *offset = m_GOTPLT.addr() - addr() + 8 - 6; in applyPLT0() 241 *offset = m_GOTPLT.addr() - addr() + 16 - 12; in applyPLT0() 248 assert(m_Section.addr() && ".plt base address is NULL!"); in applyPLT1() 257 uint64_t SymGOTPCREL = m_GOTPLT.addr(); in applyPLT1() 267 SymGOTPCREL -= addr() + PLTEntryOffset + 6; in applyPLT1()
|
/frameworks/av/media/codec2/tests/vndk/ |
D | C2BufferTest.cpp | 255 void mapLinear(size_t offset, size_t size, uint8_t **addr) { in mapLinear() argument 270 *addr = (uint8_t *)mAddr; in mapLinear() 301 void mapGraphic(C2Rect rect, C2PlanarLayout *layout, uint8_t **addr) { in mapGraphic() argument 309 addr); in mapGraphic() 311 addr[C2PlanarLayout::PLANE_Y] = nullptr; in mapGraphic() 312 addr[C2PlanarLayout::PLANE_U] = nullptr; in mapGraphic() 313 addr[C2PlanarLayout::PLANE_V] = nullptr; in mapGraphic() 317 memcpy(mAddrGraphic, addr, sizeof(uint8_t*) * C2PlanarLayout::MAX_NUM_PLANES); in mapGraphic() 349 uint8_t *addr = nullptr; in TEST_F() local 350 mapLinear(0u, kCapacity, &addr); in TEST_F() [all …]
|
/frameworks/base/libs/hwui/utils/ |
D | LinearAllocator.cpp | 111 node->dtor(node->addr); in ~LinearAllocator() 174 void LinearAllocator::addToDestructionList(Destructor dtor, void* addr) { in addToDestructionList() argument 181 node->addr = addr; in addToDestructionList() 186 void LinearAllocator::runDestructorFor(void* addr) { in runDestructorFor() argument 190 if (node->addr == addr) { in runDestructorFor() 196 node->dtor(node->addr); in runDestructorFor()
|
/frameworks/base/libs/hwui/hwui/ |
D | Bitmap.cpp | 89 void* addr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in allocateAshmemBitmap() local 90 if (addr == MAP_FAILED) { in allocateAshmemBitmap() 96 munmap(addr, size); in allocateAshmemBitmap() 100 return sk_sp<Bitmap>(new Bitmap(addr, fd, size, info, rowBytes)); in allocateAshmemBitmap() 128 void* addr = calloc(size, 1); in allocateHeapBitmap() local 129 if (!addr) { in allocateHeapBitmap() 132 return sk_sp<Bitmap>(new Bitmap(addr, size, info, rowBytes)); in allocateHeapBitmap() 135 void FreePixelRef(void* addr, void* context) { in FreePixelRef() argument 175 sk_sp<Bitmap> Bitmap::createFrom(const SkImageInfo& info, size_t rowBytes, int fd, void* addr, in createFrom() argument 185 if (!addr) { in createFrom() [all …]
|
/frameworks/compile/mclinker/lib/Target/ |
D | ELFDynamic.cpp | 200 applyOne(llvm::ELF::DT_INIT, pFormat.getInit().addr()); in applyEntries() 203 applyOne(llvm::ELF::DT_FINI, pFormat.getFini().addr()); in applyEntries() 206 applyOne(llvm::ELF::DT_PREINIT_ARRAY, pFormat.getPreInitArray().addr()); in applyEntries() 211 applyOne(llvm::ELF::DT_INIT_ARRAY, pFormat.getInitArray().addr()); in applyEntries() 216 applyOne(llvm::ELF::DT_FINI_ARRAY, pFormat.getFiniArray().addr()); in applyEntries() 221 applyOne(llvm::ELF::DT_HASH, pFormat.getHashTab().addr()); in applyEntries() 224 applyOne(llvm::ELF::DT_GNU_HASH, pFormat.getGNUHashTab().addr()); in applyEntries() 227 applyOne(llvm::ELF::DT_SYMTAB, pFormat.getDynSymTab().addr()); in applyEntries() 232 applyOne(llvm::ELF::DT_STRTAB, pFormat.getDynStrTab().addr()); in applyEntries() 240 applyOne(llvm::ELF::DT_JMPREL, pFormat.getRelPlt().addr()); in applyEntries() [all …]
|
/frameworks/libs/net/common/tests/unit/src/com/android/net/module/util/ |
D | Inet4AddressUtilsTest.java | 119 private void checkAddressMasking(String expectedAddr, String addr, int prefixLength) { in checkAddressMasking() argument 121 final int addrInt = inet4AddressToIntHTH(ipv4Address(addr)); in checkAddressMasking() 145 private void assertInvalidNetworkMask(Inet4Address addr) { in assertInvalidNetworkMask() argument 147 netmaskToPrefixLength(addr); in assertInvalidNetworkMask() 148 fail("Invalid netmask " + addr.getHostAddress() + " did not cause exception"); in assertInvalidNetworkMask() 207 private Inet4Address ipv4Address(String addr) { in ipv4Address() argument 208 return (Inet4Address) InetAddresses.parseNumericAddress(addr); in ipv4Address()
|