public class Rakp3 extends IpmiCommandCoder
Constructor and Description |
---|
Rakp3(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.
|
Modifier and Type | Method and Description |
---|---|
IpmiMessage |
encodeCommand(int sequenceNumber,
int sessionId)
Prepares an IPMI request message containing class-specific command
|
byte |
getCommandCode()
Deprecated.
|
int |
getManagedSystemSessionId() |
NetworkFunction |
getNetworkFunction()
Deprecated.
|
ResponseData |
getResponseData(IpmiMessage message)
Retrieves command-specific response data from IPMI message
|
byte |
getStatusCode() |
boolean |
isCommandResponse(IpmiMessage message)
Checks if given message contains response command specific for this
class.
|
void |
setManagedSystemSessionId(int managedSystemSessionId) |
void |
setStatusCode(byte statusCode) |
getAuthenticationType, getCipherSuite, getIpmiVersion, setAuthenticationType, setCipherSuite, setIpmiVersion, setSessionParameters
public Rakp3(CipherSuite cipherSuite, Rakp1 rakp1, Rakp1ResponseData rakp1ResponseData)
IpmiVersion.V20
since RAKP1 is a RMCP+ command. Sets
Authentication Type to RMCP+.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
processpublic Rakp3(byte statusCode, int managedSystemSessionId, CipherSuite cipherSuite, Rakp1 rakp1, Rakp1ResponseData rakp1ResponseData)
IpmiVersion.V20
since RAKP1 is a RMCP+ command. Sets
Authentication Type to RMCP+.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
processpublic void setStatusCode(byte statusCode)
public byte getStatusCode()
public void setManagedSystemSessionId(int managedSystemSessionId)
public int getManagedSystemSessionId()
public IpmiMessage encodeCommand(int sequenceNumber, int sessionId) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
IpmiCommandCoder
encodeCommand
in class IpmiCommandCoder
sequenceNumber
- - A generated sequence number used for matching request and
response. If IPMI message is sent in a session, it is used as
a Session Sequence Number. For all IPMI messages,
sequenceNumber % 256 is used as a IPMI LAN Message sequence
number and as an IPMI payload message tag.sessionId
- - ID of the managed system's session message is being sent in.
For sessionless commands should b set to 0.java.security.NoSuchAlgorithmException
- - when authentication, confidentiality or integrity algorithm
fails.java.security.InvalidKeyException
- - when creating of the algorithm key fails@Deprecated public byte getCommandCode()
IpmiCommandCoder
getCommandCode
in class IpmiCommandCoder
@Deprecated public NetworkFunction getNetworkFunction()
IpmiCommandCoder
getNetworkFunction
in class IpmiCommandCoder
NetworkFunction
public ResponseData getResponseData(IpmiMessage message) throws java.lang.IllegalArgumentException, IPMIException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException
IpmiCommandCoder
getResponseData
in class IpmiCommandCoder
message
- - IPMI messagejava.lang.IllegalArgumentException
- when message is not a response for class-specific command or
response has invalid length.IPMIException
- when response completion code isn't OK.java.security.InvalidKeyException
- when creating of the authentication algorithm key failsjava.security.NoSuchAlgorithmException
- when authentication, confidentiality or integrity algorithm
fails.public boolean isCommandResponse(IpmiMessage message)
IpmiCommandCoder
isCommandResponse
in class IpmiCommandCoder