inet.hh (11263:8dcc6b40f164) inet.hh (11320:42ecb523c64a)
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 507 unchanged lines hidden (view full) ---

516 uint8_t off() const { return th_off*4; }
517 uint8_t flags() const { return th_flags & 0x3f; }
518 uint16_t win() const { return ntohs(th_win); }
519 uint16_t sum() const { return th_sum; }
520 uint16_t urp() const { return ntohs(th_urp); }
521
522 void sum(uint16_t sum) { th_sum = sum; }
523 void seq(uint32_t _seq) { th_seq = htonl(_seq); }
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 507 unchanged lines hidden (view full) ---

516 uint8_t off() const { return th_off*4; }
517 uint8_t flags() const { return th_flags & 0x3f; }
518 uint16_t win() const { return ntohs(th_win); }
519 uint16_t sum() const { return th_sum; }
520 uint16_t urp() const { return ntohs(th_urp); }
521
522 void sum(uint16_t sum) { th_sum = sum; }
523 void seq(uint32_t _seq) { th_seq = htonl(_seq); }
524 void flags(uint8_t _flags) { th_flags = _flags; }
524 void flags(uint8_t _flags) { th_flags = _flags; }
525
526 bool options(std::vector<const TcpOpt *> &vec) const;
527
528 int size() const { return off(); }
529 const uint8_t *bytes() const { return (const uint8_t *)this; }
530 const uint8_t *payload() const { return bytes() + size(); }
531 uint8_t *bytes() { return (uint8_t *)this; }
532 uint8_t *payload() { return bytes() + size(); }

--- 155 unchanged lines hidden ---
525
526 bool options(std::vector<const TcpOpt *> &vec) const;
527
528 int size() const { return off(); }
529 const uint8_t *bytes() const { return (const uint8_t *)this; }
530 const uint8_t *payload() const { return bytes() + size(); }
531 uint8_t *bytes() { return (uint8_t *)this; }
532 uint8_t *payload() { return bytes() + size(); }

--- 155 unchanged lines hidden ---