/frameworks/base/services/tests/servicestests/src/android/net/ |
D | IpUtilsTest.java | 77 ByteBuffer packet = ByteBuffer.wrap(new byte[] { in testIpv6TcpChecksum() local 99 int transportLen = packet.limit() - IPV6_HEADER_LENGTH; in testIpv6TcpChecksum() 100 assertEquals(0, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum() 104 int sum = getUnsignedByte(packet, sumOffset) * 256 + getUnsignedByte(packet, sumOffset + 1); in testIpv6TcpChecksum() 107 packet.put(sumOffset, (byte) 0); in testIpv6TcpChecksum() 108 packet.put(sumOffset + 1, (byte) 0); in testIpv6TcpChecksum() 109 assertChecksumEquals(sum, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum() 112 packet.putShort( in testIpv6TcpChecksum() 114 IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum() 115 assertEquals(0, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum() [all …]
|
/frameworks/av/media/mtp/ |
D | MtpObjectInfo.cpp | 58 bool MtpObjectInfo::read(MtpDataPacket& packet) { in read() argument 62 if (!packet.getUInt32(mStorageID)) return false; in read() 63 if (!packet.getUInt16(mFormat)) return false; in read() 64 if (!packet.getUInt16(mProtectionStatus)) return false; in read() 65 if (!packet.getUInt32(mCompressedSize)) return false; in read() 66 if (!packet.getUInt16(mThumbFormat)) return false; in read() 67 if (!packet.getUInt32(mThumbCompressedSize)) return false; in read() 68 if (!packet.getUInt32(mThumbPixWidth)) return false; in read() 69 if (!packet.getUInt32(mThumbPixHeight)) return false; in read() 70 if (!packet.getUInt32(mImagePixWidth)) return false; in read() [all …]
|
D | MtpProperty.cpp | 126 bool MtpProperty::read(MtpDataPacket& packet) { in read() argument 129 if (!packet.getUInt16(mCode)) return false; in read() 131 if (!packet.getUInt16(mType)) return false; in read() 132 if (!packet.getUInt8(temp8)) return false; in read() 145 mDefaultArrayValues = readArrayValues(packet, mDefaultArrayLength); in read() 148 mCurrentArrayValues = readArrayValues(packet, mCurrentArrayLength); in read() 153 if (!readValue(packet, mDefaultValue)) return false; in read() 155 if (!readValue(packet, mCurrentValue)) return false; in read() 159 if (!packet.getUInt32(mGroupCode)) return false; in read() 161 if (!packet.getUInt8(mFormFlag)) return false; in read() [all …]
|
D | MtpDeviceInfo.cpp | 62 bool MtpDeviceInfo::read(MtpDataPacket& packet) { in read() argument 66 if (!packet.getUInt16(mStandardVersion)) return false; in read() 67 if (!packet.getUInt32(mVendorExtensionID)) return false; in read() 68 if (!packet.getUInt16(mVendorExtensionVersion)) return false; in read() 70 if (!packet.getString(string)) return false; in read() 73 if (!packet.getUInt16(mFunctionalMode)) return false; in read() 74 mOperations = packet.getAUInt16(); in read() 76 mEvents = packet.getAUInt16(); in read() 78 mDeviceProperties = packet.getAUInt16(); in read() 80 mCaptureFormats = packet.getAUInt16(); in read() [all …]
|
D | MtpStorageInfo.cpp | 48 bool MtpStorageInfo::read(MtpDataPacket& packet) { in read() argument 52 if (!packet.getUInt16(mStorageType)) return false; in read() 53 if (!packet.getUInt16(mFileSystemType)) return false; in read() 54 if (!packet.getUInt16(mAccessCapability)) return false; in read() 55 if (!packet.getUInt64(mMaxCapacity)) return false; in read() 56 if (!packet.getUInt64(mFreeSpaceBytes)) return false; in read() 57 if (!packet.getUInt32(mFreeSpaceObjects)) return false; in read() 59 if (!packet.getString(string)) return false; in read() 61 if (!packet.getString(string)) return false; in read()
|
D | MtpProperty.h | 87 bool read(MtpDataPacket& packet); 88 void write(MtpDataPacket& packet); 92 void setCurrentValue(MtpDataPacket& packet); 108 bool readValue(MtpDataPacket& packet, MtpPropertyValue& value); 109 void writeValue(MtpDataPacket& packet, MtpPropertyValue& value); 110 MtpPropertyValue* readArrayValues(MtpDataPacket& packet, uint32_t& length); 111 void writeArrayValues(MtpDataPacket& packet,
|
D | MtpStringBuffer.cpp | 126 bool MtpStringBuffer::readFromPacket(MtpDataPacket* packet) { in readFromPacket() argument 128 if (!packet->getUInt8(count)) in readFromPacket() 135 if (!packet->getUInt16(ch)) in readFromPacket() 154 void MtpStringBuffer::writeToPacket(MtpDataPacket* packet) const { in writeToPacket() 157 packet->putUInt8(count > 0 ? count + 1 : 0); in writeToPacket() 176 packet->putUInt16(ch); in writeToPacket() 180 packet->putUInt16(0); in writeToPacket()
|
D | MtpDatabase.h | 65 MtpDataPacket& packet) = 0; 69 MtpDataPacket& packet) = 0; 72 MtpDataPacket& packet) = 0; 75 MtpDataPacket& packet) = 0; 82 MtpDataPacket& packet) = 0;
|
D | MtpStringBuffer.h | 49 bool readFromPacket(MtpDataPacket* packet); 50 void writeToPacket(MtpDataPacket* packet) const;
|
D | MtpStorageInfo.h | 42 bool read(MtpDataPacket& packet);
|
D | MtpDeviceInfo.h | 47 bool read(MtpDataPacket& packet);
|
/frameworks/base/services/tests/servicestests/src/android/net/dhcp/ |
D | DhcpPacketTest.java | 127 ByteBuffer packet = new TestDhcpPacket(DHCP_MESSAGE_TYPE_OFFER) in assertDomainAndVendorInfoParses() local 131 DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP); in assertDomainAndVendorInfoParses() 172 ByteBuffer packet = testPacket.build(); in assertLeaseTimeParses() local 177 offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP); in assertLeaseTimeParses() 184 offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP); in assertLeaseTimeParses() 225 ByteBuffer packet = new TestDhcpPacket(type, clientIp, yourIp) in checkIpAddress() local 228 DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP); in checkIpAddress() 288 final ByteBuffer packet = ByteBuffer.wrap(HexEncoding.decode(( in testOffer1() local 310 DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_L3); in testOffer1() 319 final ByteBuffer packet = ByteBuffer.wrap(HexEncoding.decode(( in testOffer2() local [all …]
|
/frameworks/base/services/net/java/android/net/dhcp/ |
D | DhcpPacket.java | 666 private static Inet4Address readIpAddress(ByteBuffer packet) { in readIpAddress() argument 669 packet.get(ipAddr); in readIpAddress() 728 public static DhcpPacket decodeFullPacket(ByteBuffer packet, int pktType) throws ParseException in decodeFullPacket() argument 766 packet.order(ByteOrder.BIG_ENDIAN); in decodeFullPacket() 770 if (packet.remaining() < MIN_PACKET_LENGTH_L2) { in decodeFullPacket() 772 "L2 packet too short, %d < %d", packet.remaining(), MIN_PACKET_LENGTH_L2); in decodeFullPacket() 778 packet.get(l2dst); in decodeFullPacket() 779 packet.get(l2src); in decodeFullPacket() 781 short l2type = packet.getShort(); in decodeFullPacket() 790 if (packet.remaining() < MIN_PACKET_LENGTH_L3) { in decodeFullPacket() [all …]
|
D | DhcpClient.java | 358 DhcpPacket packet = null; in run() local 359 packet = DhcpPacket.decodeFullPacket(mPacket, length, DhcpPacket.ENCAP_L2); in run() 360 if (DBG) Log.d(TAG, "Received packet: " + packet); in run() 361 sendMessage(CMD_RECEIVED_PACKET, packet); in run() 412 ByteBuffer packet = DhcpPacket.buildDiscoverPacket( in sendDiscoverPacket() local 415 return transmitPacket(packet, "DHCPDISCOVER", DhcpPacket.ENCAP_L2, INADDR_BROADCAST); in sendDiscoverPacket() 425 ByteBuffer packet = DhcpPacket.buildRequestPacket( in sendRequestPacket() local 433 return transmitPacket(packet, description, encap, to); in sendRequestPacket() 634 public boolean isValidPacket(DhcpPacket packet) { in isValidPacket() argument 636 int xid = packet.getTransactionId(); in isValidPacket() [all …]
|
/frameworks/base/services/tests/servicestests/src/android/net/apf/ |
D | ApfTest.java | 89 private void assertVerdict(int expected, byte[] program, byte[] packet, int filterAge) { in assertVerdict() argument 90 assertEquals(expected, apfSimulate(program, packet, filterAge)); in assertVerdict() 93 private void assertPass(byte[] program, byte[] packet, int filterAge) { in assertPass() argument 94 assertVerdict(PASS, program, packet, filterAge); in assertPass() 97 private void assertDrop(byte[] program, byte[] packet, int filterAge) { in assertDrop() argument 98 assertVerdict(DROP, program, packet, filterAge); in assertDrop() 101 private void assertVerdict(int expected, ApfGenerator gen, byte[] packet, int filterAge) in assertVerdict() argument 103 assertEquals(expected, apfSimulate(gen.generate(), packet, filterAge)); in assertVerdict() 106 private void assertPass(ApfGenerator gen, byte[] packet, int filterAge) in assertPass() argument 108 assertVerdict(PASS, gen, packet, filterAge); in assertPass() [all …]
|
/frameworks/base/obex/javax/obex/ |
D | ServerOperation.java | 141 ObexPacket packet; in ServerOperation() local 180 packet = ObexPacket.read(request, mInput); in ServerOperation() 185 if (packet.mLength > ObexHelper.getMaxRxPacketSize(mTransport)) { in ServerOperation() 188 + packet.mLength + " maxLength: " + ObexHelper.getMaxRxPacketSize(mTransport)); in ServerOperation() 194 if (packet.mLength > 3) { in ServerOperation() 195 if(!handleObexPacket(packet)) { in ServerOperation() 228 private boolean handleObexPacket(ObexPacket packet) throws IOException { in handleObexPacket() argument 229 byte[] body = updateRequestHeaders(packet); in handleObexPacket() 274 private byte[] updateRequestHeaders(ObexPacket packet) throws IOException { in updateRequestHeaders() argument 276 if (packet.mPayload != null) { in updateRequestHeaders() [all …]
|
D | ClientSession.java | 393 byte[] packet = new byte[totalLength]; in setPath() 394 packet[0] = (byte)flags; in setPath() 395 packet[1] = (byte)0x00; in setPath() 397 System.arraycopy(head, 0, packet, 2, head.length); in setPath() 401 sendRequest(ObexHelper.OBEX_OPCODE_SETPATH, packet, returnHeaderSet, null, false); in setPath()
|
/frameworks/base/media/jni/ |
D | android_mtp_MtpDatabase.cpp | 137 MtpDataPacket& packet); 141 MtpDataPacket& packet); 144 MtpDataPacket& packet); 147 MtpDataPacket& packet); 154 MtpDataPacket& packet); 368 MtpDataPacket& packet) { in getObjectPropertyValue() argument 407 packet.putString(date); in getObjectPropertyValue() 414 packet.putString(date); in getObjectPropertyValue() 420 packet.putInt8(longValue); in getObjectPropertyValue() 423 packet.putUInt8(longValue); in getObjectPropertyValue() [all …]
|
/frameworks/base/tools/preload2/src/com/android/preload/classdataretrieval/jdwp/ |
D | JDWPClassDataRetriever.java | 83 CommandPacket packet = new CommandPacket( in retrieveImpl() local 86 ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet); in retrieveImpl() 93 CommandPacket packet = new CommandPacket( in retrieveImpl() local 96 ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet); in retrieveImpl() 152 CommandPacket packet = new CommandPacket( in retrieveImpl() local 155 /* ReplyPacket reply = */ debuggeeWrapper.vmMirror.performCommand(packet); in retrieveImpl() 161 CommandPacket packet = new CommandPacket( in checkClass() local 164 packet.setNextValueAsReferenceTypeID(typeID); in checkClass() 165 ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet); in checkClass() 182 CommandPacket packet = new CommandPacket( in checkArrayClass() local [all …]
|
/frameworks/base/services/net/java/android/net/apf/ |
D | ApfFilter.java | 453 Ra(byte[] packet, int length) { in Ra() argument 454 mPacket = ByteBuffer.wrap(Arrays.copyOf(packet, length)); in Ra() 535 mMinLifetime = minLifetime(packet, length); in Ra() 540 boolean matches(byte[] packet, int length) { in matches() argument 545 if (packet[i] != referencePacket[i]) return false; in matches() 553 long minLifetime(byte[] packet, int length) { in minLifetime() argument 556 ByteBuffer byteBuffer = ByteBuffer.wrap(packet); in minLifetime() 950 private void hexDump(String msg, byte[] packet, int length) { in hexDump() argument 951 log(msg + HexDump.toHexString(packet, 0, length, false /* lowercase */)); in hexDump() 971 private synchronized ProcessRaResult processRa(byte[] packet, int length) { in processRa() argument [all …]
|
/frameworks/base/core/java/android/nfc/cardemulation/ |
D | HostNfcFService.java | 182 byte[] packet = dataBundle.getByteArray(KEY_DATA); in handleMessage() 183 if (packet != null) { in handleMessage() 184 byte[] responsePacket = processNfcFPacket(packet, null); in handleMessage()
|
/frameworks/base/services/tests/servicestests/jni/ |
D | apf_jni.cpp | 31 JNIEnv* env, jclass, jbyteArray program, jbyteArray packet, jint filter_age) { in com_android_server_ApfTest_apfSimulate() argument 35 (uint8_t*)env->GetByteArrayElements(packet, NULL), in com_android_server_ApfTest_apfSimulate() 36 env->GetArrayLength(packet), in com_android_server_ApfTest_apfSimulate()
|
/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | KeepaliveTracker.java | 102 KeepalivePacketData packet, int interval) { in KeepaliveInfo() argument 109 mPacket = packet; in KeepaliveInfo() 348 KeepalivePacketData packet; in startNattKeepalive() local 350 packet = KeepalivePacketData.nattKeepalivePacket( in startNattKeepalive() 356 KeepaliveInfo ki = new KeepaliveInfo(messenger, binder, nai, packet, intervalSeconds); in startNattKeepalive()
|
/frameworks/av/media/libstagefright/ |
D | OggExtractor.cpp | 271 MediaBuffer *packet; in read() local 272 status_t err = mExtractor->mImpl->readNextPacket(&packet); in read() 280 if (packet->meta_data()->findInt64(kKeyTime, &timeUs)) { in read() 287 packet->meta_data()->setInt32(kKeyIsSyncFrame, 1); in read() 289 *out = packet; in read() 818 MediaBuffer *packet; in init() local 821 if ((err = _readNextPacket(&packet, /* calcVorbisTimestamp = */ false)) != OK) { in init() 824 ALOGV("read packet of size %zu\n", packet->range_length()); in init() 825 err = verifyHeader(packet, /* type = */ i * 2 + 1); in init() 826 packet->release(); in init() [all …]
|
/frameworks/av/media/libstagefright/wifi-display/rtp/ |
D | RTPSender.cpp | 209 const sp<ABuffer> &packet, uint8_t packetType) { in queueRawPacket() argument 210 CHECK_LE(packet->size(), kMaxUDPPacketSize - 12); in queueRawPacket() 213 CHECK(packet->meta()->findInt64("timeUs", &timeUs)); in queueRawPacket() 215 sp<ABuffer> udpPacket = new ABuffer(12 + packet->size()); in queueRawPacket() 239 memcpy(&rtp[12], packet->data(), packet->size()); in queueRawPacket()
|