Package org.opencord.bng.packets
Class PppTlv
- java.lang.Object
-
- org.opencord.bng.packets.PppTlv
-
public class PppTlv extends Object
Implements IPCP Type-Length-Value options.
-
-
Field Summary
Fields Modifier and Type Field Description static byteIPCPTLV_IP_ADDRESS
-
Constructor Summary
Constructors Constructor Description PppTlv()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PppTlvdeserialize(ByteBuffer bb)booleanequals(Object obj)bytegetLength()Get the TLV length.bytegetType()Get the TLV type.byte[]getValue()Get the TLV value field as byte array.inthashCode()byte[]serialize()PppTlvsetLength(byte length)Set the TLV length.PppTlvsetType(byte type)Set the TLV type.PppTlvsetValue(byte[] value)Set the TLV valued field.StringtoString()
-
-
-
Field Detail
-
IPCPTLV_IP_ADDRESS
public static final byte IPCPTLV_IP_ADDRESS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public byte getType()
Get the TLV type.- Returns:
- the TLV type
-
setType
public PppTlv setType(byte type)
Set the TLV type.- Parameters:
type- the TLV type to set- Returns:
- this
-
getLength
public byte getLength()
Get the TLV length. The length include the 2 bytes of minimum header length.- Returns:
- the TLV length
-
setLength
public PppTlv setLength(byte length)
Set the TLV length. Length must include the 2 bytes of minimum header length.- Parameters:
length- the TLV length to set.- Returns:
- this
-
getValue
public byte[] getValue()
Get the TLV value field as byte array.- Returns:
- the TLV value field
-
setValue
public PppTlv setValue(byte[] value)
Set the TLV valued field.- Parameters:
value- the TLV value to set- Returns:
- this
-
serialize
public byte[] serialize()
-
deserialize
public PppTlv deserialize(ByteBuffer bb) throws org.onlab.packet.DeserializationException
- Throws:
org.onlab.packet.DeserializationException
-
-