PcapPlusPlus  21.05+
pcpp::tcphdr Struct Reference

#include <TcpLayer.h>

Public Attributes

uint16_t portSrc
uint16_t portDst
uint32_t sequenceNumber
uint32_t ackNumber
uint16_t dataOffset:4
uint16_t finFlag:1
uint16_t synFlag:1
uint16_t rstFlag:1
uint16_t pshFlag:1
uint16_t ackFlag:1
uint16_t urgFlag:1
uint16_t eceFlag:1
uint16_t cwrFlag:1
uint16_t windowSize
uint16_t headerChecksum
uint16_t urgentPointer

Detailed Description

Represents an TCP protocol header

Member Data Documentation

◆ ackFlag

uint16_t pcpp::tcphdr::ackFlag

ACK flag

◆ ackNumber

uint32_t pcpp::tcphdr::ackNumber

Acknowledgment number

◆ cwrFlag

uint16_t pcpp::tcphdr::cwrFlag

CWR flag

◆ dataOffset

uint16_t pcpp::tcphdr::dataOffset

Specifies the size of the TCP header in 32-bit words

◆ eceFlag

uint16_t pcpp::tcphdr::eceFlag

ECE flag

◆ finFlag

uint16_t pcpp::tcphdr::finFlag

FIN flag

◆ headerChecksum

uint16_t pcpp::tcphdr::headerChecksum

The 16-bit checksum field is used for error-checking of the header and data

◆ portDst

uint16_t pcpp::tcphdr::portDst

Destination TCP port

◆ portSrc

uint16_t pcpp::tcphdr::portSrc

Source TCP port

◆ pshFlag

uint16_t pcpp::tcphdr::pshFlag

PSH flag

◆ rstFlag

uint16_t pcpp::tcphdr::rstFlag

RST flag

◆ sequenceNumber

uint32_t pcpp::tcphdr::sequenceNumber

Sequence number

◆ synFlag

uint16_t pcpp::tcphdr::synFlag

SYN flag

◆ urgentPointer

uint16_t pcpp::tcphdr::urgentPointer

If the URG flag (tcphdr::urgFlag) is set, then this 16-bit field is an offset from the sequence number indicating the last urgent data byte

◆ urgFlag

uint16_t pcpp::tcphdr::urgFlag

URG flag

◆ windowSize

uint16_t pcpp::tcphdr::windowSize

The size of the receive window, which specifies the number of window size units (by default, bytes)