/frameworks/base/tests/net/java/android/net/util/ |
D | IpUtilsTest.java | 81 ByteBuffer packet = ByteBuffer.wrap(new byte[] { in testIpv6TcpChecksum() local 103 int transportLen = packet.limit() - IPV6_HEADER_LENGTH; in testIpv6TcpChecksum() 104 assertEquals(0, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum() 108 int sum = getUnsignedByte(packet, sumOffset) * 256 + getUnsignedByte(packet, sumOffset + 1); in testIpv6TcpChecksum() 111 packet.put(sumOffset, (byte) 0); in testIpv6TcpChecksum() 112 packet.put(sumOffset + 1, (byte) 0); in testIpv6TcpChecksum() 113 assertChecksumEquals(sum, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum() 116 packet.putShort( in testIpv6TcpChecksum() 118 IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); in testIpv6TcpChecksum() 119 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 | 130 bool MtpProperty::read(MtpDataPacket& packet) { in read() argument 133 if (!packet.getUInt16(mCode)) return false; in read() 135 if (!packet.getUInt16(mType)) return false; in read() 136 if (!packet.getUInt8(temp8)) return false; in read() 149 mDefaultArrayValues = readArrayValues(packet, mDefaultArrayLength); in read() 152 mCurrentArrayValues = readArrayValues(packet, mCurrentArrayLength); in read() 157 if (!readValue(packet, mDefaultValue)) return false; in read() 159 if (!readValue(packet, mCurrentValue)) return false; in read() 163 if (!packet.getUInt32(mGroupCode)) return false; in read() 165 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() 74 if (!packet.getUInt16(mFunctionalMode)) return false; in read() 75 mOperations = packet.getAUInt16(); in read() 77 mEvents = packet.getAUInt16(); in read() 79 mDeviceProperties = packet.getAUInt16(); in read() 81 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() 62 if (!packet.getString(string)) return false; in read()
|
D | MtpStringBuffer.cpp | 66 bool MtpStringBuffer::readFromPacket(MtpDataPacket* packet) { in readFromPacket() argument 68 if (!packet->getUInt8(count)) in readFromPacket() 76 if (!packet->getUInt16(ch)) in readFromPacket() 88 void MtpStringBuffer::writeToPacket(MtpDataPacket* packet) const { in writeToPacket() 93 packet->putUInt8(0); in writeToPacket() 96 packet->putUInt8(std::min(count + 1, MTP_STRING_MAX_CHARACTER_NUMBER)); in writeToPacket() 105 packet->putUInt16(c); in writeToPacket() 109 packet->putUInt16(0); in writeToPacket()
|
D | MtpProperty.h | 89 bool read(MtpDataPacket& packet); 90 void write(MtpDataPacket& packet); 94 void setCurrentValue(MtpDataPacket& packet); 109 bool readValue(MtpDataPacket& packet, MtpPropertyValue& value); 110 void writeValue(MtpDataPacket& packet, MtpPropertyValue& value); 111 MtpPropertyValue* readArrayValues(MtpDataPacket& packet, uint32_t& length); 112 void writeArrayValues(MtpDataPacket& packet,
|
D | IMtpDatabase.h | 65 MtpDataPacket& packet) = 0; 69 MtpDataPacket& packet) = 0; 72 MtpDataPacket& packet) = 0; 75 MtpDataPacket& packet) = 0; 82 MtpDataPacket& packet) = 0;
|
D | MtpStringBuffer.h | 51 bool readFromPacket(MtpDataPacket* packet); 52 void writeToPacket(MtpDataPacket* packet) const;
|
D | MtpStorageInfo.h | 42 bool read(MtpDataPacket& packet);
|
/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() 238 private boolean handleObexPacket(ObexPacket packet) throws IOException { in handleObexPacket() argument 239 byte[] body = updateRequestHeaders(packet); in handleObexPacket() 284 private byte[] updateRequestHeaders(ObexPacket packet) throws IOException { in updateRequestHeaders() argument 286 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 | 140 MtpDataPacket& packet); 144 MtpDataPacket& packet); 147 MtpDataPacket& packet); 150 MtpDataPacket& packet); 157 MtpDataPacket& packet); 384 MtpDataPacket& packet) { in getObjectPropertyValue() argument 420 packet.putInt8(longValue); in getObjectPropertyValue() 423 packet.putUInt8(longValue); in getObjectPropertyValue() 426 packet.putInt16(longValue); in getObjectPropertyValue() 429 packet.putUInt16(longValue); in getObjectPropertyValue() [all …]
|
/frameworks/base/tests/net/java/android/net/ |
D | DnsPacketTest.java | 99 TestDnsPacket packet = new TestDnsPacket(v4blob); in testV4Answer() local 102 assertHeaderParses(packet.getHeader(), 0x5566, 0x8180, 1, 1, 0, 0); in testV4Answer() 106 packet.getRecordList(DnsPacket.QDSECTION); in testV4Answer() 111 packet.getRecordList(DnsPacket.ANSECTION); in testV4Answer() 141 TestDnsPacket packet = new TestDnsPacket(v6blob); in testV6Answer() local 144 assertHeaderParses(packet.getHeader(), 0x7722, 0x8180, 1, 1, 0, 0); in testV6Answer() 148 packet.getRecordList(DnsPacket.QDSECTION); in testV6Answer() 153 packet.getRecordList(DnsPacket.ANSECTION); in testV6Answer()
|
D | TcpKeepalivePacketDataTest.java | 84 final byte[] packet = resultData.getPacket(); in testV4TcpKeepalivePacket() 86 assertEquals(packet[0], 0x45); in testV4TcpKeepalivePacket() 88 assertEquals(packet[1], tos); in testV4TcpKeepalivePacket() 90 assertEquals(packet[8], ttl); in testV4TcpKeepalivePacket() 93 ByteBuffer buf = ByteBuffer.wrap(packet, 12, 4); in testV4TcpKeepalivePacket() 97 buf = ByteBuffer.wrap(packet, 16, 4); in testV4TcpKeepalivePacket() 101 buf = ByteBuffer.wrap(packet, 20, 12); in testV4TcpKeepalivePacket() 111 buf = ByteBuffer.wrap(packet, 34, 2); in testV4TcpKeepalivePacket()
|
/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/lowpan/java/android/net/lowpan/ |
D | LowpanCommissioningSession.java | 53 public void onReceiveFromCommissioner(@NonNull byte[] packet) {}; in onReceiveFromCommissioner() argument 73 public void onReceiveFromCommissioner(byte[] packet) { in onReceiveFromCommissioner() argument 78 mCallback.onReceiveFromCommissioner(packet); in onReceiveFromCommissioner() 165 public void sendToCommissioner(@NonNull byte[] packet) { in sendToCommissioner() argument 168 mBinder.sendToCommissioner(packet); in sendToCommissioner()
|
/frameworks/ml/nn/common/ |
D | ExecutionBurstServer.cpp | 316 const auto packet = getPacketBlocking(); in getBlocking() local 317 if (!packet) { in getBlocking() 321 return deserialize(*packet); in getBlocking() 370 std::vector<FmqRequestDatum> packet(count + 1); in getPacketBlocking() local 371 std::memcpy(&packet.front(), &datum, sizeof(datum)); in getPacketBlocking() 372 success &= mFmqRequestChannel->read(packet.data() + 1, count); in getPacketBlocking() 385 return std::make_optional(std::move(packet)); in getPacketBlocking() 412 bool ResultChannelSender::sendPacket(const std::vector<FmqResultDatum>& packet) { in sendPacket() argument 413 if (packet.size() > mFmqResultChannel->availableToWrite()) { in sendPacket() 426 return mFmqResultChannel->writeBlocking(packet.data(), packet.size()); in sendPacket() [all …]
|
D | ExecutionBurstController.cpp | 240 const auto packet = getPacketBlocking(); in getBlocking() local 241 if (!packet) { in getBlocking() 245 return deserialize(*packet); in getBlocking() 292 std::vector<FmqResultDatum> packet(count + 1); in getPacketBlocking() local 293 std::memcpy(&packet.front(), &datum, sizeof(datum)); in getPacketBlocking() 294 success &= mFmqResultChannel->read(packet.data() + 1, count); in getPacketBlocking() 306 return std::make_optional(std::move(packet)); in getPacketBlocking() 333 bool RequestChannelSender::sendPacket(const std::vector<FmqRequestDatum>& packet) { in sendPacket() argument 338 if (packet.size() > mFmqRequestChannel->availableToWrite()) { in sendPacket() 345 return mFmqRequestChannel->writeBlocking(packet.data(), packet.size()); in sendPacket() [all …]
|
/frameworks/base/core/java/android/nfc/cardemulation/ |
D | HostNfcFService.java | 184 byte[] packet = dataBundle.getByteArray(KEY_DATA); in handleMessage() 185 if (packet != null) { in handleMessage() 186 byte[] responsePacket = processNfcFPacket(packet, null); in handleMessage()
|
/frameworks/opt/net/ike/src/java/com/android/ike/ikev2/message/ |
D | IkeHeader.java | 123 public IkeHeader(byte[] packet) throws IkeException { in IkeHeader() argument 124 if (packet.length <= IKE_HEADER_LENGTH) { in IkeHeader() 128 ByteBuffer buffer = ByteBuffer.wrap(packet); in IkeHeader()
|
D | IkeMessage.java | 147 byte[] packet) in decode() argument 149 return sIkeMessageHelper.decode(ikeSessionOptions, ikeSaRecord, ikeHeader, packet); in decode() 297 IkeMessage decode(IkeHeader ikeHeader, byte[] packet) throws IkeException; in decode() argument 313 byte[] packet) in decode() argument 385 byte[] packet) in decode() argument
|
/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | KeepaliveTracker.java | 158 @NonNull KeepalivePacketData packet, in KeepaliveInfo() argument 168 mPacket = packet; in KeepaliveInfo() 618 KeepalivePacketData packet; in startNattKeepalive() local 620 packet = NattKeepalivePacketData.nattKeepalivePacket( in startNattKeepalive() 628 ki = new KeepaliveInfo(cb, nai, packet, intervalSeconds, in startNattKeepalive() 659 final TcpKeepalivePacketData packet; in startTcpKeepalive() local 661 packet = TcpKeepaliveController.getTcpKeepalivePacket(fd); in startTcpKeepalive() 668 ki = new KeepaliveInfo(cb, nai, packet, intervalSeconds, in startTcpKeepalive()
|
/frameworks/av/media/extractors/ogg/ |
D | OggExtractor.cpp | 280 MediaBufferHelper *packet; in read() local 281 media_status_t err = mExtractor->mImpl->readNextPacket(&packet); in read() 287 AMediaFormat *meta = packet->meta_data(); in read() 299 *out = packet; in read() 300 ALOGV("returning buffer %p", packet); in read() 927 MediaBufferHelper *packet; in init() local 930 if ((err = _readNextPacket(&packet, /* calcVorbisTimestamp = */ false)) != AMEDIA_OK) { in init() 933 ALOGV("read packet of size %zu\n", packet->range_length()); in init() 934 err = verifyHeader(packet, /* type = */ i * 2 + 1); in init() 935 packet->release(); in init() [all …]
|
/frameworks/base/services/net/java/android/net/ |
D | TcpKeepalivePacketData.java | 83 final byte[] packet; in tcpKeepalivePacket() 88 packet = buildV4Packet(tcpDetails); in tcpKeepalivePacket() 93 return new TcpKeepalivePacketData(tcpDetails, packet); in tcpKeepalivePacket()
|