PcapPlusPlus  Next
pcpp::QuicV1RetryLayer Class Reference

#include <QuicLayer.h>

Inheritance diagram for pcpp::QuicV1RetryLayer:
pcpp::QuicV1LongHeaderLayer pcpp::QuicV1Layer pcpp::Layer pcpp::IDataContainer

Public Member Functions

std::vector< uint8_t > getRetryToken () const
 
std::string getRetryTokenAsString () const
 
std::vector< uint8_t > getRetryIntegrityTag () const
 
std::string getRetryIntegrityTagAsString () const
 
size_t getHeaderLen () const override
 
- Public Member Functions inherited from pcpp::QuicV1LongHeaderLayer
QuicPacketType getPacketType () const override
 
uint32_t getVersion () const
 
std::vector< uint8_t > getDestinationConnectionId () const
 
std::string getDestinationConnectionIdAsString () const
 
std::vector< uint8_t > getSourceConnectionId () const
 
std::string getSourceConnectionIdAsString () const
 
- Public Member Functions inherited from pcpp::QuicV1Layer
QuicHeaderForm getHeaderForm () const
 
uint8_t getFixedBit () const
 
void parseNextLayer () override
 
void computeCalculateFields () override
 Does nothing for this layer.
 
std::string toString () const override
 
OsiModelLayer getOsiModelLayer () const override
 
- Public Member Functions inherited from pcpp::Layer
 ~Layer () override
 
LayergetNextLayer () const
 
LayergetPrevLayer () const
 
ProtocolType getProtocol () const
 
bool isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) 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
 Copy the raw data of this layer to another array. More...
 
size_t copyData (uint8_t *dest, size_t destSize) const
 Copy the raw data of this layer to another array, with a specified maximum size. More...
 
uint8_t * getDataPtr (size_t offset=0) const override
 

Additional Inherited Members

- Public Types inherited from pcpp::QuicV1Layer
enum class  QuicPacketType : uint8_t {
  Initial = 0 , ZeroRTT = 1 , Handshake = 2 , Retry = 3 ,
  VersionNegotiation = 253 , OneRtt = 254
}
 
enum class  QuicHeaderForm : uint8_t { ShortHeader = 0 , LongHeader = 1 }
 
- Static Public Member Functions inherited from pcpp::QuicV1Layer
static QuicV1LayerparseQuicLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet)
 
static bool isQuicPort (uint16_t port)
 
- Protected Member Functions inherited from pcpp::Layer
PacketgetAttachedPacket ()
 Get a pointer to the Packet this layer is attached to (if any). More...
 
Packet const * getAttachedPacket () const
 Get a pointer to the Packet this layer is attached to (if any). More...
 
void allocData (size_t dataLen, bool zeroInit=true)
 Requests the layer to allocate a new data buffer of the specified length. More...
 
template<typename T , typename... Args>
LayerconstructNextLayer (uint8_t *data, size_t dataLen, Args &&... extraArgs)
 Construct the next layer in the protocol stack. No validation is performed on the data. More...
 
template<typename T , typename... Args>
LayerconstructNextLayer (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs)
 
template<typename TFactory , typename... Args>
LayerconstructNextLayerFromFactory (TFactory factoryFn, uint8_t *data, size_t dataLen, Args &&... extraArgs)
 Construct the next layer in the protocol stack using a factory functor. More...
 
template<typename TFactory , typename... Args>
LayerconstructNextLayerFromFactory (TFactory factoryFn, uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs)
 Construct the next layer in the protocol stack using a factory functor. More...
 
template<typename T , typename... Args>
LayertryConstructNextLayer (uint8_t *data, size_t dataLen, Args &&... extraArgs)
 
template<typename T , typename... Args>
LayertryConstructNextLayer (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs)
 
template<typename T , typename TFallback , typename... Args>
LayertryConstructNextLayerWithFallback (uint8_t *data, size_t dataLen, Args &&... extraArgs)
 Try to construct the next layer in the protocol stack with a fallback option. More...
 
template<typename T , typename TFallback , typename... Args>
LayertryConstructNextLayerWithFallback (uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs)
 
template<typename TFallback , typename TFactory , typename... Args>
LayertryConstructNextLayerFromFactoryWithFallback (TFactory factoryFn, uint8_t *data, size_t dataLen, Args &&... extraArgs)
 Try to construct the next layer in the protocol stack using a factory functor with a fallback option. More...
 
template<typename TFallback , typename TFactory , typename... Args>
LayertryConstructNextLayerFromFactoryWithFallback (TFactory factoryFn, uint8_t *data, size_t dataLen, Packet *packet, Args &&... extraArgs)
 Try to construct the next layer in the protocol stack using a factory functor with a fallback option. More...
 
- Static Protected Member Functions inherited from pcpp::Layer
template<typename T >
static bool canReinterpretAs (const uint8_t *data, size_t dataLen)
 Check if the data is large enough to reinterpret as a type. More...
 

Detailed Description

Represents a QUIC v1 Retry packet - sent by a server to perform address validation before committing state to a connection (RFC 9000 Section 17.2.5). Carries a Retry Token and, unlike the other long-header forms, a fixed-size 16-byte integrity tag rather than a varint-prefixed Length field

Member Function Documentation

◆ getHeaderLen()

size_t pcpp::QuicV1RetryLayer::getHeaderLen ( ) const
inlineoverridevirtual
Returns
sizeof(m_DataLen) - a Retry packet has no Length field, so its header is considered to span the entire packet

Implements pcpp::Layer.

◆ getRetryIntegrityTag()

std::vector<uint8_t> pcpp::QuicV1RetryLayer::getRetryIntegrityTag ( ) const
Returns
The 16-byte Retry Integrity Tag, or an empty vector if the packet doesn't contain enough data - beyond the Source Connection ID - to hold it

◆ getRetryIntegrityTagAsString()

std::string pcpp::QuicV1RetryLayer::getRetryIntegrityTagAsString ( ) const
Returns
The 16-byte Retry Integrity Tag as hex string, or an empty string if the packet doesn't contain enough data - beyond the Source Connection ID - to hold it

◆ getRetryToken()

std::vector<uint8_t> pcpp::QuicV1RetryLayer::getRetryToken ( ) const
Returns
The Retry Token, or an empty vector if the packet doesn't contain enough data - beyond the Source Connection ID - to also hold the 16-byte integrity tag

◆ getRetryTokenAsString()

std::string pcpp::QuicV1RetryLayer::getRetryTokenAsString ( ) const
Returns
The Retry Token as hex string, or an empty string if the packet doesn't contain enough data - beyond the Source Connection ID - to also hold the 16-byte integrity tag