DHCPv6 addr reg: add a function helper to create ADDR_REG_INFORM message.
Flag: EXEMPT guarded by an legacy experiment flag Bug: 293393743 Test: TH Change-Id: I6699b1479eec0958610b533af135f163681438df
This commit is contained in:
parent
8b1f9c1772
commit
270672310e
1 changed files with 12 additions and 0 deletions
|
|
@ -798,4 +798,16 @@ public class Dhcp6Packet {
|
|||
(int) (millisecs / 10) /* elapsed time */, clientDuid, iapd);
|
||||
return pkt.buildPacket();
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a DHCPv6 ADDR-REG-INFORM packet from the required specified parameters.
|
||||
*/
|
||||
public static ByteBuffer buildAddrRegInformPacket(int transId, long millisecs,
|
||||
@NonNull final byte[] clientDuid, @NonNull final Inet6Address iaAddress, long preferred,
|
||||
long valid) {
|
||||
final Dhcp6AddrRegInformPacket pkt =
|
||||
new Dhcp6AddrRegInformPacket(transId, (int) (millisecs / 10) /* elapsed time */,
|
||||
clientDuid, iaAddress, preferred, valid);
|
||||
return pkt.buildPacket();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue