itpp::TCP_Segment Class Reference

`#include <itpp/protocol/tcp.h>`

## Public Member Functions

| TCP_Segment ()
| ADD DOCUMENTATION HERE.
| TCP_Segment (const Sequence_Number &sn_begin, const Sequence_Number &sn_end)
| ADD DOCUMENTATION HERE.
| TCP_Segment (const TCP_Segment &segment)
| ADD DOCUMENTATION HERE.
TCP_Segment & | operator= (const TCP_Segment &segment)
| ADD DOCUMENTATION HERE.
void | set_begin (const Sequence_Number &sn)
| ADD DOCUMENTATION HERE.
void | set_end (const Sequence_Number &sn)
| ADD DOCUMENTATION HERE.
void | combine (const TCP_Segment &segment)
| ADD DOCUMENTATION HERE.
bool | operator== (const TCP_Segment &segment) const
| ADD DOCUMENTATION HERE.
bool | operator!= (const TCP_Segment &segment) const
| ADD DOCUMENTATION HERE.
bool | can_be_combined (const TCP_Segment &segment) const
| ADD DOCUMENTATION HERE.
bool | is_contained (const TCP_Segment &segment) const
| ADD DOCUMENTATION HERE.
unsigned | length () const
| ADD DOCUMENTATION HERE.
Sequence_Number | begin () const
| ADD DOCUMENTATION HERE.
Sequence_Number | end () const
| ADD DOCUMENTATION HERE.

## Protected Attributes

Sequence_Number | seq_begin
| no. of first byte of segment
Sequence_Number | seq_end
| no. of last byte of segment + 1

## Friends

std::ostream & | operator<< (std::ostream &os, const TCP_Segment &segment)
| ADD DOCUMENTATION HERE.

## Detailed Description

TCP is a byte oriented protcol. Parts of the byte stream that is transmitted are called segments. They are identified by sequence numbers TCP_Segment contains fileds for the beginning sequence number and the sequence number of the first byte in the following segment (i.e. the sequence number of the last byte + 1). TCP_Segment provides several const methods to compare segments and to check whether they overlap. TCP_Segment is, e.g., used in TTCPPacket and TTCPReceiverBuffer.

See also
  Sequence_Number
  TTCPPacket
  TTCPReceiverBuffer

Author
  Lorang
  Bodamer

Definition at line 145 of file tcp.h.

## Member Function Documentation

## set_begin()

void itpp::TCP_Segment::set_begin | ( | const Sequence_Number & | sn | ) |

inline

ADD DOCUMENTATION HERE.

Definition at line 708 of file tcp.h.

References it_assert, seq_begin, seq_end, itpp::to_str(), and itpp::Sequence_Number::value().

## set_end()

void itpp::TCP_Segment::set_end | ( | const Sequence_Number & | sn | ) |

inline

ADD DOCUMENTATION HERE.

Definition at line 716 of file tcp.h.

References it_assert, seq_begin, seq_end, itpp::to_str(), and itpp::Sequence_Number::value().

## operator==()

bool itpp::TCP_Segment::operator== | ( | const TCP_Segment & | segment | ) | const

inline

ADD DOCUMENTATION HERE.

Definition at line 724 of file tcp.h.

References seq_begin, and seq_end.

## operator!=()

bool itpp::TCP_Segment::operator!= | ( | const TCP_Segment & | segment | ) | const

inline

ADD DOCUMENTATION HERE.

Definition at line 730 of file tcp.h.

References seq_begin, and seq_end.

## can_be_combined()

bool itpp::TCP_Segment::can_be_combined | ( | const TCP_Segment & | segment | ) | const

inline

ADD DOCUMENTATION HERE.

Definition at line 736 of file tcp.h.

References seq_begin, and seq_end.

## is_contained()

bool itpp::TCP_Segment::is_contained | ( | const TCP_Segment & | segment | ) | const

inline

ADD DOCUMENTATION HERE.

Definition at line 742 of file tcp.h.

References seq_end.

## length()

unsigned itpp::TCP_Segment::length | ( |  | ) | const

inline

ADD DOCUMENTATION HERE.

Definition at line 748 of file tcp.h.

References seq_begin, and seq_end.

## begin()

Sequence_Number itpp::TCP_Segment::begin | ( |  | ) | const

inline

ADD DOCUMENTATION HERE.

Definition at line 177 of file tcp.h.

References seq_begin.

## end()

Sequence_Number itpp::TCP_Segment::end | ( |  | ) | const

inline

ADD DOCUMENTATION HERE.

Definition at line 179 of file tcp.h.

References seq_end.

## Member Data Documentation

## seq_begin

Sequence_Number itpp::TCP_Segment::seq_begin

protected

no. of first byte of segment

Definition at line 185 of file tcp.h.

Referenced by begin(), can_be_combined(), length(), operator!=(), operator==(), set_begin(), and set_end().

## seq_end

Sequence_Number itpp::TCP_Segment::seq_end

protected

no. of last byte of segment + 1

Definition at line 186 of file tcp.h.

Referenced by can_be_combined(), end(), is_contained(), length(), operator!=(), operator==(), set_begin(), and set_end().

The documentation for this class was generated from the following file:

- itpp/protocol/tcp.h

Generated on Mon Jun 10 2024 11:49:41 for IT++ by Doxygen 1.9.8