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 byte
ATTR_GTC
static byte
ATTR_IDENTITY
static byte
ATTR_MD5
static byte
ATTR_NAK
static byte
ATTR_NOTIFICATION
static byte
ATTR_OTP
static byte
ATTR_TLS
protected byte
code
protected byte[]
data
static short
EAP_HDR_LEN_REQ_RESP
static short
EAP_HDR_LEN_SUC_FAIL
static byte
FAILURE
protected byte
identifier
protected short
length
static short
MIN_LEN
static byte
REQUEST
static byte
RESPONSE
static byte
SUCCESS
protected byte
type
-
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.boolean
equals(java.lang.Object o)
byte
getCode()
Gets the EAP code.byte[]
getData()
Gets the EAP data.byte
getDataType()
Gets the data type.byte
getIdentifier()
Gets the EAP identifier.short
getLength()
Gets the get packet length.int
hashCode()
byte[]
serialize()
Sets all payloads parent packet if applicable, then serializes this packet and all payloads.EAP
setCode(byte code)
Sets the EAP code.EAP
setData(byte[] data)
Sets the EAP data.EAP
setDataType(byte type)
Sets the data type.EAP
setIdentifier(byte identifier)
Sets the EAP identifier.EAP
setLength(short length)
Sets the packet length.java.lang.String
toString()
-
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:IPacket
Sets 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:
hashCode
in classBasePacket
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classBasePacket
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-