pcpp::SSLUnknownMessage Class Reference

#include <SSLHandshake.h>

Inheritance diagram for pcpp::SSLUnknownMessage:

Public Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from pcpp::SSLHandshakeMessage
static SSLHandshakeMessagecreateHandhakeMessage (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

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

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

[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

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

Reimplemented from pcpp::SSLHandshakeMessage.

size_t pcpp::SSLUnknownMessage::getMessageLength ( )
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.

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

Implements pcpp::SSLHandshakeMessage.