Index: net/quic/core/quic_protocol.h |
diff --git a/net/quic/core/quic_protocol.h b/net/quic/core/quic_protocol.h |
index 34e6a407267f8a900e407b6f44bf34d5d374622c..6290ccf199af313850a223289b5f5f0dd36a4357 100644 |
--- a/net/quic/core/quic_protocol.h |
+++ b/net/quic/core/quic_protocol.h |
@@ -1264,7 +1264,7 @@ typedef std::vector<QuicFrame> QuicFrames; |
class NET_EXPORT_PRIVATE QuicData { |
public: |
QuicData(const char* buffer, size_t length); |
- QuicData(char* buffer, size_t length, bool owns_buffer); |
+ QuicData(const char* buffer, size_t length, bool owns_buffer); |
virtual ~QuicData(); |
base::StringPiece AsStringPiece() const { |
@@ -1316,7 +1316,7 @@ class NET_EXPORT_PRIVATE QuicPacket : public QuicData { |
class NET_EXPORT_PRIVATE QuicEncryptedPacket : public QuicData { |
public: |
QuicEncryptedPacket(const char* buffer, size_t length); |
- QuicEncryptedPacket(char* buffer, size_t length, bool owns_buffer); |
+ QuicEncryptedPacket(const char* buffer, size_t length, bool owns_buffer); |
// Clones the packet into a new packet which owns the buffer. |
QuicEncryptedPacket* Clone() const; |
@@ -1337,10 +1337,16 @@ class NET_EXPORT_PRIVATE QuicEncryptedPacket : public QuicData { |
class NET_EXPORT_PRIVATE QuicReceivedPacket : public QuicEncryptedPacket { |
public: |
QuicReceivedPacket(const char* buffer, size_t length, QuicTime receipt_time); |
- QuicReceivedPacket(char* buffer, |
+ QuicReceivedPacket(const char* buffer, |
size_t length, |
QuicTime receipt_time, |
bool owns_buffer); |
+ QuicReceivedPacket(const char* buffer, |
+ size_t length, |
+ QuicTime receipt_time, |
+ bool owns_buffer, |
+ int ttl, |
+ bool ttl_valid); |
// Clones the packet into a new packet which owns the buffer. |
QuicReceivedPacket* Clone() const; |
@@ -1348,6 +1354,9 @@ class NET_EXPORT_PRIVATE QuicReceivedPacket : public QuicEncryptedPacket { |
// Returns the time at which the packet was received. |
QuicTime receipt_time() const { return receipt_time_; } |
+ // This is the TTL of the packet, assuming ttl_vaild_ is true. |
+ int ttl() const { return ttl_; } |
+ |
// By default, gtest prints the raw bytes of an object. The bool data |
// member (in the base class QuicData) causes this object to have padding |
// bytes, which causes the default gtest object printer to read |
@@ -1358,6 +1367,7 @@ class NET_EXPORT_PRIVATE QuicReceivedPacket : public QuicEncryptedPacket { |
private: |
const QuicTime receipt_time_; |
+ int ttl_; |
DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacket); |
}; |