PcapPlusPlus  24.09
pcpp::SSLUnknownMessage Class Reference

#include <SSLHandshake.h>

Inheritance diagram for pcpp::SSLUnknownMessage:
pcpp::SSLHandshakeMessage

Public Member Functions

 SSLUnknownMessage (uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
 
SSLHandshakeType getHandshakeType () const
 
size_t getMessageLength () const
 
std::string toString () const
 
- Public Member Functions inherited from pcpp::SSLHandshakeMessage
virtual bool isMessageComplete () const
 
SSLHandshakeLayergetContainingLayer () const
 

Additional Inherited Members

- Static Public Member Functions inherited from pcpp::SSLHandshakeMessage
static SSLHandshakeMessagecreateHandshakeMessage (uint8_t *data, size_t dataLen, SSLHandshakeLayer *container)
 

Detailed Description

Represents an unknown type of message or an encrypted message that PcapPlusPlus can't determine its type. In these cases length can't always be determined from the message itself (especially if the message is encrypted), so the length of this message will always be the size counted from message start until the end of the layer

Constructor & Destructor Documentation

◆ SSLUnknownMessage()

pcpp::SSLUnknownMessage::SSLUnknownMessage ( uint8_t *  data,
size_t  dataLen,
SSLHandshakeLayer container 
)
inline

C'tor for this class. Currently only in use in SSLHandshakeMessage::createHandshakeMessage() and should be used by a user

Parameters
[in]dataThe message as raw data
[in]dataLenMessage raw data length in bytes
[in]containerThe SSL handshake layer which shall contain this message

Member Function Documentation

◆ getHandshakeType()

SSLHandshakeType pcpp::SSLUnknownMessage::getHandshakeType ( ) const
virtual
Returns
Always SSL_HANDSHAKE_UNKNOWN (overridden from SSLHandshakeMessage)

Reimplemented from pcpp::SSLHandshakeMessage.

◆ getMessageLength()

size_t pcpp::SSLUnknownMessage::getMessageLength ( ) const
virtual
Returns
The length of the data from message start until the end of the layer. Since it's an unknown type or an encrypted message the length parsed from the message can't be guaranteed to be the correct length. That's why the length returned is the size until the end of the layer

Reimplemented from pcpp::SSLHandshakeMessage.

◆ toString()

std::string pcpp::SSLUnknownMessage::toString ( ) const
virtual
Returns
A string representation of the message type (e.g "Client Hello message")

Implements pcpp::SSLHandshakeMessage.