Class GetChannelAuthenticationCapabilities

java.lang.Object
org.metricshub.ipmi.core.coding.PayloadCoder
org.metricshub.ipmi.core.coding.commands.IpmiCommandCoder
org.metricshub.ipmi.core.coding.commands.session.GetChannelAuthenticationCapabilities

public class GetChannelAuthenticationCapabilities extends IpmiCommandCoder
Wrapper for Get Channel Authentication Capabilities request
  • Constructor Details

    • GetChannelAuthenticationCapabilities

      public GetChannelAuthenticationCapabilities()
      Initiates class for decoding in 1.5 version. Sets requested privilege level to user. Sets channel number to 14 indicating that response will contain information for channel this request was issued on. Sets session parameters to default.
      See Also:
    • GetChannelAuthenticationCapabilities

      public GetChannelAuthenticationCapabilities(IpmiVersion version, IpmiVersion requestVersion, CipherSuite cipherSuite)
      Initiates class. Sets IPMI version to version. Sets requested privilege level to user. Sets channel number to 14 indicating that response will contain information for channel this request was issued on.
      Parameters:
      version - - Version of IPMI protocol used
      requestVersion - - If Get Channel Authentication Capabilities command is sent to BMC with requestVersion = IpmiVersion.V15 it will respond, that it does not support IPMI v2.0 even if it does.
      cipherSuite - - CipherSuite containing authentication, confidentiality and integrity algorithms for this session.
      See Also:
    • GetChannelAuthenticationCapabilities

      public GetChannelAuthenticationCapabilities(IpmiVersion version, IpmiVersion requestVersion, CipherSuite cipherSuite, PrivilegeLevel privilegeLevel, byte channelNumber)
      Initiates class. Sets IPMI version to version. Sets requested privilege level privilegeLevel. Sets channel number to channelNumber.
      Parameters:
      version - - Version of IPMI protocol used
      requestVersion - - If Get Channel Authentication Capabilities command is sent to BMC with requestVersion = IpmiVersion.V15 it will respond, that it does not support IPMI v2.0 even if it does.
      cipherSuite - - CipherSuite containing authentication, confidentiality and integrity algorithms for this session.
      privilegeLevel - - Maximum requested privilege level. Can't be PrivilegeLevel.MaximumAvailable.
      channelNumber - - must be 0h-Bh or Eh-Fh
      Eh = retrieve information for channel this request was issued on.
      See Also:
  • Method Details

    • setRequestedPrivilegeLevel

      public void setRequestedPrivilegeLevel(PrivilegeLevel requestedPrivilegeLevel)
    • getRequestedPrivilegeLevel

      public PrivilegeLevel getRequestedPrivilegeLevel()
    • setChannelNumber

      public void setChannelNumber(int channelNumber)
      Sets the channel number that will be put into IPMI command.
      Parameters:
      channelNumber - - must be 0h-Bh or Eh-Fh
      Eh = retrieve information for channel this request was issued on
      Throws:
      IllegalArgumentException
    • getChannelNumber

      public int getChannelNumber()
    • encodePayload

      public IpmiMessage encodePayload(int messageSequenceNumber, int sessionSequenceNumber, int sessionId) throws InvalidKeyException, NoSuchAlgorithmException
      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
      Throws:
      InvalidKeyException - - when creating of the algorithm key fails
      NoSuchAlgorithmException - - when authentication, confidentiality or integrity algorithm fails.
    • 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
    • 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:
    • 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.
    • setSessionParameters

      public void setSessionParameters(IpmiVersion version, CipherSuite cipherSuite, AuthenticationType authenticationType)
      Sets session parameters.
      Overrides:
      setSessionParameters in class PayloadCoder
      Parameters:
      version - - IPMI version of the command.
      cipherSuite - - CipherSuite containing authentication, confidentiality and integrity algorithms for this session.
      authenticationType - - Type of authentication used. Must be RMCPPlus for IPMI v2.0.