/frameworks/base/services/tests/servicestests/src/android/net/util/ |
H A D | ConnectivityPacketSummaryTest.java | 43 final String packet = 60 assertEquals(expected, getSummary(packet)); 64 final String packet = 81 assertEquals(expected, getSummary(packet)); 85 final String packet = 113 assertEquals(expected, getSummary(packet)); 117 final String packet = 135 assertEquals(expected, getSummary(packet)); 139 final String packet = 159 assertEquals(expected, getSummary(packet)); [all...] |
/frameworks/av/media/mtp/ |
H A D | MtpObjectInfo.cpp | 58 bool MtpObjectInfo::read(MtpDataPacket& packet) { argument 62 if (!packet.getUInt32(mStorageID)) return false; 63 if (!packet.getUInt16(mFormat)) return false; 64 if (!packet.getUInt16(mProtectionStatus)) return false; 65 if (!packet.getUInt32(mCompressedSize)) return false; 66 if (!packet.getUInt16(mThumbFormat)) return false; 67 if (!packet.getUInt32(mThumbCompressedSize)) return false; 68 if (!packet.getUInt32(mThumbPixWidth)) return false; 69 if (!packet.getUInt32(mThumbPixHeight)) return false; 70 if (!packet [all...] |
H A D | MtpStorageInfo.cpp | 48 bool MtpStorageInfo::read(MtpDataPacket& packet) { argument 52 if (!packet.getUInt16(mStorageType)) return false; 53 if (!packet.getUInt16(mFileSystemType)) return false; 54 if (!packet.getUInt16(mAccessCapability)) return false; 55 if (!packet.getUInt64(mMaxCapacity)) return false; 56 if (!packet.getUInt64(mFreeSpaceBytes)) return false; 57 if (!packet.getUInt32(mFreeSpaceObjects)) return false; 59 if (!packet.getString(string)) return false; 61 if (!packet.getString(string)) return false;
|
H A D | MtpDeviceInfo.cpp | 62 bool MtpDeviceInfo::read(MtpDataPacket& packet) { argument 66 if (!packet.getUInt16(mStandardVersion)) return false; 67 if (!packet.getUInt32(mVendorExtensionID)) return false; 68 if (!packet.getUInt16(mVendorExtensionVersion)) return false; 70 if (!packet.getString(string)) return false; 73 if (!packet.getUInt16(mFunctionalMode)) return false; 74 mOperations = packet.getAUInt16(); 76 mEvents = packet.getAUInt16(); 78 mDeviceProperties = packet.getAUInt16(); 80 mCaptureFormats = packet [all...] |
H A D | MtpProperty.cpp | 126 bool MtpProperty::read(MtpDataPacket& packet) { argument 129 if (!packet.getUInt16(mCode)) return false; 131 if (!packet.getUInt16(mType)) return false; 132 if (!packet.getUInt8(temp8)) return false; 145 mDefaultArrayValues = readArrayValues(packet, mDefaultArrayLength); 148 mCurrentArrayValues = readArrayValues(packet, mCurrentArrayLength); 153 if (!readValue(packet, mDefaultValue)) return false; 155 if (!readValue(packet, mCurrentValue)) return false; 159 if (!packet.getUInt32(mGroupCode)) return false; 161 if (!packet 178 write(MtpDataPacket& packet) argument 239 setCurrentValue(MtpDataPacket& packet) argument 429 readValue(MtpDataPacket& packet, MtpPropertyValue& value) argument 484 writeValue(MtpDataPacket& packet, MtpPropertyValue& value) argument 539 readArrayValues(MtpDataPacket& packet, uint32_t& length) argument 559 writeArrayValues(MtpDataPacket& packet, MtpPropertyValue* values, uint32_t length) argument [all...] |
H A 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,
|
H A D | MtpStringBuffer.h | 49 bool readFromPacket(MtpDataPacket* packet); 50 void writeToPacket(MtpDataPacket* packet) const;
|
H A D | MtpDeviceInfo.h | 47 bool read(MtpDataPacket& packet);
|
H A D | MtpStorageInfo.h | 42 bool read(MtpDataPacket& packet);
|
H A D | MtpDatabase.h | 65 MtpDataPacket& packet) = 0; 69 MtpDataPacket& packet) = 0; 72 MtpDataPacket& packet) = 0; 75 MtpDataPacket& packet) = 0; 82 MtpDataPacket& packet) = 0;
|
H A D | MtpStringBuffer.cpp | 126 bool MtpStringBuffer::readFromPacket(MtpDataPacket* packet) { argument 128 if (!packet->getUInt8(count)) 135 if (!packet->getUInt16(ch)) 154 void MtpStringBuffer::writeToPacket(MtpDataPacket* packet) const { 157 packet->putUInt8(count > 0 ? count + 1 : 0); 176 packet->putUInt16(ch); 180 packet->putUInt16(0);
|
H A D | MtpObjectInfo.h | 53 bool read(MtpDataPacket& packet);
|
/frameworks/base/services/tests/servicestests/src/android/net/ |
H A D | IpUtilsTest.java | 54 // out = " ByteBuffer packet = ByteBuffer.wrap(new byte[] {\n " 65 // packet = (scapy.IPv6(src="2001:db8::1", dst="2001:db8::2") / 68 // print JavaPacketDefinition(str(packet)) 72 // packet = (scapy.IPv6(src="2001:db8::1", dst="2001:db8::2", tc=0x80) / 77 ByteBuffer packet = ByteBuffer.wrap(new byte[] { 98 // Check that a valid packet has checksum 0. 99 int transportLen = packet.limit() - IPV6_HEADER_LENGTH; 100 assertEquals(0, IpUtils.tcpChecksum(packet, 0, IPV6_HEADER_LENGTH, transportLen)); 104 int sum = getUnsignedByte(packet, sumOffset) * 256 + getUnsignedByte(packet, sumOffse [all...] |
/frameworks/base/services/tests/servicestests/src/android/net/dhcp/ |
H A D | DhcpPacketTest.java | 125 ByteBuffer packet = new TestDhcpPacket(DHCP_MESSAGE_TYPE_OFFER) 129 DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP); 170 ByteBuffer packet = testPacket.build(); 175 offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP); 176 fail("Invalid packet parsed successfully: " + offerPacket); 182 offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP); 223 ByteBuffer packet = new TestDhcpPacket(type, clientIp, yourIp) 226 DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP); 245 // A packet without any addresses is not valid. 286 final ByteBuffer packet 535 checkMtu(ByteBuffer packet, int expectedMtu, byte[] mtuBytes) argument [all...] |
/frameworks/base/services/tests/servicestests/src/android/net/apf/ |
H A D | ApfTest.java | 83 // Interpreter will just accept packets without link layer headers, so pad fake packet to at 84 // least the minimum packet size. 102 private void assertVerdict(int expected, byte[] program, byte[] packet, int filterAge) { argument 103 assertReturnCodesEqual(expected, apfSimulate(program, packet, filterAge)); 106 private void assertVerdict(int expected, byte[] program, byte[] packet) { argument 107 assertReturnCodesEqual(expected, apfSimulate(program, packet, 0)); 110 private void assertPass(byte[] program, byte[] packet, int filterAge) { argument 111 assertVerdict(PASS, program, packet, filterAge); 114 private void assertPass(byte[] program, byte[] packet) { argument 115 assertVerdict(PASS, program, packet); 118 assertDrop(byte[] program, byte[] packet, int filterAge) argument 122 assertDrop(byte[] program, byte[] packet) argument 126 assertVerdict(int expected, ApfGenerator gen, byte[] packet, int filterAge) argument 131 assertPass(ApfGenerator gen, byte[] packet, int filterAge) argument 136 assertDrop(ApfGenerator gen, byte[] packet, int filterAge) argument 613 pretendPacketReceived(byte[] packet) argument 971 verifyRaLifetime(MockIpManagerCallback ipManagerCallback, ByteBuffer packet, int lifetime) argument 996 testRaLifetime(TestApfFilter apfFilter, MockIpManagerCallback ipManagerCallback, ByteBuffer packet, int lifetime) argument 1035 assertInvalidRa(TestApfFilter apfFilter, MockIpManagerCallback ipManagerCallback, ByteBuffer packet) argument 1163 apfSimulate(byte[] program, byte[] packet, int filter_age) argument [all...] |
/frameworks/base/services/net/java/android/net/dhcp/ |
H A D | DhcpPacket.java | 55 * Minimum length of a DHCP packet, excluding options, in the above encapsulations. 126 * The maximum length of a packet that can be constructed. 131 * The magic cookie that identifies this as a DHCP packet instead of BOOTP. 296 * Asks the packet object to create a ByteBuffer serialization of 297 * the packet for transmission. 303 * Allows the concrete class to fill in packet-type-specific details, 304 * typically optional parameters at the end of the packet. 351 * Creates a new L3 packet (including IP header) containing the 352 * DHCP udp packet. This method relies upon the delegated method 353 * finishPacket() to insert the per-packet content 668 readIpAddress(ByteBuffer packet) argument 731 decodeFullPacket(ByteBuffer packet, int pktType) argument 1097 decodeFullPacket(byte[] packet, int length, int pktType) argument [all...] |
H A D | DhcpClient.java | 170 // - We use a packet socket to receive, because servers send us packets bound for IP addresses 248 // Used to schedule packet retransmissions. 298 Log.e(TAG, "Error creating packet socket", e); 358 DhcpPacket packet = null; 359 packet = DhcpPacket.decodeFullPacket(mPacket, length, DhcpPacket.ENCAP_L2); 360 if (DBG) Log.d(TAG, "Received packet: " + packet); 361 sendMessage(CMD_RECEIVED_PACKET, packet); 368 Log.e(TAG, "Can't parse packet: " + e.getMessage()); 395 // the packet socke 634 isValidPacket(DhcpPacket packet) argument 650 setDhcpLeaseExpiry(DhcpPacket packet) argument 707 receivePacket(DhcpPacket packet) argument 755 receivePacket(DhcpPacket packet) argument 783 receivePacket(DhcpPacket packet) argument 927 receivePacket(DhcpPacket packet) argument [all...] |
/frameworks/base/media/jni/ |
H A D | android_mtp_MtpDatabase.cpp | 137 MtpDataPacket& packet); 141 MtpDataPacket& packet); 144 MtpDataPacket& packet); 147 MtpDataPacket& packet); 154 MtpDataPacket& packet); 368 MtpDataPacket& packet) { 407 packet.putString(date); 414 packet.putString(date); 420 packet.putInt8(longValue); 423 packet 366 getObjectPropertyValue(MtpObjectHandle handle, MtpObjectProperty property, MtpDataPacket& packet) argument 487 readLongValue(int type, MtpDataPacket& packet, jlong& longValue) argument 544 setObjectPropertyValue(MtpObjectHandle handle, MtpObjectProperty property, MtpDataPacket& packet) argument 575 getDevicePropertyValue(MtpDeviceProperty property, MtpDataPacket& packet) argument 648 setDevicePropertyValue(MtpDeviceProperty property, MtpDataPacket& packet) argument 682 getObjectPropertyList(MtpObjectHandle handle, uint32_t format, uint32_t property, int groupCode, int depth, MtpDataPacket& packet) argument [all...] |
/frameworks/base/obex/javax/obex/ |
H A D | ServerOperation.java | 50 * complete and requires an additional OBEX packet. 0x82 is a PUT request that 110 // a different OBEX packet than the SRMP header. 121 * @param maxSize the max packet size that the client will accept 141 ObexPacket packet; 180 packet = ObexPacket.read(request, mInput); 183 * Determine if the packet length is larger than this device can receive 185 if (packet.mLength > ObexHelper.getMaxRxPacketSize(mTransport)) { 188 + packet.mLength + " maxLength: " + ObexHelper.getMaxRxPacketSize(mTransport)); 194 if (packet.mLength > 3) { 195 if(!handleObexPacket(packet)) { 228 handleObexPacket(ObexPacket packet) argument 274 updateRequestHeaders(ObexPacket packet) argument [all...] |
/frameworks/base/tools/preload2/src/com/android/preload/classdataretrieval/jdwp/ |
H A D | JDWPClassDataRetriever.java | 83 CommandPacket packet = new CommandPacket( 86 ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet); 93 CommandPacket packet = new CommandPacket( 96 ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet); 152 CommandPacket packet = new CommandPacket( 155 /* ReplyPacket reply = */ debuggeeWrapper.vmMirror.performCommand(packet); 161 CommandPacket packet = new CommandPacket( 164 packet.setNextValueAsReferenceTypeID(typeID); 165 ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet); 182 CommandPacket packet [all...] |
/frameworks/base/core/java/android/nfc/cardemulation/ |
H A D | HostNfcFService.java | 128 * a NFC-F command packet has been received. 136 * a response packet back to the remote device. 182 byte[] packet = dataBundle.getByteArray(KEY_DATA); 183 if (packet != null) { 184 byte[] responsePacket = processNfcFPacket(packet, null); 235 * Sends a response packet back to the remote device. 238 * @param responsePacket A byte-array containing the response packet. 253 * <p>This method will be called when a NFC-F packet has been received 254 * from a remote device. A response packet can be provided directly 261 * If you cannot return a response packet immediatel [all...] |
/frameworks/av/media/libstagefright/codecs/amrwb/src/ |
H A D | pvamrwbdecoder.h | 139 void mime_unsorting(uint8 packet[],
|
/frameworks/base/services/tests/servicestests/jni/ |
H A D | apf_jni.cpp | 31 JNIEnv* env, jclass, jbyteArray program, jbyteArray packet, jint filter_age) { 35 (uint8_t*)env->GetByteArrayElements(packet, NULL), 36 env->GetArrayLength(packet), 138 // Run BPF filter to the next matching packet. 141 // Run APF filter to the next matching packet. 148 // Make sure both filters matched the same packet. 30 com_android_server_ApfTest_apfSimulate( JNIEnv* env, jclass, jbyteArray program, jbyteArray packet, jint filter_age) argument
|
/frameworks/base/services/net/java/android/net/apf/ |
H A D | ApfFilter.java | 62 * For networks that support packet filtering via APF programs, {@code ApfFilter} 81 // Enums describing the outcome of receiving an RA packet. 327 // List of binary ranges that include the whole packet except the lifetimes. 331 // Minimum lifetime in packet 333 // When the packet was last captured, in seconds since Unix Epoch 336 // For debugging only. Offsets into the packet where PIOs are. 339 // For debugging only. Offsets into the packet where RDNSS options are. 345 // For debugging only. Returns the hex representation of the last matching packet. 352 // position pos in the packet. 414 * Add a binary range of the packet tha 441 Ra(byte[] packet, int length) argument 528 matches(byte[] packet, int length) argument 541 minLifetime(byte[] packet, int length) argument 961 hexDump(String msg, byte[] packet, int length) argument 982 processRa(byte[] packet, int length) argument [all...] |
/frameworks/av/media/libstagefright/ |
H A D | OggExtractor.cpp | 146 // Read the next ogg packet from the underlying data source; optionally 147 // calculate the timestamp for the output packet whilst pretending 271 MediaBuffer *packet; local 272 status_t err = mExtractor->mImpl->readNextPacket(&packet); 280 if (packet->meta_data()->findInt64(kKeyTime, &timeUs)) { 287 packet->meta_data()->setInt32(kKeyIsSyncFrame, 1); 289 *out = packet; 489 // XXX what if new page continues packet from last??? 570 // the first time before we attempt to read a packet from the first page. 610 // first packet i 836 MediaBuffer *packet; local [all...] |