|
PcapPlusPlus
19.12
|
Go to the documentation of this file. 1 #ifndef PACKETPP_TCP_LAYER
2 #define PACKETPP_TCP_LAYER
31 #if (BYTE_ORDER == LITTLE_ENDIAN)
51 #elif (BYTE_ORDER == BIG_ENDIAN)
72 #error "Endian is not LE nor BE..."
144 #define PCPP_TCPOLEN_NOP 1
146 #define PCPP_TCPOLEN_EOL 1
148 #define PCPP_TCPOLEN_MSS 4
150 #define PCPP_TCPOLEN_WINDOW 3
152 #define PCPP_TCPOLEN_SACK_PERM 2
154 #define PCPP_TCPOLEN_SACK_MIN 2
156 #define PCPP_TCPOLEN_ECHO 6
158 #define PCPP_TCPOLEN_ECHOREPLY 6
160 #define PCPP_TCPOLEN_TIMESTAMP 10
162 #define PCPP_TCPOLEN_CC 6
164 #define PCPP_TCPOLEN_CCNEW 6
166 #define PCPP_TCPOLEN_CCECHO 6
168 #define PCPP_TCPOLEN_MD5 18
170 #define PCPP_TCPOLEN_MPTCP_MIN 8
172 #define PCPP_TCPOLEN_SCPS 4
174 #define PCPP_TCPOLEN_SNACK 6
176 #define PCPP_TCPOLEN_RECBOUND 2
178 #define PCPP_TCPOLEN_CORREXP 2
180 #define PCPP_TCPOLEN_QS 8
182 #define PCPP_TCPOLEN_USER_TO 4
184 #define PCPP_TCPOLEN_RVBD_PROBE_MIN 3
186 #define PCPP_TCPOLEN_RVBD_TRPY_MIN 16
188 #define PCPP_TCPOLEN_EXP_MIN 2
231 return sizeof(uint8_t);
244 return (
size_t)m_Data->
recordLen - (2*
sizeof(uint8_t));
349 TcpLayer(uint16_t portSrc, uint16_t portDst);
464 int m_NumOfTrailingBytes;
467 uint8_t* getOptionsBasePtr()
const {
return m_Data +
sizeof(
tcphdr); }
468 TcpOption addTcpOptionAt(
const TcpOptionBuilder& optionBuilder,
int offset);
469 void adjustTcpOptionTrailer(
size_t totalOptSize);
470 void copyLayerData(
const TcpLayer& other);
OsiModelLayer
Definition: ProtocolType.h:224
Definition: TcpLayer.h:93
Definition: TcpLayer.h:119
Definition: TcpLayer.h:129
uint8_t recordType
Definition: TLVData.h:31
tcphdr * getTcpHeader() const
Definition: TcpLayer.h:367
NopEolOptionTypes
Definition: TcpLayer.h:262
uint16_t ackFlag
Definition: TcpLayer.h:32
TcpOptionBuilder(TcpOptionType optionType, uint8_t optionValue)
Definition: TcpLayer.h:286
Definition: TcpLayer.h:22
uint16_t cwrFlag
Definition: TcpLayer.h:32
size_t getTotalSize() const
Definition: TcpLayer.h:225
TcpOptionBuilder(TcpOptionType optionType, const uint8_t *optionValue, uint8_t optionValueLen)
Definition: TcpLayer.h:277
Definition: TcpLayer.h:113
bool removeTcpOption(TcpOptionType optionType)
Definition: TcpLayer.h:267
TcpOption addTcpOption(const TcpOptionBuilder &optionBuilder)
TcpOption(uint8_t *optionRawData)
Definition: TcpLayer.h:204
uint16_t windowSize
Definition: TcpLayer.h:75
uint16_t urgentPointer
Definition: TcpLayer.h:79
Definition: TcpLayer.h:121
Definition: TcpLayer.h:131
Definition: TcpLayer.h:115
TcpOptionBuilder(TcpOptionType optionType, uint16_t optionValue)
Definition: TcpLayer.h:295
uint16_t pshFlag
Definition: TcpLayer.h:32
Definition: TcpLayer.h:125
TcpOptionBuilder(TcpOptionType optionType, uint32_t optionValue)
Definition: TcpLayer.h:304
uint16_t rstFlag
Definition: TcpLayer.h:32
uint16_t calculateChecksum(bool writeResultToPacket)
uint16_t eceFlag
Definition: TcpLayer.h:32
Definition: TcpLayer.h:254
Definition: TcpLayer.h:111
size_t getHeaderLen() const
Definition: TcpLayer.h:450
Definition: TcpLayer.h:99
size_t getTcpOptionCount() const
TcpOption getNextTcpOption(TcpOption &tcpOption) const
Definition: TcpLayer.h:105
bool removeAllTcpOptions()
Definition: ProtocolType.h:233
Definition: TcpLayer.h:117
The main namespace for the PcapPlusPlus lib.
Definition: TLVData.h:351
Definition: TcpLayer.h:135
uint16_t synFlag
Definition: TcpLayer.h:32
uint16_t finFlag
Definition: TcpLayer.h:32
Definition: TcpLayer.h:109
TcpOptionType
Definition: TcpLayer.h:87
size_t getDataSize() const
Definition: TcpLayer.h:236
std::string toString() const
OsiModelLayer getOsiModelLayer() const
Definition: TcpLayer.h:459
Definition: TLVData.h:197
uint32_t sequenceNumber
Definition: TcpLayer.h:28
TcpOptionType getTcpOptionType() const
Definition: TcpLayer.h:215
Definition: TcpLayer.h:123
Definition: TcpLayer.h:196
Definition: TcpLayer.h:89
uint16_t portDst
Definition: TcpLayer.h:26
TcpOption getFirstTcpOption() const
Definition: TcpLayer.h:91
~TcpOption()
Definition: TcpLayer.h:209
Definition: TcpLayer.h:95
uint16_t headerChecksum
Definition: TcpLayer.h:77
void computeCalculateFields()
uint16_t dataOffset
Definition: TcpLayer.h:32
uint16_t portSrc
Definition: TcpLayer.h:24
TcpOption addTcpOptionAfter(const TcpOptionBuilder &optionBuilder, TcpOptionType prevOptionType=TCPOPT_Unknown)
TcpLayer & operator=(const TcpLayer &other)
Definition: TcpLayer.h:97
Definition: TcpLayer.h:265
Definition: TcpLayer.h:137
Definition: TcpLayer.h:127
uint8_t recordLen
Definition: TLVData.h:33
Definition: TcpLayer.h:107
Definition: TcpLayer.h:133
uint32_t ackNumber
Definition: TcpLayer.h:30
Definition: TcpLayer.h:327
uint16_t urgFlag
Definition: TcpLayer.h:32
Definition: TcpLayer.h:103
TcpOption getTcpOption(TcpOptionType option) const
Definition: TcpLayer.h:101