Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: net/quic/core/quic_protocol.h

Issue 2517603003: Moves QuicTag typedefs, and QuicTag utility methods to quic_tag.{h,cc}. No behavior change. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_framer.cc ('k') | net/quic/core/quic_protocol.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 struct QuicPacketHeader; 42 struct QuicPacketHeader;
43 class QuicAckListenerInterface; 43 class QuicAckListenerInterface;
44 44
45 // Version and Crypto tags are written to the wire with a big-endian 45 // Version and Crypto tags are written to the wire with a big-endian
46 // representation of the name of the tag. For example 46 // representation of the name of the tag. For example
47 // the client hello tag (CHLO) will be written as the 47 // the client hello tag (CHLO) will be written as the
48 // following 4 bytes: 'C' 'H' 'L' 'O'. Since it is 48 // following 4 bytes: 'C' 'H' 'L' 'O'. Since it is
49 // stored in memory as a little endian uint32_t, we need 49 // stored in memory as a little endian uint32_t, we need
50 // to reverse the order of the bytes. 50 // to reverse the order of the bytes.
51 51
52 // MakeQuicTag returns a value given the four bytes. For example:
53 // MakeQuicTag('C', 'H', 'L', 'O');
54 NET_EXPORT_PRIVATE QuicTag MakeQuicTag(char a, char b, char c, char d);
55
56 // Returns true if the tag vector contains the specified tag.
57 NET_EXPORT_PRIVATE bool ContainsQuicTag(const QuicTagVector& tag_vector,
58 QuicTag tag);
59
60 // Size in bytes of the data packet header. 52 // Size in bytes of the data packet header.
61 NET_EXPORT_PRIVATE size_t GetPacketHeaderSize(QuicVersion version, 53 NET_EXPORT_PRIVATE size_t GetPacketHeaderSize(QuicVersion version,
62 const QuicPacketHeader& header); 54 const QuicPacketHeader& header);
63 55
64 NET_EXPORT_PRIVATE size_t 56 NET_EXPORT_PRIVATE size_t
65 GetPacketHeaderSize(QuicVersion version, 57 GetPacketHeaderSize(QuicVersion version,
66 QuicConnectionIdLength connection_id_length, 58 QuicConnectionIdLength connection_id_length,
67 bool include_version, 59 bool include_version,
68 bool include_path_id, 60 bool include_path_id,
69 bool include_diversification_nonce, 61 bool include_diversification_nonce,
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 QuicPathId path_id; 752 QuicPathId path_id;
761 bool has_crypto_handshake; 753 bool has_crypto_handshake;
762 int num_padding_bytes; 754 int num_padding_bytes;
763 EncryptionLevel encryption_level; 755 EncryptionLevel encryption_level;
764 QuicPacketNumberLength packet_number_length; 756 QuicPacketNumberLength packet_number_length;
765 }; 757 };
766 758
767 } // namespace net 759 } // namespace net
768 760
769 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 761 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_framer.cc ('k') | net/quic/core/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698