#include <itpp/protocol/tcp.h>
Public Member Functions | |
Sequence_Number () | |
Default constructor. | |
Sequence_Number (const Sequence_Number &n) | |
ADD DOCUMENTATION HERE. | |
Sequence_Number & | operator= (const Sequence_Number &n) |
ADD DOCUMENTATION HERE. | |
Sequence_Number & | operator= (const int &rep) |
ADD DOCUMENTATION HERE. | |
bool | operator== (const Sequence_Number &n) const |
ADD DOCUMENTATION HERE. | |
bool | operator!= (const Sequence_Number &n) const |
ADD DOCUMENTATION HERE. | |
bool | operator> (const Sequence_Number &n) const |
ADD DOCUMENTATION HERE. | |
bool | operator>= (const Sequence_Number &n) const |
ADD DOCUMENTATION HERE. | |
bool | operator< (const Sequence_Number &n) const |
ADD DOCUMENTATION HERE. | |
bool | operator<= (const Sequence_Number &n) const |
ADD DOCUMENTATION HERE. | |
Sequence_Number | operator+ (const int n) const |
ADD DOCUMENTATION HERE. | |
Sequence_Number & | operator+= (const int n) |
ADD DOCUMENTATION HERE. | |
Sequence_Number | operator- (const int n) const |
ADD DOCUMENTATION HERE. | |
Sequence_Number & | operator-= (const int n) |
ADD DOCUMENTATION HERE. | |
int | operator- (const Sequence_Number &n) const |
ADD DOCUMENTATION HERE. | |
int | value () const |
Access to internal representation. | |
Protected Member Functions | |
Sequence_Number (int n) | |
ADD DOCUMENTATION HERE. | |
Protected Attributes | |
int | seq |
ADD DOCUMENTATION HERE. | |
Friends | |
Sequence_Number | operator+ (const int n1, const Sequence_Number &n2) |
ADD DOCUMENTATION HERE. | |
std::ostream & | operator<< (std::ostream &os, const Sequence_Number &n) |
ADD DOCUMENTATION HERE. | |
TSequenceNumber represents a sequence number in a byte stream. As simulations may get quite long sequence numbers based on 32 bit integers may overflow. This is not a major problem as long as this overflow is considered when comparing sequence numbers. TSequenceNumber defines relational operators base on subtraction instead of using built-in int relational operators. This approach works well for arbitrary long simulations as long as the "real" sequence numbers (i.e. the numbers seen without overflow) compared to each other do not differ by more than 2^31-1 (INT_MAX) which is not a serious restriction in a realistic TCP scenario.
Generated on Sat May 25 2013 16:32:33 for IT++ by Doxygen 1.8.2