Home
last modified time | relevance | path

Searched refs:ByteBuffer (Results 1 – 25 of 366) sorted by relevance

12345678910>>...15

/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/crypto/
DTlsSessionTest.java39 import java.nio.ByteBuffer;
75 static final ByteBuffer EMPTY_APPLICATION_BUFFER =
76 ByteBuffer.allocate(APPLICATION_BUFFER_SIZE_TLS_MESSAGE);
77 static final ByteBuffer EMPTY_PACKET_BUFFER =
78 ByteBuffer.allocate(PACKET_BUFFER_SIZE_TLS_MESSAGE);
79 static final ByteBuffer APPLICATION_BUFFER_POSITION_RESET =
80 (ByteBuffer)
81 ByteBuffer.allocate(APPLICATION_BUFFER_SIZE_TLS_MESSAGE)
84 static final ByteBuffer PACKET_BUFFER_POSITION_RESET =
85 (ByteBuffer)
[all …]
/packages/modules/IPsec/tests/cts/src/android/ipsec/ike/cts/
DPacketUtils.java25 import java.nio.ByteBuffer;
71 void addPacketBytes(IpHeader header, ByteBuffer resultBuffer) throws Exception; in addPacketBytes()
105 ByteBuffer resultBuffer = buildHeader(); in getPacketBytes()
111 public ByteBuffer buildHeader() { in buildHeader()
112 ByteBuffer bb = ByteBuffer.allocate(DATA_BUFFER_LEN); in buildHeader()
147 private short calculateChecksum(ByteBuffer bb) { in calculateChecksum()
152 ShortBuffer shortBuffer = ByteBuffer.wrap(getByteArrayFromBuffer(bb)).asShortBuffer(); in calculateChecksum()
174 ByteBuffer bb = ByteBuffer.allocate(DATA_BUFFER_LEN); in getPacketBytes()
220 ByteBuffer bb = ByteBuffer.allocate(DATA_BUFFER_LEN); in getPacketBytes()
226 public void addPacketBytes(IpHeader header, ByteBuffer resultBuffer) { in addPacketBytes()
[all …]
/packages/modules/IPsec/src/java/com/android/internal/net/eap/message/simaka/
DEapSimAkaAttribute.java27 import java.nio.ByteBuffer;
134 public abstract void encode(ByteBuffer byteBuffer); in encode()
154 int attributeType, int lengthInBytes, ByteBuffer buffer) in EapSimAkaReservedBytesAttribute()
187 public void encode(ByteBuffer buffer) { in encode()
194 protected void encodeAttributeHeader(ByteBuffer byteBuffer) { in encodeAttributeHeader()
199 void consumePadding(int bytesUsed, ByteBuffer byteBuffer) { in consumePadding()
204 void addPadding(int bytesUsed, ByteBuffer byteBuffer) { in addPadding()
221 ByteBuffer byteBuffer) throws EapSimAkaInvalidAttributeException { in EapSimAkaUnsupportedAttribute()
238 public void encode(ByteBuffer byteBuffer) { in encode()
252 public AtVersionList(int lengthInBytes, ByteBuffer byteBuffer) in AtVersionList()
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/
DVenueUrlElementTest.java33 import java.nio.ByteBuffer;
97 assertTrue(VenueUrlElement.parse(ByteBuffer.allocate(0)).getVenueUrls().isEmpty()); in parseEmptyBuffer()
108 ByteBuffer buffer = ByteBuffer.wrap(getTestData(urlList)); in parseTruncatedBuffer()
119 ByteBuffer buffer = ByteBuffer.wrap(getTestData(1, new String())); in parseBufferWithEmptyVenueUrl()
128 ByteBuffer buffer = ByteBuffer.wrap(getTestData(1, TEST_VENUE_URL_INVALID)); in parseBufferWithInvalidVenueUrl()
145 VenueUrlElement.parse(ByteBuffer.wrap(stream.toByteArray())); in parseBufferWithInvalidLength()
154 ByteBuffer buffer = ByteBuffer.wrap(getTestData(0, new String())); in parseBufferWithZeroVenueNumber()
164 ByteBuffer buffer = ByteBuffer.wrap(getTestData(0, TEST_VENUE_URL1)); in parseBufferWithZeroVenueNumberAndUrlData()
180 ByteBuffer buffer = ByteBuffer.wrap(getTestData(-7, TEST_VENUE_URL1)); in parseBufferWithNegativeVenueNumberAndUrlData()
207 ByteBuffer buffer = ByteBuffer.wrap(getTestData(urlList)); in parseBufferWithValidVenueUrls()
[all …]
DANQPParserTest.java32 import java.nio.ByteBuffer;
186 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE) in getHSWanMetricsPayload()
281 ByteBuffer buffer = ByteBuffer.wrap(getVenueNamePayload(language, text)); in parseVenueNameElement()
303 ByteBuffer buffer = ByteBuffer.wrap(new byte[] {(byte) ipAddressAvailability}); in parseIPAddressTypeAvailabilityElement()
319 ByteBuffer buffer = ByteBuffer.wrap(getDomainNamePayload(testNames)); in parseDomainNameElement()
336 ByteBuffer buffer = ByteBuffer.wrap(getRoamingConsortiumPayload(ois, oisLength)); in parseRoamingConsortium()
353 ByteBuffer buffer = ByteBuffer.wrap(getNAIRealmPayload(testBytes)); in parseNAIRealmElement()
373 ByteBuffer buffer = ByteBuffer.wrap(getThreeGPPNetworkPayload( in parseThreeGPPNetworkElement()
387 ByteBuffer buffer = ByteBuffer.wrap( in parseNonHS20VendorSpecificElement()
414 Constants.ANQPElementType.ANQPVendorSpec, ByteBuffer.wrap(data))); in parseVendorSpecificElementWithHSFriendlyName()
[all …]
DHSWanMetricsElementTest.java30 import java.nio.ByteBuffer;
57 private ByteBuffer getTestBuffer() { in getTestBuffer()
58 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE) in getTestBuffer()
73 private ByteBuffer getUninitializedBuffer() { in getUninitializedBuffer()
75 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE) in getUninitializedBuffer()
129 HSWanMetricsElement.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
140 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE - 1); in parseBufferWithLessThanExpectedSize()
154 ByteBuffer buffer = ByteBuffer.allocate(HSWanMetricsElement.EXPECTED_BUFFER_SIZE + 1); in parseBufferWithMoreThanExpectedSize()
168 ByteBuffer buffer = getTestBuffer(); in parseBufferWithTestData()
184 ByteBuffer buffer = getUninitializedBuffer(); in testIsInitialized()
DHSConnectionCapabilityElementTest.java29 import java.nio.ByteBuffer;
50 private void appendProtocolPortTuple(ByteBuffer buffer, ProtocolPortTuple tuple) { in appendProtocolPortTuple()
62 private ByteBuffer getTestBuffer(ProtocolPortTuple[] tuples) { in getTestBuffer()
63 ByteBuffer buffer = ByteBuffer.allocate(tuples.length * ProtocolPortTuple.RAW_BYTE_SIZE) in getTestBuffer()
81 HSConnectionCapabilityElement.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
93 ByteBuffer buffer = ByteBuffer.allocate(ProtocolPortTuple.RAW_BYTE_SIZE - 1); in parseBufferWithLessThanMinimumSize()
108 ByteBuffer buffer = ByteBuffer.allocate(ProtocolPortTuple.RAW_BYTE_SIZE + 1); in parseBufferWithIncompleteTupleBytes()
123 ByteBuffer buffer = getTestBuffer(new ProtocolPortTuple[] {TEST_TUPLE1, TEST_TUPLE2}); in parseBufferWithTestData()
DVenueNameElementTest.java32 import java.nio.ByteBuffer;
88 VenueNameElement.parse(ByteBuffer.allocate(0)); in parseEmptyBuffer()
99 ByteBuffer buffer = ByteBuffer.wrap(getTestData(new String[] {TEST_VENUE_NAME1})); in parseTruncatedBuffer()
113 ByteBuffer buffer = ByteBuffer.wrap(getTestData(new String[0])); in parseBufferWithEmptyVenueName()
130 ByteBuffer buffer = ByteBuffer.wrap( in parseBufferWithValidVenueNames()
147 ByteBuffer buffer = ByteBuffer.wrap(getTestData(new String[] {text})); in parseBufferWithMaxLengthVenueName()
168 ByteBuffer buffer = ByteBuffer.wrap(getTestData(new String[] {text})); in parseBufferWithVenueNameLengthExceedMax()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DByteBufferReaderTest.java27 import java.nio.ByteBuffer;
45 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in readIntegerWithBufferUnderflow()
59 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in readIntegerExceedingMaximumLength()
73 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in readIntegerLessThanMinimumLength()
86 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in readIntegerWithMinimumSize()
102 ByteBuffer leBuffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN); in readIntegerWithMaximumSize()
108 ByteBuffer beBuffer = ByteBuffer.wrap(data).order(ByteOrder.BIG_ENDIAN); in readIntegerWithMaximumSize()
122 ByteBufferReader.readString(ByteBuffer.wrap(new byte[10]), -1, StandardCharsets.US_ASCII); in readStringWithNegativeSize()
133 ByteBuffer.wrap(new byte[10]), 0, StandardCharsets.US_ASCII); in readStringWithZeroSize()
146 ByteBuffer buffer = ByteBuffer.wrap(expectedValue.getBytes(StandardCharsets.US_ASCII)); in readString()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DPacketUtils.java29 import java.nio.ByteBuffer;
111 void addPacketBytes(IpHeader header, ByteBuffer resultBuffer) throws Exception; in addPacketBytes()
145 ByteBuffer resultBuffer = buildHeader(); in getPacketBytes()
151 public ByteBuffer buildHeader() { in buildHeader()
152 ByteBuffer bb = ByteBuffer.allocate(DATA_BUFFER_LEN); in buildHeader()
187 private short calculateChecksum(ByteBuffer bb) { in calculateChecksum()
192 ShortBuffer shortBuffer = ByteBuffer.wrap(getByteArrayFromBuffer(bb)).asShortBuffer(); in calculateChecksum()
214 ByteBuffer bb = ByteBuffer.allocate(DATA_BUFFER_LEN); in getPacketBytes()
260 ByteBuffer bb = ByteBuffer.allocate(DATA_BUFFER_LEN); in getPacketBytes()
266 public void addPacketBytes(IpHeader header, ByteBuffer resultBuffer) { in addPacketBytes()
[all …]
/packages/modules/Connectivity/Tethering/tests/privileged/src/android/net/ip/
DDadProxyTest.java55 import java.nio.ByteBuffer;
145 private static ByteBuffer createDadPacket(int type) { in createDadPacket()
150 final ByteBuffer buf = ByteBuffer.allocate(icmpLen + IPV6_HEADER_LEN + ETH_HEADER_LEN); in createDadPacket()
218 private boolean waitForPacket(ByteBuffer packet, TapPacketReader reader) { in waitForPacket()
222 final ByteBuffer buffer = ByteBuffer.wrap(p); in waitForPacket()
229 private ByteBuffer copy(ByteBuffer buf) { in copy()
232 return ByteBuffer.wrap(buf.array().clone()); in copy()
235 private void updateDstMac(ByteBuffer buf, MacAddress mac) { in updateDstMac()
239 private void updateSrcMac(ByteBuffer buf, InterfaceParams ifaceParams) { in updateSrcMac()
246 ByteBuffer in, TapPacketReader inReader, ByteBuffer out, TapPacketReader outReader) in receivePacketAndMaybeExpectForwarded()
[all …]
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/eap/message/simaka/attributes/
DAtIdReqTest.java45 import java.nio.ByteBuffer;
59 ByteBuffer input = ByteBuffer.wrap(AT_PERMANENT_ID_REQ); in testDecodeAtPermanentIdReq()
71 ByteBuffer input = ByteBuffer.wrap(PERMANENT_ID_INVALID_LENGTH); in testDecodeAtPermanentIdReqInvalidLength()
82 ByteBuffer result = ByteBuffer.allocate(EXPECTED_LENGTH); in testEncodeAtPermanentIdReq()
90 ByteBuffer input = ByteBuffer.wrap(AT_ANY_ID_REQ); in testDecodeAtAnyIdReq()
102 ByteBuffer input = ByteBuffer.wrap(ANY_ID_INVALID_LENGTH); in testDecodeAtAnyIdReqInvalidLength()
113 ByteBuffer result = ByteBuffer.allocate(EXPECTED_LENGTH); in testEncodeAtAnyIdReq()
121 ByteBuffer input = ByteBuffer.wrap(AT_FULL_AUTH_ID_REQ); in testDecodeAtFullauthIdReq()
133 ByteBuffer input = ByteBuffer.wrap(FULL_AUTH_ID_INVALID_LENGTH); in testDecodeAtFullauthIdReqInvalidLength()
144 ByteBuffer result = ByteBuffer.allocate(EXPECTED_LENGTH); in testEncodeAtFullauthIdReq()
DAtResTest.java40 import java.nio.ByteBuffer;
52 ByteBuffer input = ByteBuffer.wrap(AT_RES); in testDecode()
64 ByteBuffer input = ByteBuffer.wrap(AT_RES_INVALID_RES_LENGTH); in testDecodeInvalidResLength()
74 ByteBuffer input = ByteBuffer.wrap(AT_RES_SHORT_RES); in testDecodeShortResLength()
84 ByteBuffer input = ByteBuffer.wrap(AT_RES_LONG_RES); in testDecodeLongResLength()
96 ByteBuffer result = ByteBuffer.allocate(AT_RES.length); in testEncode()
105 ByteBuffer result = ByteBuffer.allocate(AT_RES.length); in testGetAtRes()
DAtCounterTest.java42 import java.nio.ByteBuffer;
56 ByteBuffer input = ByteBuffer.wrap(AT_COUNTER); in testDecodeAtCounter()
69 ByteBuffer input = ByteBuffer.wrap(AT_COUNTER_INVALID_LENGTH); in testDecodeAtCounterInvalidLength()
81 ByteBuffer result = ByteBuffer.allocate(EXPECTED_LENGTH); in testEncodeAtCounter()
95 ByteBuffer input = ByteBuffer.wrap(AT_COUNTER_TOO_SMALL); in testDecodeAtCounterTooSmall()
107 ByteBuffer input = ByteBuffer.wrap(AT_COUNTER_TOO_SMALL_INVALID_LENGTH); in testDecodeAtCounterTooSmallInvalidLength()
118 ByteBuffer result = ByteBuffer.allocate(EXPECTED_LENGTH); in testEncodeAtCounterTooSmall()
DAtBiddingTest.java38 import java.nio.ByteBuffer;
50 ByteBuffer input = ByteBuffer.wrap(AT_BIDDING_SUPPORTS_AKA_PRIME); in testDecodeServerSupportsAkaPrime()
62 ByteBuffer input = ByteBuffer.wrap(AT_BIDDING_DOES_NOT_SUPPORT_AKA_PRIME); in testDecodeDoesNotSupportAkaPrime()
74 ByteBuffer input = ByteBuffer.wrap(AT_BIDDING_INVALID_LENGTH); in testDecodeInvalidLength()
86 ByteBuffer result = ByteBuffer.allocate(AT_BIDDING_SUPPORTS_AKA_PRIME.length); in testEncodeServerSupportsAkaPrime()
95 ByteBuffer result = ByteBuffer.allocate(AT_BIDDING_DOES_NOT_SUPPORT_AKA_PRIME.length); in testEncodeDoesNotSupportAkaPrime()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/message/
DIkeSaPayloadTest.java75 import java.nio.ByteBuffer;
267 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeAttribute()
279 ByteBuffer byteBuffer = ByteBuffer.allocate(mAttributeKeyLength128.getAttributeLength()); in testEncodeAttribute()
290 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeEncryptionTransform()
306 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeEncryptionTransformWithInvalidKeyLength()
323 ByteBuffer byteBuffer = ByteBuffer.allocate(mEncrAesCbc128Transform.getTransformLength()); in testEncodeEncryptionTransform()
352 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodePrfTransform()
367 ByteBuffer byteBuffer = ByteBuffer.allocate(mPrfHmacSha1Transform.getTransformLength()); in testEncodePrfTransform()
387 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeIntegrityTransform()
403 ByteBuffer inputBuffer = ByteBuffer.wrap(inputPacket); in testDecodeIntegrityTransformWithUnrecognizedAttribute()
[all …]
DIkeDeletePayloadTest.java35 import java.nio.ByteBuffer;
55 ByteBuffer inputBuffer = in testDecodeDeleteIkePayload()
56 ByteBuffer.wrap(TestUtils.hexStringToByteArray(DELETE_IKE_PAYLOAD_HEX_STRING)); in testDecodeDeleteIkePayload()
74 ByteBuffer inputBuffer = in testDecodeDeleteChildPayload()
75 ByteBuffer.wrap(TestUtils.hexStringToByteArray(DELETE_CHILD_PAYLOAD_HEX_STRING)); in testDecodeDeleteChildPayload()
97 ByteBuffer inputBuffer = ByteBuffer.wrap(deletePayloadBytes); in testDecodeWithInvalidProtocol()
112 ByteBuffer inputBuffer = ByteBuffer.wrap(deletePayloadBytes); in testDecodeWithInvalidSpiSize()
127 ByteBuffer inputBuffer = ByteBuffer.wrap(deletePayloadBytes); in testDecodeWithInvalidNumSpi()
143 ByteBuffer inputBuffer = ByteBuffer.wrap(deletePayloadBytes); in testDecodeWithInvalidNumSpiAndSpiSize()
198 ByteBuffer bb = ByteBuffer.allocate(deletePayload.getPayloadLength()); in testEncodeForIke()
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/dhcp/
DDhcpPacketTest.java65 import java.nio.ByteBuffer;
142 public ByteBuffer buildPacket(int encap, short unusedDestUdp, short unusedSrcUdp) { in buildPacket()
143 ByteBuffer result = ByteBuffer.allocate(MAX_LENGTH); in buildPacket()
149 public void finishPacket(ByteBuffer buffer) { in finishPacket()
167 public ByteBuffer build() { in build()
169 ByteBuffer pkt = buildPacket(ENCAP_BOOTP, (short) 0, (short) 0); in build()
178 ByteBuffer packet = new TestDhcpPacket(DHCP_MESSAGE_TYPE_OFFER) in assertDomainAndVendorInfoParses()
224 ByteBuffer packet = testPacket.build(); in assertLeaseTimeParses()
279 ByteBuffer packet = new TestDhcpPacket(type, clientIp, yourIp) in checkIpAddress()
346 final ByteBuffer packet = ByteBuffer.wrap(HexDump.hexStringToByteArray( in testOffer1()
[all …]
/packages/modules/NetworkStack/common/netlinkclient/src/android/net/netlink/
DStructNlAttr.java23 import java.nio.ByteBuffer;
47 public static StructNlAttr peek(ByteBuffer byteBuffer) { in peek()
71 public static StructNlAttr parse(ByteBuffer byteBuffer) { in parse()
100 @Nullable ByteBuffer byteBuffer) { in findNextAttrOfType()
136 final ByteBuffer buf = getValueAsByteBuffer(); in StructNlAttr()
153 final ByteBuffer buf = getValueAsByteBuffer(); in StructNlAttr()
176 final ByteBuffer buf = getValueAsByteBuffer(); in StructNlAttr()
190 final ByteBuffer byteBuffer = getValueAsByteBuffer(); in getValueAsBe16()
204 final ByteBuffer byteBuffer = getValueAsByteBuffer(); in getValueAsBe32()
217 public ByteBuffer getValueAsByteBuffer() { in getValueAsByteBuffer()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/util/
DFrameParser.java23 import java.nio.ByteBuffer;
54 ByteBuffer frameBuffer = ByteBuffer.wrap(frameBytes); in FrameParser()
70 private static short getUnsignedByte(ByteBuffer data) { in getUnsignedByte()
77 private static int getUnsignedShort(ByteBuffer data) { in getUnsignedShort()
88 private void parseEthernetFrame(ByteBuffer data) { in parseEthernetFrame()
126 private void parseIpv4Packet(ByteBuffer data) { in parseIpv4Packet()
177 private void parseTcpPacket(ByteBuffer data) { in parseTcpPacket()
194 private void parseUdpPacket(ByteBuffer data) { in parseUdpPacket()
227 private void parseDhcpPacket(ByteBuffer data) { in parseDhcpPacket()
293 private void parseIcmpPacket(ByteBuffer data) { in parseIcmpPacket()
[all …]
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/message/
DIkeConfigPayload.java46 import java.nio.ByteBuffer;
114 ByteBuffer inputBuffer = ByteBuffer.wrap(payloadBody); in IkeConfigPayload()
211 ByteBuffer buffer = in fromPersistableBundle()
212 ByteBuffer.wrap(PersistableBundleUtils.toByteArray(byteArrayBundle)); in fromPersistableBundle()
236 ByteBuffer buffer = ByteBuffer.allocate(getAttributeLen()); in toPersistableBundle()
251 static List<ConfigAttribute> decodeAttributesFrom(ByteBuffer inputBuffer) in decodeAttributesFrom()
271 private static ConfigAttribute decodeSingleAttributeFrom(ByteBuffer inputBuffer) in decodeSingleAttributeFrom()
309 public void encodeAttributeToByteBuffer(ByteBuffer buffer) { in encodeAttributeToByteBuffer()
342 int netmaskInt = ByteBuffer.wrap(bytes).getInt(); in netmaskToPrefixLen()
366 ByteBuffer buffer = ByteBuffer.allocate(IPV4_ADDRESS_LEN); in prefixToNetmaskBytes()
[all …]
DIkeEncryptedPayloadBody.java27 import java.nio.ByteBuffer;
78 ByteBuffer inputBuffer = ByteBuffer.wrap(message); in IkeEncryptedPayloadBody()
178 ByteBuffer buffer = ByteBuffer.wrap(paddedDataWithChecksum); in IkeEncryptedPayloadBody()
230 ByteBuffer authenticatedSectionBuffer = ByteBuffer.allocate(dataToAuthenticateLength); in generateOutboundChecksum()
302 ByteBuffer authenticatedSectionBuffer = ByteBuffer.allocate(dataToAuthenticateLength); in combinedModeEncrypt()
330 ByteBuffer dataWithChecksumBuffer = in combinedModeDecrypt()
331 ByteBuffer.allocate(encryptedData.length + checksum.length); in combinedModeDecrypt()
360 ByteBuffer padBuffer = ByteBuffer.allocate(paddedDataLength); in getPaddedData()
386 ByteBuffer buffer = ByteBuffer.allocate(getLength()); in encode()
/packages/apps/Nfc/src/com/android/nfc/handover/
DHandoverDataParser.java33 import java.nio.ByteBuffer;
188 ByteBuffer payload = ByteBuffer.allocate(nestedPayload.length + 1); in createHandoverSelectRecord()
208 ByteBuffer payload = ByteBuffer.allocate(nestedPayload.length + 1); in createHandoverRequestRecord()
243 bluetoothData = parseBtOob(ByteBuffer.wrap(dataRecord.getPayload())); in getIncomingHandoverData()
299 ByteBuffer buf = ByteBuffer.wrap(acPayload); in isCarrierActivating()
323 BluetoothHandoverData data = parseBtOob(ByteBuffer.wrap(oob.getPayload())); in parseBluetoothHandoverSelect()
332 return parseBleOob(ByteBuffer.wrap(oob.getPayload())); in parseBluetoothHandoverSelect()
346 return parseBtOob(ByteBuffer.wrap(r.getPayload())); in parseBluetooth()
351 return parseBleOob(ByteBuffer.wrap(r.getPayload())); in parseBluetooth()
362 return parseNokia(ByteBuffer.wrap(r.getPayload())); in parseBluetooth()
[all …]
/packages/modules/Connectivity/Tethering/tests/unit/src/android/net/util/
DTetheringUtilsTest.java55 import java.nio.ByteBuffer;
118 private int writePacket(FileDescriptor fd, ByteBuffer pkt) throws Exception { in writePacket()
126 private ByteBuffer readIpPacket(FileDescriptor fd) throws Exception { in readIpPacket()
127 ByteBuffer buf = ByteBuffer.allocate(PACKET_SIZE); in readIpPacket()
136 private ByteBuffer checkIcmpSocketFilter(ByteBuffer passed, ByteBuffer dropped, in checkIcmpSocketFilter()
144 ByteBuffer received = readIpPacket(in); in checkIcmpSocketFilter()
174 final ByteBuffer na = Ipv6Utils.buildNaPacket(mac1, mac2, ll1, ll2, 0, ll1); in testIcmpSocketFilters()
175 final ByteBuffer ns = Ipv6Utils.buildNsPacket(mac1, mac2, ll1, ll2, ll1); in testIcmpSocketFilters()
176 final ByteBuffer rs = Ipv6Utils.buildRsPacket(mac1, mac2, ll1, allRouters); in testIcmpSocketFilters()
178 ByteBuffer received = checkIcmpSocketFilter(na /* passed */, rs /* dropped */, in testIcmpSocketFilters()
/packages/modules/NetworkStack/tests/unit/src/android/net/apf/
DApfTest.java92 import java.nio.ByteBuffer;
1144 private static void setIpv4VersionFields(ByteBuffer packet) { in setIpv4VersionFields()
1149 private static void setIpv6VersionFields(ByteBuffer packet) { in setIpv6VersionFields()
1154 private static ByteBuffer makeIpv4Packet(int proto) { in makeIpv4Packet()
1155 ByteBuffer packet = ByteBuffer.wrap(new byte[100]); in makeIpv4Packet()
1161 private static ByteBuffer makeIpv6Packet(int nextHeader) { in makeIpv6Packet()
1162 ByteBuffer packet = ByteBuffer.wrap(new byte[100]); in makeIpv6Packet()
1183 ByteBuffer packet = ByteBuffer.wrap(new byte[100]); in testApfFilterIPv4()
1233 ByteBuffer packet = makeIpv6Packet(IPPROTO_UDP); in testApfFilterIPv6()
1285 ByteBuffer mcastv4packet = makeIpv4Packet(IPPROTO_UDP); in testApfFilterMulticast()
[all …]

12345678910>>...15