Package org.opencord.bng.packets
Class PppoeTlvTag
- java.lang.Object
-
- org.opencord.bng.packets.PppoeTlvTag
-
public class PppoeTlvTag extends Object
Implements the PPPoE Type-Length-Value TAGs.
-
-
Field Summary
Fields Modifier and Type Field Description static shortPPPOED_TAGTYPE_ACNAMEstatic shortPPPOED_TAGTYPE_EOLstatic shortPPPOED_TAGTYPE_SERVICENAME
-
Constructor Summary
Constructors Constructor Description PppoeTlvTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PppoeTlvTagdeserialize(ByteBuffer bb)booleanequals(Object obj)shortgetLength()Gets the length, number of bytes of value field.shortgetTagType()Gets the TLV TAG type.byte[]getValue()The TLV value.inthashCode()byte[]serialize()PppoeTlvTagsetLength(short length)Sets the length.PppoeTlvTagsetTagType(short tagType)Sets the TLV TAG type.PppoeTlvTagsetValue(byte[] value)Set the TLV value.StringtoString()
-
-
-
Field Detail
-
PPPOED_TAGTYPE_EOL
public static final short PPPOED_TAGTYPE_EOL
- See Also:
- Constant Field Values
-
PPPOED_TAGTYPE_SERVICENAME
public static final short PPPOED_TAGTYPE_SERVICENAME
- See Also:
- Constant Field Values
-
PPPOED_TAGTYPE_ACNAME
public static final short PPPOED_TAGTYPE_ACNAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTagType
public short getTagType()
Gets the TLV TAG type.- Returns:
- the TLV TAG type
-
setTagType
public PppoeTlvTag setTagType(short tagType)
Sets the TLV TAG type.- Parameters:
tagType- the type to set- Returns:
- this
-
getLength
public short getLength()
Gets the length, number of bytes of value field.- Returns:
- the length
-
setLength
public PppoeTlvTag setLength(short length)
Sets the length.- Parameters:
length- the length to set excluded the header length- Returns:
- this
-
getValue
public byte[] getValue()
The TLV value.- Returns:
- the value
-
setValue
public PppoeTlvTag setValue(byte[] value)
Set the TLV value.- Parameters:
value- the value to set- Returns:
- this
-
serialize
public byte[] serialize()
-
deserialize
public PppoeTlvTag deserialize(ByteBuffer bb) throws org.onlab.packet.DeserializationException
- Throws:
org.onlab.packet.DeserializationException
-
-