Class Protocolv20Decoder
java.lang.Object
org.metricshub.ipmi.core.coding.protocol.decoder.ProtocolDecoder
org.metricshub.ipmi.core.coding.protocol.decoder.Protocolv20Decoder
- All Implemented Interfaces:
IpmiDecoder
- Direct Known Subclasses:
PlainCommandv20Decoder
Decodes IPMI v2.0 session header and retrieves encrypted payload.
-
Constructor Summary
ConstructorsConstructorDescriptionProtocolv20Decoder(CipherSuite cipherSuite) Initiates IPMI v2.0 packet decoder. -
Method Summary
Modifier and TypeMethodDescriptiondecode(RmcpMessage rmcpMessage) Decodes IPMI v2.0 message fields.booleandecodeAuthentication(byte payloadType) Decodes second bit of Payload Type.static PayloadTypedecodePayloadType(byte payloadType) static intdecodeSessionID(RmcpMessage message) Decodes session ID.Methods inherited from class org.metricshub.ipmi.core.coding.protocol.decoder.ProtocolDecoder
decodeAuthenticationType
-
Constructor Details
-
Protocolv20Decoder
Initiates IPMI v2.0 packet decoder.- Parameters:
cipherSuite- -CipherSuitethat will be used to decode the message
-
-
Method Details
-
decode
Decodes IPMI v2.0 message fields.- Parameters:
rmcpMessage- - RMCP message to decode.- Returns:
- decoded message
- Throws:
IllegalArgumentException- when delivered RMCP message does not contain encapsulated IPMI message or when AuthCode field is incorrect (integrity check fails).InvalidKeyException- - when initiation of the integrity algorithm fails- See Also:
-
decodeAuthentication
public boolean decodeAuthentication(byte payloadType) Decodes second bit of Payload Type.- Parameters:
payloadType-- Returns:
- True if payload is authenticated, false otherwise.
-
decodePayloadType
-
decodeSessionID
Decodes session ID.- Parameters:
message- - message to get session ID from- Returns:
- Session ID.
-