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 classEAPOLMkpduBasicParameterSet.SCIMKA Secure Channel Identifier.
-
Field Summary
Fields Modifier and Type Field Description static shortBPS_FIXED_PART_SIZE_UPTO_LENGTH_FIELDstatic shortBPS_FIXED_PART_TOTAL_SIZEstatic intFIELD_ALGAG_LENGTHstatic byteKEYSERVER_MASKstatic byteKEYSERVER_OFFSETstatic byteMACSEC_CAPABILITY_MASKstatic byteMACSEC_CAPABILITY_OFFSETstatic byteMACSEC_DESIRED_MASKstatic byteMACSEC_DESIRED_OFFSETstatic intTOTAL_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.intgetActorMN()To get Member Identifier.byte[]getAlgAgility()To get Algorithm Agility.shortgetBodyLength()Retrieve Body Length field of Parameter Set.byte[]getCKN()To get CAK name.booleangetKeyServer()To get Key Server.bytegetKeyServerPriority()To get Key Server Priority.bytegetMacSecCapacity()To get MACSec Capacity.booleangetMacSecDesired()To get MACSec Desired.bytegetMkaVersion()To get MKA Version.bytegetParameterSetType()Retrieve Type of Parameter Set.EAPOLMkpduBasicParameterSet.SCIgetSci()To get SCI.shortgetTotalLength()Total length; ie.byte[]serialize()Utility function for Serializing Parameter Set.voidsetActorMI(byte[] mi)To set Member Identifier.voidsetActorMN(byte[] mn)To set Member Identifier.voidsetActorMN(int mn)To set Member Identifier.voidsetAlgAgility(byte[] algAgility)To set Algorithm Agility.voidsetBodyLength(short length)To set body length.voidsetCKN(byte[] ckn)To set CAK name.voidsetKeyServer(boolean isKeyServer)To set Key Server.voidsetKeyServerPriority(byte priority)To set Key Server Priority.voidsetMacSecCapability(byte capability)To set MACSec Capacity.voidsetMacSecDesired(boolean desired)To set MACSec Desired.voidsetMkaVersion(byte version)To set MKA Version.voidsetPadding(byte[] padding)To set padding.voidsetSci(byte[] sci)To set SCI.voidsetSci(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:EAPOLMkpduParameterSetRetrieve Body Length field of Parameter Set.- Specified by:
getBodyLengthin 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 IllegalArgumentExceptionTo set Member Identifier.- Parameters:
mi- , type byte[]- Throws:
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 IllegalArgumentExceptionTo set Member Identifier.- Parameters:
mn- , type byte[]- Throws:
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 IllegalArgumentExceptionTo set Algorithm Agility.- Parameters:
algAgility- , type byte[]- Throws:
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:EAPOLMkpduParameterSetUtility function for Serializing Parameter Set.- Specified by:
serializein interfaceEAPOLMkpduParameterSet- Specified by:
serializein interfaceIPacket- Returns:
- byte[] value
-
getParameterSetType
public byte getParameterSetType()
Description copied from interface:EAPOLMkpduParameterSetRetrieve Type of Parameter Set.- Specified by:
getParameterSetTypein interfaceEAPOLMkpduParameterSet- Returns:
- parameter set type.
-
getTotalLength
public short getTotalLength()
Description copied from interface:EAPOLMkpduParameterSetTotal length; ie. including header and body length.- Specified by:
getTotalLengthin interfaceEAPOLMkpduParameterSet- Returns:
- short value.
-
-