Package org.onlab.packet.dhcp
Class Dhcp6IaPdOption
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.dhcp.Dhcp6Option
-
- org.onlab.packet.dhcp.Dhcp6IaPdOption
-
- All Implemented Interfaces:
IPacket
public final class Dhcp6IaPdOption extends Dhcp6Option
DHCPv6 Identity Association for Prefix Delegation Option. Based on RFC-3633
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_LEN-
Fields inherited from class org.onlab.packet.dhcp.Dhcp6Option
UNSIGNED_SHORT_MASK
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Constructor Summary
Constructors Constructor Description Dhcp6IaPdOption()Default constructor.Dhcp6IaPdOption(Dhcp6Option dhcp6Option)Constructs a DHCPv6 IA PD option with DHCPv6 option.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<Dhcp6Option>deserializer()Gets deserializer.booleanequals(Object obj)shortgetCode()Gets the code of this option.intgetIaId()Gets Identity Association ID.shortgetLength()Gets the length of this option.List<Dhcp6Option>getOptions()Gets sub-options.intgetT1()Gets time 1.intgetT2()Gets time 2.inthashCode()byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.voidsetIaId(int iaId)Sets Identity Association ID.voidsetOptions(List<Dhcp6Option> options)Sets sub-options.voidsetT1(int t1)Sets time 1.voidsetT2(int t2)Sets time 2.StringtoString()-
Methods inherited from class org.onlab.packet.dhcp.Dhcp6Option
getData, getToStringHelper, setCode, setData, setLength
-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Field Detail
-
DEFAULT_LEN
public static final int DEFAULT_LEN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Dhcp6IaPdOption
public Dhcp6IaPdOption()
Default constructor.
-
Dhcp6IaPdOption
public Dhcp6IaPdOption(Dhcp6Option dhcp6Option)
Constructs a DHCPv6 IA PD option with DHCPv6 option.- Parameters:
dhcp6Option- the DHCPv6 option
-
-
Method Detail
-
getCode
public short getCode()
Description copied from class:Dhcp6OptionGets the code of this option.- Overrides:
getCodein classDhcp6Option- Returns:
- the code
-
getLength
public short getLength()
Description copied from class:Dhcp6OptionGets the length of this option.- Overrides:
getLengthin classDhcp6Option- Returns:
- the length of this option
-
getIaId
public int getIaId()
Gets Identity Association ID. The unique identifier for this IA_PD; the IAID must be unique among the identifiers for all of this requesting router's IA_PDs.- Returns:
- the Identity Association ID
-
setIaId
public void setIaId(int iaId)
Sets Identity Association ID.- Parameters:
iaId- the Identity Association ID.
-
getT1
public int getT1()
Gets time 1. The time at which the requesting router should contact the delegating router from which the prefixes in the IA_PD were obtained to extend the lifetimes of the prefixes delegated to the IA_PD; T1 is a time duration relative to the current time expressed in units of seconds.- Returns:
- the value of time 1
-
setT1
public void setT1(int t1)
Sets time 1.- Parameters:
t1- the value of time 1
-
getT2
public int getT2()
Gets time 2. The time at which the requesting router should contact any available delegating router to extend the lifetimes of the prefixes assigned to the IA_PD; T2 is a time duration relative to the current time expressed in units of seconds.- Returns:
- the value of time 2
-
setT2
public void setT2(int t2)
Sets time 2.- Parameters:
t2- the value of time 2
-
getOptions
public List<Dhcp6Option> getOptions()
Gets sub-options.- Returns:
- sub-options of this option
-
setOptions
public void setOptions(List<Dhcp6Option> options)
Sets sub-options.- Parameters:
options- the sub-options of this option
-
deserializer
public static Deserializer<Dhcp6Option> deserializer()
Gets deserializer.- Returns:
- the deserializer
-
serialize
public byte[] serialize()
Description copied from interface:IPacketSets all payloads parent packet if applicable, then serializes this packet and all payloads.- Specified by:
serializein interfaceIPacket- Overrides:
serializein classDhcp6Option- Returns:
- a byte[] containing this packet and payloads
-
hashCode
public int hashCode()
- Overrides:
hashCodein classDhcp6Option
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classDhcp6Option
-
toString
public String toString()
- Overrides:
toStringin classDhcp6Option
-
-