Class Pppoe

  • All Implemented Interfaces:
    org.onlab.packet.IPacket

    public class Pppoe
    extends org.onlab.packet.BasePacket
    Implements PPPoE packet format.
    • Constructor Detail

      • Pppoe

        public Pppoe()
    • Method Detail

      • getPacketType

        public Pppoe.PppoeType getPacketType()
        Get the packet type.
        Returns:
        the packet type
      • setPacketType

        public Pppoe setPacketType​(Pppoe.PppoeType type)
        Set the Packet Type.
        Parameters:
        type - The packet type to set
        Returns:
        this
      • getSessionId

        public short getSessionId()
        Get the session ID.
        Returns:
        the session ID
      • setSessionId

        public Pppoe setSessionId​(short sessionId)
        Set the session ID.
        Parameters:
        sessionId - the session ID to set
        Returns:
        this
      • getPppProtocol

        public short getPppProtocol()
        Get the Point-to-Point Protocol.
        Returns:
        the Point-to-Point Protocol
      • getAcName

        public PppoeTlvTag getAcName()
        Get the AC-Name.
        Returns:
        the AC-Name
      • setAcName

        public Pppoe setAcName​(PppoeTlvTag acname)
        Set the AC-Name.
        Parameters:
        acname - AC-Name to set
        Returns:
        this
      • getVersion

        public byte getVersion()
        Get the PPPoE version field.
        Returns:
        The version field
      • setVersion

        public Pppoe setVersion​(byte version)
        Set the version field.
        Parameters:
        version - version to set
        Returns:
        this
      • getTypeId

        public short getTypeId()
        Get the PPPoE type ID.
        Returns:
        The type ID
      • setTypeId

        public Pppoe setTypeId​(byte typeId)
        Set the type ID.
        Parameters:
        typeId - Type ID to set
        Returns:
        this
      • getPayloadLength

        public short getPayloadLength()
        Get the PPPoE payload length header field.
        Returns:
        The payload length
      • setPayloadLength

        public Pppoe setPayloadLength​(short payloadLength)
        Set the payload length.
        Parameters:
        payloadLength - the payload length to set.
        Returns:
        this
      • serialize

        public byte[] serialize()
      • deserializer

        public static org.onlab.packet.Deserializer<Pppoe> deserializer()
        Deserializer function for PPPoE packets.
        Returns:
        deserializer function
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class org.onlab.packet.BasePacket
      • equals

        public boolean equals​(Object obj)
        Overrides:
        equals in class org.onlab.packet.BasePacket
      • isPPPoES

        public static boolean isPPPoES​(org.onlab.packet.Ethernet eth)
        Checks if the passed Ethernet packet is PPPoE Service.
        Parameters:
        eth - Packet to check
        Returns:
        True if the packet contains PPPoE Service header
      • isPPPoED

        public static boolean isPPPoED​(org.onlab.packet.Ethernet eth)
        Checks if the passed Ethernet packet is PPPoE Discovery.
        Parameters:
        eth - Packet to check
        Returns:
        True if the packet contains PPPoE Discovery header