public class OpenSession extends IpmiCommandCoder
Constructor and Description |
---|
OpenSession(CipherSuite cipherSuite)
Initiates class for decoding.
|
OpenSession(int sessionID,
PrivilegeLevel privilegeLevel,
CipherSuite cipherSuite)
Initiates class for encoding and 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.
|
NetworkFunction |
getNetworkFunction()
Deprecated.
|
PrivilegeLevel |
getRequestedPrivilegeLevel() |
ResponseData |
getResponseData(IpmiMessage message)
Retrieves command-specific response data from IPMI message
|
int |
getSessionID() |
void |
setRequestedPrivilegeLevel(PrivilegeLevel requestedPrivilegeLevel) |
void |
setSessionID(int sessionID) |
getAuthenticationType, getCipherSuite, getIpmiVersion, isCommandResponse, setAuthenticationType, setCipherSuite, setIpmiVersion, setSessionParameters
public OpenSession(CipherSuite cipherSuite)
IpmiVersion.V20
since OpenSession is a RMCP+ command. Sets
authentication type to RMCP+.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.IpmiVersion
public OpenSession(int sessionID, PrivilegeLevel privilegeLevel, CipherSuite cipherSuite)
IpmiVersion.V20
since OpenSession is a RMCP+ command. Sets
authentication type to RMCP+.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.IpmiVersion
,
CipherSuite
,
AuthenticationAlgorithm
,
IntegrityAlgorithm
,
ConfidentialityAlgorithm
public void setRequestedPrivilegeLevel(PrivilegeLevel requestedPrivilegeLevel)
public PrivilegeLevel getRequestedPrivilegeLevel()
public void setSessionID(int sessionID)
public int getSessionID()
public IpmiMessage encodeCommand(int sequenceNumber, int sessionId)
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.@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
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.