PcapPlusPlus  20.08+
pcpp::SSHEncryptedMessage Class Reference

#include <SSHLayer.h>

Inheritance diagram for pcpp::SSHEncryptedMessage:
pcpp::SSHLayer pcpp::Layer pcpp::IDataContainer

Public Member Functions

 SSHEncryptedMessage (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
size_t getHeaderLen () const
std::string toString () const
- Public Member Functions inherited from pcpp::SSHLayer
void parseNextLayer ()
void computeCalculateFields ()
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::SSHLayer
static SSHLayercreateSSHMessage (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
static bool isSSHPort (uint16_t portSrc, uint16_t portDst)

Detailed Description

A class representing an SSH encrypted message. In such messages there is very little information to extract from the packet, hence this class doesn't expose any methods or getters, other than the ones inherited from parent classes.

It is assumed that any SSH message which does not fit to any of the other SSH message types, according to the heuristics described in the SSHLayer.h file description, is considered as an encrypted message.

Constructor & Destructor Documentation

◆ SSHEncryptedMessage()

pcpp::SSHEncryptedMessage::SSHEncryptedMessage ( uint8_t *  data,
size_t  dataLen,
Layer prevLayer,
Packet packet 

A c'tor for this class that accepts raw message data. Please avoid using it as it's used internally when parsing SSH messagess in SSHLayer::createSSHMessage()

Member Function Documentation

◆ getHeaderLen()

size_t pcpp::SSHEncryptedMessage::getHeaderLen ( ) const
The size of the message which is equal to the size of the layer

Implements pcpp::Layer.

◆ toString()

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

Implements pcpp::Layer.