public class OpenSession extends IpmiCommandCoder
Wrapper class for RMCP+ Open Session request.
  • Constructor Details

    • OpenSession

      public OpenSession(CipherSuite cipherSuite)
      Initiates class for decoding. Sets IPMI version to IpmiVersion.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

      public OpenSession(int sessionID, PrivilegeLevel privilegeLevel, CipherSuite cipherSuite)
      Initiates class for encoding and decoding. Sets IPMI version to IpmiVersion.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 be PrivilegeLevel.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

      public void setRequestedPrivilegeLevel(PrivilegeLevel requestedPrivilegeLevel)
    • getRequestedPrivilegeLevel

      public PrivilegeLevel 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 class PayloadCoder
      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 Number
      sessionId - - ID of the managed system's session message is being sent in. For sessionless commands should b set to 0.
      Returns:
      IPMI message
    • getNetworkFunction

      public NetworkFunction getNetworkFunction()
      Description copied from class: IpmiCommandCoder
      Retrieves network function specific for command represented by this class.
      Specified by:
      getNetworkFunction in class IpmiCommandCoder
      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 class IpmiCommandCoder
      Returns:
      command code
    • getResponseData

      public ResponseData getResponseData(IpmiMessage message) throws IPMIException
      Description copied from class: PayloadCoder
      Retrieves payload-specific response data from IPMI message
      Specified by:
      getResponseData in class PayloadCoder
      Parameters:
      message - - IPMI message
      Returns:
      response data
      Throws:
      IPMIException - when response completion code isn't OK.