Class PppTlv


  • public class PppTlv
    extends Object
    Implements IPCP Type-Length-Value options.
    • Constructor Detail

      • PppTlv

        public PppTlv()
    • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object