diff options
Diffstat (limited to 'src/base/inet.cc')
-rw-r--r-- | src/base/inet.cc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/base/inet.cc b/src/base/inet.cc index 7d7eb3f5a..d8d156478 100644 --- a/src/base/inet.cc +++ b/src/base/inet.cc @@ -254,29 +254,6 @@ TcpHdr::options(vector<const TcpOpt *> &vec) const return true; } -bool -TcpOpt::sack(vector<SackRange> &vec) const -{ - vec.clear(); - - const uint8_t *data = bytes() + sizeof(struct tcp_hdr); - int all = len() - offsetof(tcp_opt, opt_data.sack); - while (all > 0) { - const uint16_t *sack = (const uint16_t *)data; - int len = sizeof(uint16_t) * 2; - if (all < len) { - vec.clear(); - return false; - } - - vec.push_back(RangeIn(ntohs(sack[0]), ntohs(sack[1]))); - all -= len; - data += len; - } - - return false; -} - int hsplit(const EthPacketPtr &ptr) { |