Sponge
CS144's user-space TCP library
wrapping_integers.cc
Go to the documentation of this file.
1 #include "wrapping_integers.hh"
2 
3 // Dummy implementation of a 32-bit wrapping integer
4 
5 // For Lab 2, please replace with a real implementation that passes the
6 // automated checks run by `make check_lab2`.
7 
8 template <typename... Targs>
9 void DUMMY_CODE(Targs &&... /* unused */) {}
10 
11 using namespace std;
12 
17  DUMMY_CODE(n, isn);
18  return WrappingInt32{0};
19 }
20 
32  DUMMY_CODE(n, isn, checkpoint);
33  return {};
34 }
DUMMY_CODE
void DUMMY_CODE(Targs &&...)
Definition: wrapping_integers.cc:9
wrap
WrappingInt32 wrap(uint64_t n, WrappingInt32 isn)
Definition: wrapping_integers.cc:16
WrappingInt32
A 32-bit integer, expressed relative to an arbitrary initial sequence number (ISN)
Definition: wrapping_integers.hh:9
unwrap
uint64_t unwrap(WrappingInt32 n, WrappingInt32 isn, uint64_t checkpoint)
Definition: wrapping_integers.cc:31
wrapping_integers.hh
std::uint64_t
std