Package org.onlab.packet
Class EAP
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.EAP
-
- All Implemented Interfaces:
IPacket
public class EAP extends BasePacket
EAP (Extensible Authentication Protocol) packet.
-
-
Field Summary
Fields Modifier and Type Field Description static byteATTR_GTCstatic byteATTR_IDENTITYstatic byteATTR_MD5static byteATTR_NAKstatic byteATTR_NOTIFICATIONstatic byteATTR_OTPstatic byteATTR_TLSprotected bytecodeprotected byte[]datastatic shortEAP_HDR_LEN_REQ_RESPstatic shortEAP_HDR_LEN_SUC_FAILstatic byteFAILUREprotected byteidentifierprotected shortlengthstatic shortMIN_LENstatic byteREQUESTstatic byteRESPONSEstatic byteSUCCESSprotected bytetype-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<EAP>deserializer()Deserializer for EAP packets.booleanequals(Object o)bytegetCode()Gets the EAP code.byte[]getData()Gets the EAP data.bytegetDataType()Gets the data type.bytegetIdentifier()Gets the EAP identifier.shortgetLength()Gets the get packet length.inthashCode()byte[]serialize()Sets all payloads parent packet if applicable, then serializes this packet and all payloads.EAPsetCode(byte code)Sets the EAP code.EAPsetData(byte[] data)Sets the EAP data.EAPsetDataType(byte type)Sets the data type.EAPsetIdentifier(byte identifier)Sets the EAP identifier.EAPsetLength(short length)Sets the packet length.StringtoString()-
Methods inherited from class org.onlab.packet.BasePacket
clone, getParent, getPayload, resetChecksum, setParent, setPayload
-
-
-
-
Field Detail
-
MIN_LEN
public static final short MIN_LEN
- See Also:
- Constant Field Values
-
EAP_HDR_LEN_REQ_RESP
public static final short EAP_HDR_LEN_REQ_RESP
- See Also:
- Constant Field Values
-
EAP_HDR_LEN_SUC_FAIL
public static final short EAP_HDR_LEN_SUC_FAIL
- See Also:
- Constant Field Values
-
REQUEST
public static final byte REQUEST
- See Also:
- Constant Field Values
-
RESPONSE
public static final byte RESPONSE
- See Also:
- Constant Field Values
-
SUCCESS
public static final byte SUCCESS
- See Also:
- Constant Field Values
-
FAILURE
public static final byte FAILURE
- See Also:
- Constant Field Values
-
ATTR_IDENTITY
public static final byte ATTR_IDENTITY
- See Also:
- Constant Field Values
-
ATTR_NOTIFICATION
public static final byte ATTR_NOTIFICATION
- See Also:
- Constant Field Values
-
ATTR_NAK
public static final byte ATTR_NAK
- See Also:
- Constant Field Values
-
ATTR_MD5
public static final byte ATTR_MD5
- See Also:
- Constant Field Values
-
ATTR_OTP
public static final byte ATTR_OTP
- See Also:
- Constant Field Values
-
ATTR_GTC
public static final byte ATTR_GTC
- See Also:
- Constant Field Values
-
ATTR_TLS
public static final byte ATTR_TLS
- See Also:
- Constant Field Values
-
code
protected byte code
-
identifier
protected byte identifier
-
length
protected short length
-
type
protected byte type
-
data
protected byte[] data
-
-
Method Detail
-
getCode
public byte getCode()
Gets the EAP code.- Returns:
- EAP code
-
setCode
public EAP setCode(byte code)
Sets the EAP code.- Parameters:
code- EAP code- Returns:
- this
-
getIdentifier
public byte getIdentifier()
Gets the EAP identifier.- Returns:
- EAP identifier
-
setIdentifier
public EAP setIdentifier(byte identifier)
Sets the EAP identifier.- Parameters:
identifier- EAP identifier- Returns:
- this
-
getLength
public short getLength()
Gets the get packet length.- Returns:
- packet length
-
setLength
public EAP setLength(short length)
Sets the packet length.- Parameters:
length- packet length- Returns:
- this
-
getDataType
public byte getDataType()
Gets the data type.- Returns:
- data type
-
setDataType
public EAP setDataType(byte type)
Sets the data type.- Parameters:
type- data type- Returns:
- this
-
getData
public byte[] getData()
Gets the EAP data.- Returns:
- EAP data
-
setData
public EAP setData(byte[] data)
Sets the EAP data.- Parameters:
data- EAP data to be set- Returns:
- this
-
deserializer
public static Deserializer<EAP> deserializer()
Deserializer for EAP packets.- Returns:
- deserializer
-
serialize
public byte[] serialize()
Description copied from interface:IPacketSets all payloads parent packet if applicable, then serializes this packet and all payloads.- Returns:
- a byte[] containing this packet and payloads
-
hashCode
public int hashCode()
- Overrides:
hashCodein classBasePacket
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classBasePacket
-
-