PcapPlusPlus  19.12
pcpp::TcpStreamData Class Reference

#include <TcpReassembly.h>

Public Member Functions

 TcpStreamData (const uint8_t *tcpData, size_t tcpDataLength, const ConnectionData &connData)
 
const uint8_t * getData () const
 
size_t getDataLength () const
 
const ConnectionDatagetConnectionData () const
 

Detailed Description

When following a TCP connection each packet may contain a piece of the data transferred between the client and the server. This class represents these pieces: each instance of it contains a piece of data, usually extracted from a single packet, as well as information about the connection

Constructor & Destructor Documentation

◆ TcpStreamData()

pcpp::TcpStreamData::TcpStreamData ( const uint8_t *  tcpData,
size_t  tcpDataLength,
const ConnectionData connData 
)
inline

A c'tor for this class that get data from outside and set the internal members

Parameters
[in]tcpDataA pointer to buffer containing the TCP data piece
[in]tcpDataLengthThe length of the buffer
[in]connDataTCP connection information for this TCP data

Member Function Documentation

◆ getConnectionData()

const ConnectionData& pcpp::TcpStreamData::getConnectionData ( ) const
inline

A getter for the connection data

Returns
The const reference to connection data

◆ getData()

const uint8_t* pcpp::TcpStreamData::getData ( ) const
inline

A getter for the data buffer

Returns
A pointer to the buffer

◆ getDataLength()

size_t pcpp::TcpStreamData::getDataLength ( ) const
inline

A getter for buffer length

Returns
Buffer length