Class OpenSession
java.lang.Object
org.metricshub.ipmi.core.coding.PayloadCoder
org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder
org.metricshub.ipmi.core.coding.commands.session.OpenSession
Wrapper class for RMCP+ Open Session request.
-
Constructor Summary
ConstructorsConstructorDescriptionOpenSession(int sessionID, PrivilegeLevel privilegeLevel, CipherSuite cipherSuite) Initiates class for encoding and decoding.OpenSession(CipherSuite cipherSuite) 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 classRetrieves network function specific for command represented by this class.getResponseData(IpmiMessage message) Retrieves payload-specific response data from IPMI messageintvoidsetRequestedPrivilegeLevel(PrivilegeLevel requestedPrivilegeLevel) voidsetSessionID(int sessionID) Methods inherited from class org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder
getSupportedPayloadType, isCommandResponseMethods inherited from class org.metricshub.ipmi.core.coding.PayloadCoder
getAuthenticationType, getCipherSuite, getIpmiVersion, setAuthenticationType, setCipherSuite, setIpmiVersion, setSessionParameters
-
Constructor Details
-
OpenSession
Initiates class for decoding. Sets IPMI version toIpmiVersion.V20since OpenSession is a RMCP+ command. Sets authentication type to RMCP+.- Parameters:
cipherSuite- -CipherSuitecontaining authentication, confidentiality and integrity algorithms for this session. Cipher Suite might (and probably will be, because at this point of session creation SIK is not yet known) be not initialized.- See Also:
-
OpenSession
Initiates class for encoding and decoding. Sets IPMI version toIpmiVersion.V20since OpenSession is a RMCP+ command. Sets authentication type to RMCP+.- Parameters:
sessionID- - Session ID selected by the remote console.privilegeLevel- - Requested privilege level for the session. Can bePrivilegeLevel.MaximumAvailable.cipherSuite- -CipherSuitecontaining authentication, confidentiality and integrity algorithms for this session. Cipher Suite might (and probably will be, because at this point of session creation SIK is not yet known) be not initialized.- See Also:
-
-
Method Details
-
setRequestedPrivilegeLevel
-
getRequestedPrivilegeLevel
-
setSessionID
public void setSessionID(int sessionID) -
getSessionID
public int getSessionID() -
encodePayload
public IpmiMessage encodePayload(int messageSequenceNumber, int sessionSequenceNumber, int sessionId) 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
-
getNetworkFunction
Description copied from class:IpmiCommandCoderRetrieves network function specific for command represented by this class.- Specified by:
getNetworkFunctionin classIpmiCommandCoder- Returns:
- network function
- See Also:
-
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
-
getResponseData
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.
-