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.byte
Retrieves 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 messageint
void
setRequestedPrivilegeLevel
(PrivilegeLevel requestedPrivilegeLevel) void
setSessionID
(int sessionID) Methods inherited from class org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder
getSupportedPayloadType, isCommandResponse
Methods 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.V20
since OpenSession is a RMCP+ command. Sets authentication type to RMCP+.- Parameters:
cipherSuite
- -CipherSuite
containing 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.V20
since 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
- -CipherSuite
containing 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: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
-
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:
-
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
-
getResponseData
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.
-