Add support for setting hop limit
Test: TH Flag: EXEMPT mainline Bug: 1000001 Change-Id: I7ee5b0f31b4db633451a0ddee5d92e45e5947f84
This commit is contained in:
parent
259c0b4f66
commit
1586ffbeb1
1 changed files with 3 additions and 2 deletions
|
|
@ -490,15 +490,16 @@ class UdpPkt(
|
|||
class Ip6Pkt(
|
||||
private val src: Inet6Address,
|
||||
private val dst: Inet6Address,
|
||||
private val hlim: Byte = 255.toByte(),
|
||||
) : PseudoHeaderPacket {
|
||||
constructor(src: String, dst: String) : this(
|
||||
constructor(src: String, dst: String, hlim: Int = 255) : this(
|
||||
InetAddress.getByName(src) as Inet6Address,
|
||||
InetAddress.getByName(dst) as Inet6Address,
|
||||
hlim.toByte(),
|
||||
)
|
||||
|
||||
private val tc = 0
|
||||
private val flowlabel = 0
|
||||
private val hlim = 255.toByte()
|
||||
|
||||
override fun build(payload: FinalizedPacket?, pseudo: PseudoHeaderPacket?): FinalizedPacket {
|
||||
require(payload != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue