Package org.onlab.packet
Class EAPOLMkpduBasicParameterSet
- java.lang.Object
-
- org.onlab.packet.BasePacket
-
- org.onlab.packet.EAPOLMkpduBasicParameterSet
-
- All Implemented Interfaces:
EAPOLMkpduParameterSet
,IPacket
public class EAPOLMkpduBasicParameterSet extends BasePacket implements EAPOLMkpduParameterSet
Class representing EAPOL MKPDU Basic Parameter Set. IEEE 802.1X Clause 11; Figure 11-8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EAPOLMkpduBasicParameterSet.SCI
MKA Secure Channel Identifier.
-
Field Summary
Fields Modifier and Type Field Description static short
BPS_FIXED_PART_SIZE_UPTO_LENGTH_FIELD
static short
BPS_FIXED_PART_TOTAL_SIZE
static int
FIELD_ALGAG_LENGTH
static byte
KEYSERVER_MASK
static byte
KEYSERVER_OFFSET
static byte
MACSEC_CAPABILITY_MASK
static byte
MACSEC_CAPABILITY_OFFSET
static byte
MACSEC_DESIRED_MASK
static byte
MACSEC_DESIRED_OFFSET
static int
TOTAL_BPS_BODY_LENGTH
-
Fields inherited from class org.onlab.packet.BasePacket
parent, payload
-
Fields inherited from interface org.onlab.packet.EAPOLMkpduParameterSet
BODY_LENGTH_MSB_MASK, BODY_LENGTH_MSB_SHIFT, BODY_LENGTH_OCTET_OFFSET, FIELD_MI_LENGTH, FIELD_MN_LENGTH, FIELD_SCI_LENGTH, PARAMETERSET_TYPE_BASIC, PARAMETERSET_TYPE_DISTRIBUTED_SAK, PARAMETERSET_TYPE_ICV_INDICATOR, PARAMETERSET_TYPE_LIVE_PEER_LIST, PARAMETERSET_TYPE_MACSEC_SAK_USE, PARAMETERSET_TYPE_POTENTIAL_PEER_LIST
-
-
Constructor Summary
Constructors Constructor Description EAPOLMkpduBasicParameterSet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deserializer<EAPOLMkpduBasicParameterSet>
deserializer()
Deserializer function for Basic Parameter Set.byte[]
getActorMI()
To get Member Identifier.int
getActorMN()
To get Member Identifier.byte[]
getAlgAgility()
To get Algorithm Agility.short
getBodyLength()
Retrieve Body Length field of Parameter Set.byte[]
getCKN()
To get CAK name.boolean
getKeyServer()
To get Key Server.byte
getKeyServerPriority()
To get Key Server Priority.byte
getMacSecCapacity()
To get MACSec Capacity.boolean
getMacSecDesired()
To get MACSec Desired.byte
getMkaVersion()
To get MKA Version.byte
getParameterSetType()
Retrieve Type of Parameter Set.EAPOLMkpduBasicParameterSet.SCI
getSci()
To get SCI.short
getTotalLength()
Total length; ie.byte[]
serialize()
Utility function for Serializing Parameter Set.void
setActorMI(byte[] mi)
To set Member Identifier.void
setActorMN(byte[] mn)
To set Member Identifier.void
setActorMN(int mn)
To set Member Identifier.void
setAlgAgility(byte[] algAgility)
To set Algorithm Agility.void
setBodyLength(short length)
To set body length.void
setCKN(byte[] ckn)
To set CAK name.void
setKeyServer(boolean isKeyServer)
To set Key Server.void
setKeyServerPriority(byte priority)
To set Key Server Priority.void
setMacSecCapability(byte capability)
To set MACSec Capacity.void
setMacSecDesired(boolean desired)
To set MACSec Desired.void
setMkaVersion(byte version)
To set MKA Version.void
setPadding(byte[] padding)
To set padding.void
setSci(byte[] sci)
To set SCI.void
setSci(EAPOLMkpduBasicParameterSet.SCI sci)
To set SCI.-
Methods inherited from class org.onlab.packet.BasePacket
clone, equals, getParent, getPayload, hashCode, resetChecksum, setParent, setPayload
-
-
-
-
Field Detail
-
FIELD_ALGAG_LENGTH
public static final int FIELD_ALGAG_LENGTH
- See Also:
- Constant Field Values
-
TOTAL_BPS_BODY_LENGTH
public static final int TOTAL_BPS_BODY_LENGTH
- See Also:
- Constant Field Values
-
KEYSERVER_MASK
public static final byte KEYSERVER_MASK
- See Also:
- Constant Field Values
-
KEYSERVER_OFFSET
public static final byte KEYSERVER_OFFSET
- See Also:
- Constant Field Values
-
MACSEC_DESIRED_MASK
public static final byte MACSEC_DESIRED_MASK
- See Also:
- Constant Field Values
-
MACSEC_DESIRED_OFFSET
public static final byte MACSEC_DESIRED_OFFSET
- See Also:
- Constant Field Values
-
MACSEC_CAPABILITY_MASK
public static final byte MACSEC_CAPABILITY_MASK
- See Also:
- Constant Field Values
-
MACSEC_CAPABILITY_OFFSET
public static final byte MACSEC_CAPABILITY_OFFSET
- See Also:
- Constant Field Values
-
BPS_FIXED_PART_SIZE_UPTO_LENGTH_FIELD
public static final short BPS_FIXED_PART_SIZE_UPTO_LENGTH_FIELD
- See Also:
- Constant Field Values
-
BPS_FIXED_PART_TOTAL_SIZE
public static final short BPS_FIXED_PART_TOTAL_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setMkaVersion
public void setMkaVersion(byte version)
To set MKA Version.- Parameters:
version
- , type byte
-
getMkaVersion
public byte getMkaVersion()
To get MKA Version.- Returns:
- mkaVersion , type byte
-
setKeyServerPriority
public void setKeyServerPriority(byte priority)
To set Key Server Priority.- Parameters:
priority
- , type byte
-
getKeyServerPriority
public byte getKeyServerPriority()
To get Key Server Priority.- Returns:
- keyServerPriority, type byte
-
setKeyServer
public void setKeyServer(boolean isKeyServer)
To set Key Server.- Parameters:
isKeyServer
- , type boolean
-
getKeyServer
public boolean getKeyServer()
To get Key Server.- Returns:
- keyServer, type boolean
-
setMacSecDesired
public void setMacSecDesired(boolean desired)
To set MACSec Desired.- Parameters:
desired
- , type boolean
-
getMacSecDesired
public boolean getMacSecDesired()
To get MACSec Desired.- Returns:
- macSecDesired , type boolean
-
setMacSecCapability
public void setMacSecCapability(byte capability)
To set MACSec Capacity.- Parameters:
capability
- ,type byte
-
getMacSecCapacity
public byte getMacSecCapacity()
To get MACSec Capacity.- Returns:
- capability, type byte
-
setBodyLength
public void setBodyLength(short length)
To set body length.- Parameters:
length
- , type short
-
getBodyLength
public short getBodyLength()
Description copied from interface:EAPOLMkpduParameterSet
Retrieve Body Length field of Parameter Set.- Specified by:
getBodyLength
in interfaceEAPOLMkpduParameterSet
- Returns:
- body length of parameter set.
-
setSci
public void setSci(byte[] sci)
To set SCI.- Parameters:
sci
- , byte[]
-
setSci
public void setSci(EAPOLMkpduBasicParameterSet.SCI sci)
To set SCI.- Parameters:
sci
- , SCI
-
getSci
public EAPOLMkpduBasicParameterSet.SCI getSci()
To get SCI.- Returns:
- sci, type SCI
-
setActorMI
public void setActorMI(byte[] mi) throws java.lang.IllegalArgumentException
To set Member Identifier.- Parameters:
mi
- , type byte[]- Throws:
java.lang.IllegalArgumentException
- if mi is not set.
-
getActorMI
public byte[] getActorMI()
To get Member Identifier.- Returns:
- mi, type byte[]
-
setActorMN
public void setActorMN(byte[] mn) throws java.lang.IllegalArgumentException
To set Member Identifier.- Parameters:
mn
- , type byte[]- Throws:
java.lang.IllegalArgumentException
- if mn is not set.
-
setActorMN
public void setActorMN(int mn)
To set Member Identifier.- Parameters:
mn
- , type int
-
getActorMN
public int getActorMN()
To get Member Identifier.- Returns:
- mn, type int
-
setAlgAgility
public void setAlgAgility(byte[] algAgility) throws java.lang.IllegalArgumentException
To set Algorithm Agility.- Parameters:
algAgility
- , type byte[]- Throws:
java.lang.IllegalArgumentException
- if algAgility is not set or in incorrect format
-
getAlgAgility
public byte[] getAlgAgility()
To get Algorithm Agility.- Returns:
- algAgility, type byte[]
-
setCKN
public void setCKN(byte[] ckn)
To set CAK name.- Parameters:
ckn
- , type byte[]
-
getCKN
public byte[] getCKN()
To get CAK name.- Returns:
- ckn , type byte[]
-
setPadding
public void setPadding(byte[] padding)
To set padding.- Parameters:
padding
- , type byte[]
-
deserializer
public static Deserializer<EAPOLMkpduBasicParameterSet> deserializer()
Deserializer function for Basic Parameter Set.- Returns:
- deserializer function
-
serialize
public byte[] serialize()
Description copied from interface:EAPOLMkpduParameterSet
Utility function for Serializing Parameter Set.- Specified by:
serialize
in interfaceEAPOLMkpduParameterSet
- Specified by:
serialize
in interfaceIPacket
- Returns:
- byte[] value
-
getParameterSetType
public byte getParameterSetType()
Description copied from interface:EAPOLMkpduParameterSet
Retrieve Type of Parameter Set.- Specified by:
getParameterSetType
in interfaceEAPOLMkpduParameterSet
- Returns:
- parameter set type.
-
getTotalLength
public short getTotalLength()
Description copied from interface:EAPOLMkpduParameterSet
Total length; ie. including header and body length.- Specified by:
getTotalLength
in interfaceEAPOLMkpduParameterSet
- Returns:
- short value.
-
-