diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2008-12-05 13:58:21 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2008-12-05 13:58:21 -0500 |
commit | aab595a3062d59388fed76f03c38eaf1e137a099 (patch) | |
tree | 30e26d28b2569790c0b2a46f55317a4da31e4452 /src | |
parent | 854aa60fdcec2a95d2c08844d62681b498281ca3 (diff) | |
download | gem5-aab595a3062d59388fed76f03c38eaf1e137a099.tar.xz |
INet: Allow updating on id, len, seq, and flag field for TCP segment offload
Diffstat (limited to 'src')
-rw-r--r-- | src/base/inet.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/base/inet.hh b/src/base/inet.hh index e88c0f75f..21ac5c89e 100644 --- a/src/base/inet.hh +++ b/src/base/inet.hh @@ -162,6 +162,9 @@ struct IpHdr : public ip_hdr uint32_t dst() const { return ntohl(ip_dst); } void sum(uint16_t sum) { ip_sum = sum; } + void id(uint16_t _id) { ip_id = htons(_id); } + void len(uint16_t _len) { ip_len = htons(_len); } + bool options(std::vector<const IpOpt *> &vec) const; @@ -260,6 +263,8 @@ struct TcpHdr : public tcp_hdr uint16_t urp() const { return ntohs(th_urp); } void sum(uint16_t sum) { th_sum = sum; } + void seq(uint32_t _seq) { th_seq = htonl(_seq); } + void flags(uint8_t _flags) { th_flags = _flags; } bool options(std::vector<const TcpOpt *> &vec) const; @@ -348,6 +353,7 @@ struct UdpHdr : public udp_hdr uint16_t sum() const { return uh_sum; } void sum(uint16_t sum) { uh_sum = sum; } + void len(uint16_t _len) { uh_ulen = htons(_len); } int size() const { return sizeof(udp_hdr); } const uint8_t *bytes() const { return (const uint8_t *)this; } |