Searched refs:packet (Results 1 - 25 of 34) sorted by relevance

12

/frameworks/base/tests/net/java/android/net/util/
H A DConnectivityPacketSummaryTest.java43 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...]
H A DIpUtilsTest.java54 // 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/av/media/mtp/
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 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;
74 if (!packet.getUInt16(mFunctionalMode)) return false;
75 mOperations = packet.getAUInt16();
77 mEvents = packet.getAUInt16();
79 mDeviceProperties = packet.getAUInt16();
81 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;
62 if (!packet.getString(string)) return false;
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...]
H A DMtpProperty.h87 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 DMtpStringBuffer.h49 bool readFromPacket(MtpDataPacket* packet);
50 void writeToPacket(MtpDataPacket* packet) const;
H A DMtpDeviceInfo.h47 bool read(MtpDataPacket& packet);
H A DMtpStorageInfo.h42 bool read(MtpDataPacket& packet);
H A DMtpDatabase.h65 MtpDataPacket& packet) = 0;
69 MtpDataPacket& packet) = 0;
72 MtpDataPacket& packet) = 0;
75 MtpDataPacket& packet) = 0;
82 MtpDataPacket& packet) = 0;
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 DMtpObjectInfo.h53 bool read(MtpDataPacket& packet);
/frameworks/base/tests/net/java/android/net/apf/
H A DApfTest.java86 // Interpreter will just accept packets without link layer headers, so pad fake packet to at
87 // least the minimum packet size.
105 private void assertVerdict(int expected, byte[] program, byte[] packet, int filterAge) { argument
106 assertReturnCodesEqual(expected, apfSimulate(program, packet, filterAge));
109 private void assertVerdict(int expected, byte[] program, byte[] packet) { argument
110 assertReturnCodesEqual(expected, apfSimulate(program, packet, 0));
113 private void assertPass(byte[] program, byte[] packet, int filterAge) { argument
114 assertVerdict(PASS, program, packet, filterAge);
117 private void assertPass(byte[] program, byte[] packet) { argument
118 assertVerdict(PASS, program, packet);
121 assertDrop(byte[] program, byte[] packet, int filterAge) argument
125 assertDrop(byte[] program, byte[] packet) argument
129 assertVerdict(int expected, ApfGenerator gen, byte[] packet, int filterAge) argument
134 assertPass(ApfGenerator gen, byte[] packet, int filterAge) argument
139 assertDrop(ApfGenerator gen, byte[] packet, int filterAge) argument
618 pretendPacketReceived(byte[] packet) argument
981 verifyRaLifetime(byte[] program, ByteBuffer packet, int lifetime) argument
1009 testRaLifetime(TestApfFilter apfFilter, MockIpManagerCallback ipManagerCallback, ByteBuffer packet, int lifetime) argument
1047 assertInvalidRa(TestApfFilter apfFilter, MockIpManagerCallback ipManagerCallback, ByteBuffer packet) argument
1220 apfSimulate(byte[] program, byte[] packet, int filter_age) argument
[all...]
/frameworks/base/tests/net/java/android/net/dhcp/
H A DDhcpPacketTest.java125 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
537 checkMtu(ByteBuffer packet, int expectedMtu, byte[] mtuBytes) argument
[all...]
/frameworks/base/services/net/java/android/net/dhcp/
H A DDhcpPacket.java56 * Minimum length of a DHCP packet, excluding options, in the above encapsulations.
127 * The maximum length of a packet that can be constructed.
132 * The magic cookie that identifies this as a DHCP packet instead of BOOTP.
297 * Asks the packet object to create a ByteBuffer serialization of
298 * the packet for transmission.
304 * Allows the concrete class to fill in packet-type-specific details,
305 * typically optional parameters at the end of the packet.
352 * Creates a new L3 packet (including IP header) containing the
353 * DHCP udp packet. This method relies upon the delegated method
354 * finishPacket() to insert the per-packet content
670 readIpAddress(ByteBuffer packet) argument
733 decodeFullPacket(ByteBuffer packet, int pktType) argument
1099 decodeFullPacket(byte[] packet, int length, int pktType) argument
[all...]
H A DDhcpClient.java172 // - We use a packet socket to receive, because servers send us packets bound for IP addresses
250 // Used to schedule packet retransmissions.
300 Log.e(TAG, "Error creating packet socket", e);
363 DhcpPacket packet = null;
364 packet = DhcpPacket.decodeFullPacket(mPacket, length, DhcpPacket.ENCAP_L2);
365 if (DBG) Log.d(TAG, "Received packet: " + packet);
366 sendMessage(CMD_RECEIVED_PACKET, packet);
373 Log.e(TAG, "Can't parse packet: " + e.getMessage());
407 // the packet socke
646 isValidPacket(DhcpPacket packet) argument
662 setDhcpLeaseExpiry(DhcpPacket packet) argument
719 receivePacket(DhcpPacket packet) argument
767 receivePacket(DhcpPacket packet) argument
795 receivePacket(DhcpPacket packet) argument
939 receivePacket(DhcpPacket packet) argument
[all...]
/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/tools/preload2/src/com/android/preload/classdataretrieval/jdwp/
H A DJDWPClassDataRetriever.java83 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/media/jni/
H A Dandroid_mtp_MtpDatabase.cpp138 MtpDataPacket& packet);
142 MtpDataPacket& packet);
145 MtpDataPacket& packet);
148 MtpDataPacket& packet);
155 MtpDataPacket& packet);
369 MtpDataPacket& packet) {
408 packet.putString(date);
415 packet.putString(date);
421 packet.putInt8(longValue);
424 packet
367 getObjectPropertyValue(MtpObjectHandle handle, MtpObjectProperty property, MtpDataPacket& packet) argument
488 readLongValue(int type, MtpDataPacket& packet, jlong& longValue) argument
545 setObjectPropertyValue(MtpObjectHandle handle, MtpObjectProperty property, MtpDataPacket& packet) argument
576 getDevicePropertyValue(MtpDeviceProperty property, MtpDataPacket& packet) argument
649 setDevicePropertyValue(MtpDeviceProperty property, MtpDataPacket& packet) argument
683 getObjectPropertyList(MtpObjectHandle handle, uint32_t format, uint32_t property, int groupCode, int depth, MtpDataPacket& packet) argument
[all...]
/frameworks/base/core/java/android/nfc/cardemulation/
H A DHostNfcFService.java128 * 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 Dpvamrwbdecoder.h139 void mime_unsorting(uint8 packet[],
/frameworks/base/tests/net/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/net/java/android/net/apf/
H A DApfFilter.java62 * For networks that support packet filtering via APF programs, {@code ApfFilter}
81 // Enums describing the outcome of receiving an RA packet.
335 // List of binary ranges that include the whole packet except the lifetimes.
339 // Minimum lifetime in packet
341 // When the packet was last captured, in seconds since Unix Epoch
344 // For debugging only. Offsets into the packet where PIOs are.
347 // For debugging only. Offsets into the packet where RDNSS options are.
353 // For debugging only. Returns the hex representation of the last matching packet.
360 // position pos in the packet.
422 * Add a binary range of the packet tha
449 Ra(byte[] packet, int length) argument
540 matches(byte[] packet, int length) argument
553 minLifetime(byte[] packet, int length) argument
996 hexDump(String msg, byte[] packet, int length) argument
1018 processRa(byte[] packet, int length) 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
832 MediaBuffer *packet; local
[all...]

Completed in 3525 milliseconds

12