383 private boost::noncopyable
Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...
Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...
An object of this type generates a series of initial sequence numbers (ISN) that are meant to be suff...
Sequence_number generate_init_seq_num()
Returns an initial sequence number (ISN) for use in a new connection.
Generator(log::Logger *logger)
Constructs Generator.
static const seq_num_t S_MAX_INIT_SEQ_NUM
The maximum allowed value for the initial sequence number (ISN) for a given Flow-protocol connection ...
An internal net_flow sequence number identifying a piece of data.
seq_num_delta_t m_multiple_size
Expected size of a full contiguous "block" of these numbers; 0 = unknown/blocks not expected....
friend std::ostream & operator<<(std::ostream &os, const Sequence_number &seq_num)
Prints given sequence number to given ostream.
bool valid() const
Returns true if and only if *this != Sequence_number{} (i.e., is non-zero).
bool operator==(const Sequence_number &rhs) const
Whether *this is the same sequence number as rhs.
Sequence_number operator+(seq_num_delta_t delta) const
Returns new sequence number that is *this advanced (or reversed) by the given distance.
seq_num_delta_t operator-(const Sequence_number &rhs) const
Returns the distance from *this to rhs.
bool operator<(const Sequence_number &rhs) const
Whether *this is less than rhs.
bool operator<=(const Sequence_number &rhs) const
Return !(*this > rhs).
Sequence_number & operator+=(seq_num_delta_t delta)
Advances (or reverses) this sequence number by the given distance.
size_t hash() const
Hash value of this Sequence_number for unordered_*<>.
void set_raw_num(seq_num_t num)
Sets the raw sequence number.
Sequence_number & operator-=(seq_num_delta_t delta)
Equivalent to: operator+=(-delta).
Sequence_number & operator=(const Sequence_number &source)
Copy operator.
uint64_t seq_num_t
Raw sequence number type.
int64_t seq_num_delta_t
Integer type used to express differences (distances) between Sequence_numbers.
const seq_num_t & raw_num_ref() const
Provides the raw sequence number.
seq_num_t m_num
The raw sequence number. This is the only datum used in algorithms. The others are only for logging a...
Sequence_number(const Sequence_number &source)
Copy constructor.
void set_metadata(char num_line_id=0, const Sequence_number &zero_point=Sequence_number{}, seq_num_delta_t multiple_size=0)
Updates the full set of metadata (used at least for convenient convention-based logging but not actua...
Sequence_number()
Constructs sequence number that is zero (not a valid sequence number; less than all others).
seq_num_t m_zero_point_num
Value for m_num such that the magnitude is zero. See set_metadata().
char m_num_line_id
Identifies the owner number line; char(0) = unknown/none. See set_metadata().
bool operator>(const Sequence_number &rhs) const
Return rhs < *this.
bool operator!=(const Sequence_number &rhs) const
Return !(*this == rhs).
bool operator>=(const Sequence_number &rhs) const
Return rhs <= *this.
Flow module containing the API and implementation of the Flow network protocol, a TCP-inspired stream...