Merge "Add packet filters for IPv6 UDP"
This commit is contained in:
@@ -17,10 +17,14 @@
|
||||
package com.android.testutils
|
||||
|
||||
import android.net.MacAddress
|
||||
import com.android.net.module.util.NetworkStackConstants.ETHER_HEADER_LEN
|
||||
import java.net.Inet4Address
|
||||
import java.net.InetAddress
|
||||
import java.nio.ByteBuffer
|
||||
|
||||
private const val ARP_SENDER_MAC_OFFSET = ETHER_HEADER_LEN + 8
|
||||
private const val ARP_TARGET_IPADDR_OFFSET = ETHER_HEADER_LEN + 24
|
||||
|
||||
private val TYPE_ARP = byteArrayOf(0x08, 0x06)
|
||||
// Arp reply header for IPv4 over ethernet
|
||||
private val ARP_REPLY_IPV4 = byteArrayOf(0x00, 0x01, 0x08, 0x00, 0x06, 0x04, 0x00, 0x02)
|
||||
|
||||
Reference in New Issue
Block a user