PcapPlusPlus
|
#include <SSLLayer.h>
Public Member Functions | |
ssl_tls_record_layer * | getRecordLayer () |
SSLVersion | getRecordVersion () |
SSLRecordType | getRecordType () |
size_t | getHeaderLen () |
void | parseNextLayer () |
OsiModelLayer | getOsiModelLayer () |
Public Member Functions inherited from pcpp::Layer | |
virtual | ~Layer () |
Layer * | getNextLayer () |
Layer * | getPrevLayer () |
ProtocolType | getProtocol () |
uint8_t * | getData () |
size_t | getDataLen () |
uint8_t * | getLayerPayload () |
size_t | getLayerPayloadSize () |
bool | isAllocatedToPacket () |
void | copyData (uint8_t *toArr) |
uint8_t * | getDataPtr (size_t offset=0) |
virtual void | computeCalculateFields ()=0 |
virtual std::string | toString ()=0 |
Static Public Member Functions | |
static bool | IsSSLMessage (uint16_t srcPort, uint16_t dstPort, uint8_t *data, size_t dataLen) |
static SSLLayer * | createSSLMessage (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
static std::string | sslVersionToString (SSLVersion ver) |
static const std::map< uint16_t, bool > * | getSSLPortMap () |
The base class for the 4 record type classes. Each record type is represented as a layer. See SSLLayer.h for detailed explanation of the TLS/SSL protocol support in PcapPlusPlus. This class provides the common functionality used by all record types and also contains static methods for identifying an creating SSL/TLS record type layers
|
static |
A static method that creates SSL/TLS layers by raw data. This method parses the raw data, finds if and which SSL/TLS record it is and creates the corresponding record layer. It's the responsibility of the user to free the created object when done using it
[in] | data | A pointer to the raw data |
[in] | dataLen | Size of the data in bytes |
[in] | prevLayer | A pointer to the previous layer |
[in] | packet | A pointer to the Packet instance where layer will be stored in |
|
virtual |
Implements pcpp::Layer.
|
inlinevirtual |
Implements pcpp::Layer.
|
inline |
Get a pointer to the record header. Notice this points directly to the data, so every change will change the actual packet data
SSLRecordType pcpp::SSLLayer::getRecordType | ( | ) |
SSLVersion pcpp::SSLLayer::getRecordVersion | ( | ) |
|
static |
|
static |
A static methods that gets raw data of a layer and checks whether this data is a SSL/TLS record or not. This check is done using the source/dest port and matching of a legal record type in the raw data. The list of ports identified as SSL/TLS is hard-coded and includes the following ports:
[in] | srcPort | The source port of the packet that contains the raw data. Source port (or dest port) are a criteria to identify SSL/TLS packets |
[in] | dstPort | The dest port of the packet that contains the raw data. Dest port (or source port) are a criteria to identify SSL/TLS packets |
[in] | data | The data to check |
[in] | dataLen | Length (in bytes) of the data |
|
virtual |
Several SSL/TLS records can reside in a single packets. So this method checks the remaining data and if it's identified as SSL/TLS it creates another SSL/TLS record layer as the next layer
Implements pcpp::Layer.
|
static |
A static method that converts SSLVersion enum value to string
[in] | ver | The enum value |