Sponge
CS144's user-space TCP library
|
#include "wrapping_integers.hh"
Go to the source code of this file.
Functions | |
template<typename... Targs> | |
void | DUMMY_CODE (Targs &&...) |
uint64_t | unwrap (WrappingInt32 n, WrappingInt32 isn, uint64_t checkpoint) |
WrappingInt32 | wrap (uint64_t n, WrappingInt32 isn) |
void DUMMY_CODE | ( | Targs && | ... | ) |
Definition at line 9 of file wrapping_integers.cc.
uint64_t unwrap | ( | WrappingInt32 | n, |
WrappingInt32 | isn, | ||
uint64_t | checkpoint | ||
) |
Transform a WrappingInt32 into an "absolute" 64-bit sequence number (zero-indexed)
n | The relative sequence number |
isn | The initial sequence number |
checkpoint | A recent absolute 64-bit sequence number |
n
and is closest to checkpoint
Definition at line 31 of file wrapping_integers.cc.
WrappingInt32 wrap | ( | uint64_t | n, |
WrappingInt32 | isn | ||
) |
Transform an "absolute" 64-bit sequence number (zero-indexed) into a WrappingInt32
n | The input absolute 64-bit sequence number |
isn | The initial sequence number |
Definition at line 16 of file wrapping_integers.cc.