Class Rakp3
java.lang.Object
org.metricshub.ipmi.core.coding.PayloadCoder
org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder
org.metricshub.ipmi.core.coding.commands.session.Rakp3
A wrapper for RMCP+ RAKP3 message and it's response - RAKP4 message.
-
Constructor Summary
ConstructorsConstructorDescriptionRakp3(byte statusCode, int managedSystemSessionId, CipherSuite cipherSuite, Rakp1 rakp1, Rakp1ResponseData rakp1ResponseData) Initiates class for encoding and decoding.Rakp3(CipherSuite cipherSuite, Rakp1 rakp1, Rakp1ResponseData rakp1ResponseData) Initiates class for decoding. -
Method Summary
Modifier and TypeMethodDescriptionencodePayload(int messageSequenceNumber, int sessionSequenceNumber, int sessionId) Prepares an IPMI request message containing class-specific payload.byteRetrieves command code specific for command represented by this classintRetrieves network function specific for command represented by this class.getResponseData(IpmiMessage message) Retrieves payload-specific response data from IPMI messagebytebooleanisCommandResponse(IpmiMessage message) Checks if given message contains response command specific for this class.voidsetManagedSystemSessionId(int managedSystemSessionId) voidsetStatusCode(byte statusCode) Methods inherited from class org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder
getSupportedPayloadTypeMethods inherited from class org.metricshub.ipmi.core.coding.PayloadCoder
getAuthenticationType, getCipherSuite, getIpmiVersion, setAuthenticationType, setCipherSuite, setIpmiVersion, setSessionParameters
-
Constructor Details
-
Rakp3
Initiates class for decoding. Sets IPMI version toIpmiVersion.V20since RAKP1 is a RMCP+ command. Sets Authentication Type to RMCP+.- Parameters:
cipherSuite- -CipherSuitecontaining authentication, confidentiality and integrity algorithms for this session. Only authentication algorithm is used at this point of creating a session.rakp1- - RAKP Message 1 sent earlier in the authentification processrakp1ResponseData- - RAKP Message 2 received earlier in the authentification process
-
Rakp3
public Rakp3(byte statusCode, int managedSystemSessionId, CipherSuite cipherSuite, Rakp1 rakp1, Rakp1ResponseData rakp1ResponseData) Initiates class for encoding and decoding. Sets IPMI version toIpmiVersion.V20since RAKP1 is a RMCP+ command. Sets Authentication Type to RMCP+.- Parameters:
statusCode- - Status of the previous message.managedSystemSessionId- - The Managed System�s Session ID for this session. Must be as returned by the Managed System in the Open Session Response message.cipherSuite- -CipherSuitecontaining authentication, confidentiality and integrity algorithms for this session. Only authentication algorithm is used at this point of creating a session.rakp1- - RAKP Message 1 sent earlier in the authentification processrakp1ResponseData- - RAKP Message 2 received earlier in the authentification process
-
-
Method Details
-
setStatusCode
public void setStatusCode(byte statusCode) -
getStatusCode
public byte getStatusCode() -
setManagedSystemSessionId
public void setManagedSystemSessionId(int managedSystemSessionId) -
getManagedSystemSessionId
public int getManagedSystemSessionId() -
encodePayload
public IpmiMessage encodePayload(int messageSequenceNumber, int sessionSequenceNumber, int sessionId) throws NoSuchAlgorithmException, InvalidKeyException Description copied from class:PayloadCoderPrepares an IPMI request message containing class-specific payload.- Overrides:
encodePayloadin classPayloadCoder- Parameters:
messageSequenceNumber- - A generated sequence number used for matching request and response. For all IPMI messages, messageSequenceNumber is used as a IPMI LAN Message sequence number and as an IPMI payload message tag.sessionSequenceNumber- - If IPMI message is sent in a session, it is used as a Session Sequence NumbersessionId- - ID of the managed system's session message is being sent in. For sessionless commands should b set to 0.- Returns:
- IPMI message
- Throws:
NoSuchAlgorithmException- - when authentication, confidentiality or integrity algorithm fails.InvalidKeyException- - when creating of the algorithm key fails
-
getCommandCode
public byte getCommandCode()Description copied from class:IpmiCommandCoderRetrieves command code specific for command represented by this class- Specified by:
getCommandCodein classIpmiCommandCoder- Returns:
- command code
-
getNetworkFunction
Description copied from class:IpmiCommandCoderRetrieves network function specific for command represented by this class.- Specified by:
getNetworkFunctionin classIpmiCommandCoder- Returns:
- network function
- See Also:
-
getResponseData
public ResponseData getResponseData(IpmiMessage message) throws IPMIException, InvalidKeyException, NoSuchAlgorithmException Description copied from class:PayloadCoderRetrieves payload-specific response data from IPMI message- Specified by:
getResponseDatain classPayloadCoder- Parameters:
message- - IPMI message- Returns:
- response data
- Throws:
IPMIException- when response completion code isn't OK.InvalidKeyException- when creating of the authentication algorithm key failsNoSuchAlgorithmException- when authentication, confidentiality or integrity algorithm fails.
-
isCommandResponse
Description copied from class:IpmiCommandCoderChecks if given message contains response command specific for this class.- Overrides:
isCommandResponsein classIpmiCommandCoder- Parameters:
message-IpmiMessagewrapping the IPMI message- Returns:
- True if message contains response command specific for this class, false otherwise.
-