PcapPlusPlus  19.12
pcpp::SSLAlertLayer Class Reference

#include <SSLLayer.h>

Inheritance diagram for pcpp::SSLAlertLayer:
pcpp::SSLLayer pcpp::Layer pcpp::IDataContainer

Public Member Functions

 SSLAlertLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
SSLAlertLevel getAlertLevel () const
 
SSLAlertDescription getAlertDescription ()
 
std::string toString () const
 
void computeCalculateFields ()
 
- Public Member Functions inherited from pcpp::SSLLayer
ssl_tls_record_layergetRecordLayer () const
 
SSLVersion getRecordVersion () const
 
SSLRecordType getRecordType () const
 
size_t getHeaderLen () const
 
void parseNextLayer ()
 
OsiModelLayer getOsiModelLayer () const
 
- Public Member Functions inherited from pcpp::Layer
virtual ~Layer ()
 
LayergetNextLayer () const
 
LayergetPrevLayer () const
 
ProtocolType getProtocol () const
 
uint8_t * getData () const
 
size_t getDataLen () const
 
uint8_t * getLayerPayload () const
 
size_t getLayerPayloadSize () const
 
bool isAllocatedToPacket () const
 
void copyData (uint8_t *toArr) const
 
uint8_t * getDataPtr (size_t offset=0) const
 

Additional Inherited Members

- Static Public Member Functions inherited from pcpp::SSLLayer
static bool isSSLPort (uint16_t port)
 
static bool IsSSLMessage (uint16_t srcPort, uint16_t dstPort, uint8_t *data, size_t dataLen)
 
static SSLLayercreateSSLMessage (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
static std::string sslVersionToString (SSLVersion ver)
 

Detailed Description

Represents SSL/TLS alert layer. Inherits from SSLLayer and adds parsing functionality such as retrieving the alert level and description

Constructor & Destructor Documentation

◆ SSLAlertLayer()

pcpp::SSLAlertLayer::SSLAlertLayer ( uint8_t *  data,
size_t  dataLen,
Layer prevLayer,
Packet packet 
)
inline

C'tor for this class that creates the layer from an existing packet raw data

Parameters
[in]dataA pointer to the raw data
[in]dataLenSize of the data in bytes
[in]prevLayerA pointer to the previous layer
[in]packetA pointer to the Packet instance where layer will be stored in

Member Function Documentation

◆ computeCalculateFields()

void pcpp::SSLAlertLayer::computeCalculateFields ( )
inlinevirtual

There are no calculated fields for this layer

Implements pcpp::Layer.

◆ getAlertDescription()

SSLAlertDescription pcpp::SSLAlertLayer::getAlertDescription ( )
Returns
SSL/TLS alert description. Will return SSL_ALERT_ENCRYPRED if alert is encrypted

◆ getAlertLevel()

SSLAlertLevel pcpp::SSLAlertLayer::getAlertLevel ( ) const
Returns
SSL/TLS alert level. Will return SSL_ALERT_LEVEL_ENCRYPTED if alert is encrypted

◆ toString()

std::string pcpp::SSLAlertLayer::toString ( ) const
virtual
Returns
A string representation of the layer most important data (should look like the layer description in Wireshark)

Implements pcpp::Layer.