|
Sponge
CS144's user-space TCP library
|
Go to the documentation of this file. 1 #ifndef SPONGE_LIBSPONGE_WRAPPING_INTEGERS_HH
2 #define SPONGE_LIBSPONGE_WRAPPING_INTEGERS_HH
17 uint32_t raw_value()
const {
return _raw_value; }
65 #endif // SPONGE_LIBSPONGE_WRAPPING_INTEGERS_HH
A 32-bit integer, expressed relative to an arbitrary initial sequence number (ISN)
WrappingInt32 operator+(WrappingInt32 a, uint32_t b)
The point b steps past a.
std::ostream & operator<<(std::ostream &os, WrappingInt32 a)
Serializes the wrapping integer, a.
WrappingInt32(uint32_t raw_value)
Construct from a raw 32-bit unsigned integer.
uint32_t _raw_value
The raw 32-bit stored integer.
int32_t operator-(WrappingInt32 a, WrappingInt32 b)
The offset of a relative to b
WrappingInt32 wrap(uint64_t n, WrappingInt32 isn)
bool operator!=(WrappingInt32 a, WrappingInt32 b)
Whether the two integers are not equal.
uint64_t unwrap(WrappingInt32 n, WrappingInt32 isn, uint64_t checkpoint)
bool operator==(WrappingInt32 a, WrappingInt32 b)
Whether the two integers are equal.