PcapPlusPlus  24.09
pcpp::TcpOptionBuilder Class Reference

#include <TcpLayer.h>

Inheritance diagram for pcpp::TcpOptionBuilder:
pcpp::TLVRecordBuilder

Public Types

enum  NopEolOptionTypes : uint8_t { NOP , EOL }
 
enum class  NopEolOptionEnumType : uint8_t { Nop , Eol }
 

Public Member Functions

 PCPP_DEPRECATED ("enum TcpOptionType is deprecated; Use enum class TcpOptionEnumType instead") TcpOptionBuilder(TcpOptionType optionType
 
 TcpOptionBuilder (NopEolOptionEnumType optionType)
 
TcpOption build () const
 

Detailed Description

A class for building TCP option records. This builder receives the TCP option parameters in its c'tor, builds the TCP option raw buffer and provides a build() method to get a TcpOption object out of it

Member Enumeration Documentation

◆ NopEolOptionEnumType

An enum to describe NOP and EOL TCP options. Used in one of this class's c'tors

Enumerator
Nop 

NOP TCP option

Eol 

EOL TCP option

◆ NopEolOptionTypes

An enum to describe NOP and EOL TCP options. Used in one of this class's c'tors

Enumerator
NOP 

NOP TCP option

EOL 

EOL TCP option

Constructor & Destructor Documentation

◆ TcpOptionBuilder()

pcpp::TcpOptionBuilder::TcpOptionBuilder ( NopEolOptionEnumType  optionType)
explicit

A c'tor for building TCP NOP and EOL options. These option types are special in that they contain only 1 byte which is the TCP option type (NOP or EOL). The TcpOption object can be later retrieved by calling build()

Parameters
[in]optionTypeAn enum value indicating which option type to build (NOP or EOL)

Member Function Documentation

◆ build()

TcpOption pcpp::TcpOptionBuilder::build ( ) const

Build the TcpOption object out of the parameters defined in the c'tor

Returns
The TcpOption object

◆ PCPP_DEPRECATED()

pcpp::TcpOptionBuilder::PCPP_DEPRECATED ( "enum TcpOptionType is deprecated; Use enum class TcpOptionEnumType instead"  )
Deprecated:
This method is deprecated, please use constructor with TcpOptionEnumType