Package org.opencord.bng.packets
Class Pppoe
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.opencord.bng.packets.Pppoe
-
- All Implemented Interfaces:
org.onlab.packet.IPacket
public class Pppoe extends org.onlab.packet.BasePacketImplements PPPoE packet format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPppoe.PppoeTypePPPoE Discovery types.
-
Field Summary
Fields Modifier and Type Field Description static shortTYPE_PPPOEDstatic shortTYPE_PPPOES
-
Constructor Summary
Constructors Constructor Description Pppoe()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.onlab.packet.Deserializer<Pppoe>deserializer()Deserializer function for PPPoE packets.booleanequals(Object obj)PppoeTlvTaggetAcName()Get the AC-Name.Pppoe.PppoeTypegetPacketType()Get the packet type.shortgetPayloadLength()Get the PPPoE payload length header field.shortgetPppProtocol()Get the Point-to-Point Protocol.shortgetSessionId()Get the session ID.shortgetTypeId()Get the PPPoE type ID.bytegetVersion()Get the PPPoE version field.inthashCode()static booleanisPPPoED(org.onlab.packet.Ethernet eth)Checks if the passed Ethernet packet is PPPoE Discovery.static booleanisPPPoES(org.onlab.packet.Ethernet eth)Checks if the passed Ethernet packet is PPPoE Service.byte[]serialize()PppoesetAcName(PppoeTlvTag acname)Set the AC-Name.PppoesetPacketType(Pppoe.PppoeType type)Set the Packet Type.PppoesetPayloadLength(short payloadLength)Set the payload length.PppoesetSessionId(short sessionId)Set the session ID.PppoesetTypeId(byte typeId)Set the type ID.PppoesetVersion(byte version)Set the version field.StringtoString()
-
-
-
Field Detail
-
TYPE_PPPOED
public static final short TYPE_PPPOED
- See Also:
- Constant Field Values
-
TYPE_PPPOES
public static final short TYPE_PPPOES
- See Also:
- Constant Field Values
-
-
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:
hashCodein classorg.onlab.packet.BasePacket
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classorg.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
-
-