PcapPlusPlus
pcpp::SSLExtension Class Reference

#include <SSLHandshake.h>

Inheritance diagram for pcpp::SSLExtension:
pcpp::SSLServerNameIndicationExtension

Classes

struct  SSLExtensionStruct
 

Public Member Functions

 SSLExtension (uint8_t *data)
 
SSLExtensionType getType ()
 
uint16_t getTypeAsInt ()
 
uint16_t getLength ()
 
uint16_t getTotalLength ()
 
uint8_t * getData ()
 

Detailed Description

Represents a SSL/TLS extension. This is a base class that can represent any type of extension. Inherited classes may contain parsing logic for specific extensions. This class provides capabilities such as getting the extension type, length and viewing the extension data as raw (byte array)

Constructor & Destructor Documentation

◆ SSLExtension()

pcpp::SSLExtension::SSLExtension ( uint8_t *  data)

C'tor for this class

Parameters
[in]dataThe raw data for the extension

Member Function Documentation

◆ getData()

uint8_t* pcpp::SSLExtension::getData ( )
Returns
A pointer to the raw data of the extension

◆ getLength()

uint16_t pcpp::SSLExtension::getLength ( )
Returns
The length of the extension data in bytes (not including the type and length fields)

◆ getTotalLength()

uint16_t pcpp::SSLExtension::getTotalLength ( )
Returns
The total length of the extension, including type and length fields and the extension data field

◆ getType()

SSLExtensionType pcpp::SSLExtension::getType ( )
Returns
The type of the extension as enum

◆ getTypeAsInt()

uint16_t pcpp::SSLExtension::getTypeAsInt ( )
Returns
The type of the extension as a numeric value