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.byte
Retrieves command code specific for command represented by this classint
Retrieves network function specific for command represented by this class.getResponseData
(IpmiMessage message) Retrieves payload-specific response data from IPMI messagebyte
boolean
isCommandResponse
(IpmiMessage message) Checks if given message contains response command specific for this class.void
setManagedSystemSessionId
(int managedSystemSessionId) void
setStatusCode
(byte statusCode) Methods inherited from class org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder
getSupportedPayloadType
Methods 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.V20
since RAKP1 is a RMCP+ command. Sets Authentication Type to RMCP+.- Parameters:
cipherSuite
- -CipherSuite
containing 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.V20
since 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
- -CipherSuite
containing 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:PayloadCoder
Prepares an IPMI request message containing class-specific payload.- Overrides:
encodePayload
in 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:IpmiCommandCoder
Retrieves command code specific for command represented by this class- Specified by:
getCommandCode
in classIpmiCommandCoder
- Returns:
- command code
-
getNetworkFunction
Description copied from class:IpmiCommandCoder
Retrieves network function specific for command represented by this class.- Specified by:
getNetworkFunction
in classIpmiCommandCoder
- Returns:
- network function
- See Also:
-
getResponseData
public ResponseData getResponseData(IpmiMessage message) throws IPMIException, InvalidKeyException, NoSuchAlgorithmException Description copied from class:PayloadCoder
Retrieves payload-specific response data from IPMI message- Specified by:
getResponseData
in 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:IpmiCommandCoder
Checks if given message contains response command specific for this class.- Overrides:
isCommandResponse
in classIpmiCommandCoder
- Parameters:
message
-IpmiMessage
wrapping the IPMI message- Returns:
- True if message contains response command specific for this class, false otherwise.
-