Home
last modified time | relevance | path

Searched refs:packetBuffer (Results 1 – 5 of 5) sorted by relevance

/packages/modules/NetworkStack/src/android/net/dhcp/
DDhcpPacketListener.java69 protected int readPacket(@NonNull FileDescriptor fd, @NonNull Payload packetBuffer) in readPacket() argument
73 fd, packetBuffer.mBytes, 0, packetBuffer.mBytes.length, 0 /* flags */, addr); in readPacket()
76 packetBuffer.mSrcAddr = inet4AddrOrNull(addr); in readPacket()
77 packetBuffer.mSrcPort = addr.getPort(); in readPacket()
DDhcpClient.java658 protected int readPacket(FileDescriptor fd, byte[] packetBuffer) throws Exception { in readPacket() argument
660 return Os.read(fd, packetBuffer, 0, packetBuffer.length); in readPacket()
/packages/modules/IPsec/src/java/com/android/internal/net/ipsec/ike/utils/
DPacketReader.java63 protected int readPacket(FileDescriptor fd, byte[] packetBuffer) throws Exception { in readPacket() argument
64 return Os.read(fd, packetBuffer, 0, packetBuffer.length); in readPacket()
/packages/modules/NetworkStack/tests/unit/src/android/net/ip/
DIpReachabilityMonitorTest.kt141 override fun readPacket(fd: FileDescriptor, packetBuffer: ByteArray): Int { in readPacket()
143 if (packet.size > packetBuffer.size) { in readPacket()
146 System.arraycopy(packet, 0, packetBuffer, 0, packet.size) in readPacket()
/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ipsec/ike/message/
DIkeMessageTest.java915 ByteBuffer packetBuffer = ByteBuffer.wrap(p); in testEncodeAndEncryptFragments() local
919 packetBuffer.get(headerBytes); in testEncodeAndEncryptFragments()
928 packetBuffer.get(new byte[IkePayload.GENERIC_HEADER_LENGTH]); in testEncodeAndEncryptFragments()
929 assertEquals(i + 1 /*expetced fragNum*/, Short.toUnsignedInt(packetBuffer.getShort())); in testEncodeAndEncryptFragments()
930 assertEquals(expectedTotalFragments, Short.toUnsignedInt(packetBuffer.getShort())); in testEncodeAndEncryptFragments()