OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ | 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ |
6 #define NET_QUIC_QUIC_PROTOCOL_H_ | 6 #define NET_QUIC_QUIC_PROTOCOL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 bool multipath_flag; | 93 bool multipath_flag; |
94 bool reset_flag; | 94 bool reset_flag; |
95 bool version_flag; | 95 bool version_flag; |
96 QuicPacketNumberLength packet_number_length; | 96 QuicPacketNumberLength packet_number_length; |
97 QuicVersionVector versions; | 97 QuicVersionVector versions; |
98 // nonce contains an optional, 32-byte nonce value. If not included in the | 98 // nonce contains an optional, 32-byte nonce value. If not included in the |
99 // packet, |nonce| will be empty. | 99 // packet, |nonce| will be empty. |
100 DiversificationNonce* nonce; | 100 DiversificationNonce* nonce; |
101 }; | 101 }; |
102 | 102 |
103 // An integer which cannot be a packet number. | |
104 const QuicPacketNumber kInvalidPacketNumber = 0; | |
105 | |
106 // Header for Data packets. | 103 // Header for Data packets. |
107 struct NET_EXPORT_PRIVATE QuicPacketHeader { | 104 struct NET_EXPORT_PRIVATE QuicPacketHeader { |
108 QuicPacketHeader(); | 105 QuicPacketHeader(); |
109 explicit QuicPacketHeader(const QuicPacketPublicHeader& header); | 106 explicit QuicPacketHeader(const QuicPacketPublicHeader& header); |
110 QuicPacketHeader(const QuicPacketHeader& other); | 107 QuicPacketHeader(const QuicPacketHeader& other); |
111 | 108 |
112 NET_EXPORT_PRIVATE friend std::ostream& operator<<(std::ostream& os, | 109 NET_EXPORT_PRIVATE friend std::ostream& operator<<(std::ostream& os, |
113 const QuicPacketHeader& s); | 110 const QuicPacketHeader& s); |
114 | 111 |
115 QuicPacketPublicHeader public_header; | 112 QuicPacketPublicHeader public_header; |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 798 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
802 | 799 |
803 const struct iovec* iov; | 800 const struct iovec* iov; |
804 const int iov_count; | 801 const int iov_count; |
805 const size_t total_length; | 802 const size_t total_length; |
806 }; | 803 }; |
807 | 804 |
808 } // namespace net | 805 } // namespace net |
809 | 806 |
810 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 807 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |