Searched defs:packet (Results 1 - 19 of 19) sorted by relevance

/frameworks/av/media/mtp/
H A DMtpDeviceInfo.cpp62 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 DMtpStorageInfo.cpp48 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 DMtpObjectInfo.cpp58 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 DMtpStringBuffer.cpp126 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 DMtpProperty.cpp126 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...]
/frameworks/base/services/tests/servicestests/jni/
H A Dapf_jni.cpp31 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/core/java/com/android/server/connectivity/
H A DKeepaliveTracker.java54 * Manages packet keepalive requests.
77 * Tracks information about a packet keepalive.
102 KeepalivePacketData packet, int interval) {
109 mPacket = packet;
348 KeepalivePacketData packet;
350 packet = KeepalivePacketData.nattKeepalivePacket(
356 KeepaliveInfo ki = new KeepaliveInfo(messenger, binder, nai, packet, intervalSeconds);
101 KeepaliveInfo(Messenger messenger, IBinder binder, NetworkAgentInfo nai, KeepalivePacketData packet, int interval) argument
/frameworks/av/media/libstagefright/mpeg2ts/
H A DMPEG2TSExtractor.cpp257 uint8_t packet[kTSPacketSize]; local
258 ssize_t n = mDataSource->readAt(mOffset, packet, kTSPacketSize);
269 status_t err = mParser->feedTSPacket(packet, kTSPacketSize, &event);
/frameworks/base/obex/javax/obex/
H A DServerOperation.java50 * 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/services/tests/servicestests/src/android/net/dhcp/
H A DDhcpPacketTest.java127 ByteBuffer packet = new TestDhcpPacket(DHCP_MESSAGE_TYPE_OFFER)
131 DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP);
172 ByteBuffer packet = testPacket.build();
177 offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP);
178 fail("Invalid packet parsed successfully: " + offerPacket);
184 offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP);
225 ByteBuffer packet = new TestDhcpPacket(type, clientIp, yourIp)
228 DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP);
247 // A packet without any addresses is not valid.
288 final ByteBuffer packet
360 checkMtu(ByteBuffer packet, int expectedMtu, byte[] mtuBytes) argument
[all...]
/frameworks/av/media/libstagefright/wifi-display/rtp/
H A DRTPSender.cpp209 const sp<ABuffer> &packet, uint8_t packetType) {
210 CHECK_LE(packet->size(), kMaxUDPPacketSize - 12);
213 CHECK(packet->meta()->findInt64("timeUs", &timeUs));
215 sp<ABuffer> udpPacket = new ABuffer(12 + packet->size());
239 memcpy(&rtp[12], packet->data(), packet->size());
338 // We haven't emitted anything into the current packet yet and
339 // this NAL unit fits into a single-NAL-unit-packet while
340 // it wouldn't have fit as part of a STAP-A packet.
375 // This single NAL unit does not fit into a single RTP packet,
208 queueRawPacket( const sp<ABuffer> &packet, uint8_t packetType) argument
[all...]
/frameworks/base/services/tests/servicestests/src/android/net/apf/
H A DApfTest.java69 // Interpreter will just accept packets without link layer headers, so pad fake packet to at
70 // least the minimum packet size.
73 private void assertVerdict(int expected, byte[] program, byte[] packet, int filterAge) { argument
74 assertEquals(expected, apfSimulate(program, packet, filterAge));
77 private void assertPass(byte[] program, byte[] packet, int filterAge) { argument
78 assertVerdict(PASS, program, packet, filterAge);
81 private void assertDrop(byte[] program, byte[] packet, int filterAge) { argument
82 assertVerdict(DROP, program, packet, filterAge);
85 private void assertVerdict(int expected, ApfGenerator gen, byte[] packet, int filterAge) argument
87 assertEquals(expected, apfSimulate(gen.generate(), packet, filterAg
90 assertPass(ApfGenerator gen, byte[] packet, int filterAge) argument
95 assertDrop(ApfGenerator gen, byte[] packet, int filterAge) argument
572 pretendPacketReceived(byte[] packet) argument
835 verifyRaLifetime(MockIpManagerCallback ipManagerCallback, ByteBuffer packet, int lifetime) argument
860 testRaLifetime(TestApfFilter apfFilter, MockIpManagerCallback ipManagerCallback, ByteBuffer packet, int lifetime) argument
870 assertInvalidRa(TestApfFilter apfFilter, MockIpManagerCallback ipManagerCallback, ByteBuffer packet) argument
986 apfSimulate(byte[] program, byte[] packet, int filter_age) argument
[all...]
/frameworks/av/media/libstagefright/foundation/
H A DANetworkSession.cpp370 sp<ABuffer> packet = new ABuffer(packetSize); local
371 memcpy(packet->data(), mInBuffer.c_str() + 2, packetSize);
374 packet->meta()->setInt64("arrivalTimeUs", nowUs);
379 notify->setBuffer("data", packet);
494 sp<ABuffer> packet = new ABuffer(payloadLen); local
495 memcpy(packet->data(), &data[offset], payloadLen);
499 packet->data()[i] =
508 notify->setBuffer("data", packet);
/frameworks/base/libs/common_time/
H A Dcommon_time_server.cpp361 // may have RXed a packet at the same time as a config change telling us
635 mBadPktLog.log("Failed to parse %d byte packet from %s.%s",
670 "unknown packet type (%d) from %s",
970 // if the RTT of the packet is significantly larger than the panic
972 // than to take cues from a packet like that.
1002 const MasterAnnouncementPacket* packet,
1004 uint64_t newDeviceID = packet->deviceID;
1005 uint8_t newDevicePrio = packet->devicePriority;
1006 uint64_t newTimelineID = packet->timelineID;
1274 // single time sync packet, the
1001 handleMasterAnnouncement( const MasterAnnouncementPacket* packet, const sockaddr_storage& srcAddr) argument
[all...]
/frameworks/base/media/jni/
H A Dandroid_mtp_MtpDatabase.cpp137 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/services/net/java/android/net/apf/
H A DApfFilter.java54 * For networks that support packet filtering via APF programs, {@code ApfFilter}
252 // List of binary ranges that include the whole packet except the lifetimes.
256 // Minimum lifetime in packet
258 // When the packet was last captured, in seconds since Unix Epoch
261 // For debugging only. Offsets into the packet where PIOs are.
264 // For debugging only. Offsets into the packet where RDNSS options are.
270 // For debugging only. Returns the hex representation of the last matching packet.
277 // position pos in the packet.
351 * Add a binary range of the packet that does not include a lifetime to mNonLifetimes.
352 * Assumes mPacket.position() is as far as we've parsed the packet
373 Ra(byte[] packet, int length) argument
434 matches(byte[] packet, int length) argument
447 minLifetime(byte[] packet, int length) argument
813 hexDump(String msg, byte[] packet, int length) argument
829 processRa(byte[] packet, int length) argument
[all...]
/frameworks/base/services/net/java/android/net/dhcp/
H A DDhcpClient.java168 // - We use a packet socket to receive, because servers send us packets bound for IP addresses
242 // Used to schedule packet retransmissions.
292 Log.e(TAG, "Error creating packet socket", e);
352 DhcpPacket packet = null;
353 packet = DhcpPacket.decodeFullPacket(mPacket, length, DhcpPacket.ENCAP_L2);
354 if (DBG) Log.d(TAG, "Received packet: " + packet);
355 sendMessage(CMD_RECEIVED_PACKET, packet);
362 Log.e(TAG, "Can't parse packet: " + e.getMessage());
389 // the packet socke
615 isValidPacket(DhcpPacket packet) argument
631 setDhcpLeaseExpiry(DhcpPacket packet) argument
686 receivePacket(DhcpPacket packet) argument
733 receivePacket(DhcpPacket packet) argument
761 receivePacket(DhcpPacket packet) argument
895 receivePacket(DhcpPacket packet) argument
[all...]
H A DDhcpPacket.java53 * Minimum length of a DHCP packet, excluding options, in the above encapsulations.
124 * The maximum length of a packet that can be constructed.
129 * The magic cookie that identifies this as a DHCP packet instead of BOOTP.
294 * Asks the packet object to create a ByteBuffer serialization of
295 * the packet for transmission.
301 * Allows the concrete class to fill in packet-type-specific details,
302 * typically optional parameters at the end of the packet.
349 * Creates a new L3 packet (including IP header) containing the
350 * DHCP udp packet. This method relies upon the delegated method
351 * finishPacket() to insert the per-packet content
666 readIpAddress(ByteBuffer packet) argument
728 decodeFullPacket(ByteBuffer packet, int pktType) argument
1090 decodeFullPacket(byte[] packet, int length, int pktType) argument
[all...]
/frameworks/av/media/libstagefright/
H A DOggExtractor.cpp146 // 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.
606 // first packet i
818 MediaBuffer *packet; local
[all...]

Completed in 5509 milliseconds