/cts/apps/VpnApp/src/com/android/cts/vpnfirewall/ |
D | PingReflector.java | 68 Ipv4Packet packet = new Ipv4Packet(stream); in processPacket() local 69 Log.i(TAG, "Packet contents:\n" + packet); in processPacket() 71 if (packet.protocol != PROTOCOL_ICMP) { in processPacket() 72 Log.i(TAG, "Protocol is " + packet.protocol + " not ICMP. Ignoring."); in processPacket() 77 new DataInputStream(new ByteArrayInputStream(packet.data)), packet.data.length); in processPacket() 81 Inet4Address tmp = packet.sourceAddress; in processPacket() 82 packet.sourceAddress = packet.destinationAddress; in processPacket() 83 packet.destinationAddress = tmp; in processPacket() 85 packet.setData(echo.getEncoded()); in processPacket() 86 writePacket(packet.getEncoded()); in processPacket()
|
/cts/tests/tests/net/src/android/net/ipv6/cts/ |
D | PingTest.java | 71 byte[] packet = new byte[payloadLength + ICMP_HEADER_SIZE]; in pingPacket() 72 new Random().nextBytes(packet); in pingPacket() 73 System.arraycopy(PING_HEADER, 0, packet, 0, PING_HEADER.length); in pingPacket() 74 return packet; in pingPacket() 99 InetAddress address, byte[] packet) throws ErrnoException, IOException { in sendPing() argument 104 int ret = Os.sendto(s, ByteBuffer.wrap(packet), 0, address, port); in sendPing() 105 assertEquals(packet.length, ret); in sendPing() 161 byte[] packet = pingPacket((int) (Math.random() * (MAX_SIZE - ICMP_HEADER_SIZE))); in testLoopbackPing() 164 sendPing(s, ipv6Loopback, packet); in testLoopbackPing() 165 checkResponse(s, ipv6Loopback, packet, true); in testLoopbackPing() [all …]
|
/cts/tests/tests/net/src/android/net/rtp/cts/ |
D | AudioGroupTest.java | 85 DatagramPacket packet = new DatagramPacket(new byte[length + 1], length + 1); in assertPacket() local 87 socket.receive(packet); in assertPacket() 88 assertEquals(packet.getLength(), length); in assertPacket() 92 DatagramPacket packet = new DatagramPacket(new byte[1], 1); in drain() local 98 socket.receive(packet); in drain()
|
/cts/tests/tests/net/src/android/net/cts/ |
D | NetworkAgentTest.kt | 196 val packet: KeepalivePacketData in willExpectDisconnectOnce() constant in CallbackEntry.OnAddKeepalivePacketFilter 202 val packet: KeepalivePacketData in willExpectDisconnectOnce() constant in CallbackEntry.OnStartSocketKeepalive 221 override fun onAddKeepalivePacketFilter(slot: Int, packet: KeepalivePacketData) { in willExpectDisconnectOnce() 222 history.add(OnAddKeepalivePacketFilter(slot, packet)) in willExpectDisconnectOnce() 232 packet: KeepalivePacketData in willExpectDisconnectOnce() 234 history.add(OnStartSocketKeepalive(slot, interval.seconds.toInt(), packet)) in willExpectDisconnectOnce() 418 val packet = object : KeepalivePacketData( in agent() constant 426 arg1 = slot, obj = packet) in agent() 428 arg1 = slot, arg2 = interval, obj = packet) in agent() 432 assertEquals(it.packet, packet) in agent() [all …]
|
D | CaptivePortalApiTest.kt | 253 val packet = DhcpPacket.decodeFullPacket(packetBytes, packetBytes.size, DhcpPacket.ENCAP_L2) in assertDhcpPacketReceived() constant 254 assertTrue(packetType.isInstance(packet), in assertDhcpPacketReceived() 256 return packetType.cast(packet) in assertDhcpPacketReceived()
|
/cts/hostsidetests/net/app/src/com/android/cts/net/hostside/ |
D | VpnTest.java | 320 byte[] packet = new byte[LENGTH]; in checkPing() 325 random.nextBytes(packet); in checkPing() 334 System.arraycopy(header, 0, packet, 0, header.length); in checkPing() 339 Os.write(s, packet, 0, packet.length); in checkPing() 355 packet[4] = (byte) ((port >> 8) & 0xff); in checkPing() 356 packet[5] = (byte) (port & 0xff); in checkPing() 359 if (packet[0] == (byte) 0x80) { in checkPing() 360 packet[0] = (byte) 0x81; in checkPing() 362 packet[0] = 0; in checkPing() 366 MoreAsserts.assertEquals(packet, reply); in checkPing()
|