Class PPPoED

    • Field Detail

      • version

        protected byte version
      • type

        protected byte type
      • code

        protected byte code
      • sessionId

        protected short sessionId
      • payloadLength

        protected short payloadLength
    • Constructor Detail

      • PPPoED

        public PPPoED()
    • Method Detail

      • getVersion

        public byte getVersion()
      • setVersion

        public void setVersion​(byte version)
      • getType

        public byte getType()
      • setType

        public void setType​(byte type)
      • getCode

        public byte getCode()
      • setCode

        public void setCode​(byte code)
      • getSessionId

        public short getSessionId()
      • setSessionId

        public void setSessionId​(short sessionId)
      • getPayloadLength

        public short getPayloadLength()
      • setPayloadLength

        public void setPayloadLength​(short payloadLength)
      • getTagList

        public ArrayList<PPPoEDTag> getTagList​(short tagType)
        Gets a list of tags from the packet.
        Parameters:
        tagType - the type field of the required tags
        Returns:
        List of the tags that match the type or an empty list if there is none
      • getTag

        public PPPoEDTag getTag​(short tagType)
        Gets a tag from the packet.
        Parameters:
        tagType - the type field of the required tag
        Returns:
        the first tag that matches the type or null if does not exist
      • setTag

        public PPPoEDTag setTag​(short tagType,
                                byte[] value)
        Sets a tag in the packet.
        Parameters:
        tagType - the type field of the tag to set
        value - value to be set
        Returns:
        reference to the tag object
      • deserializer

        public static Deserializer<PPPoED> deserializer()
        Deserializer for PPPoED packets.
        Returns:
        deserializer
      • serialize

        public byte[] serialize()
        Description copied from interface: IPacket
        Sets all payloads parent packet if applicable, then serializes this packet and all payloads.
        Returns:
        a byte[] containing this packet and payloads