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

Unified Diff: net/quic/core/quic_protocol.h

Issue 2505993004: Move enums from QuicProtocol to QuicTypes. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/quic/core/quic_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_protocol.h
diff --git a/net/quic/core/quic_protocol.h b/net/quic/core/quic_protocol.h
index 71afc83fe111289eb00a96a94a1dd396fa245025..55f396a378d2807071a2dc0c20bd4e3bc87dd470 100644
--- a/net/quic/core/quic_protocol.h
+++ b/net/quic/core/quic_protocol.h
@@ -42,135 +42,6 @@ class QuicPacket;
struct QuicPacketHeader;
class QuicAckListenerInterface;
-enum TransmissionType : int8_t {
- NOT_RETRANSMISSION,
- FIRST_TRANSMISSION_TYPE = NOT_RETRANSMISSION,
- HANDSHAKE_RETRANSMISSION, // Retransmits due to handshake timeouts.
- ALL_UNACKED_RETRANSMISSION, // Retransmits all unacked packets.
- ALL_INITIAL_RETRANSMISSION, // Retransmits all initially encrypted packets.
- LOSS_RETRANSMISSION, // Retransmits due to loss detection.
- RTO_RETRANSMISSION, // Retransmits due to retransmit time out.
- TLP_RETRANSMISSION, // Tail loss probes.
- LAST_TRANSMISSION_TYPE = TLP_RETRANSMISSION,
-};
-
-enum HasRetransmittableData : int8_t {
- NO_RETRANSMITTABLE_DATA,
- HAS_RETRANSMITTABLE_DATA,
-};
-
-enum IsHandshake : int8_t { NOT_HANDSHAKE, IS_HANDSHAKE };
-
-enum class Perspective { IS_SERVER, IS_CLIENT };
-
-// Describes whether a ConnectionClose was originated by the peer.
-enum class ConnectionCloseSource { FROM_PEER, FROM_SELF };
-
-// Should a connection be closed silently or not.
-enum class ConnectionCloseBehavior {
- SILENT_CLOSE,
- SEND_CONNECTION_CLOSE_PACKET,
- SEND_CONNECTION_CLOSE_PACKET_WITH_NO_ACK
-};
-
-NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
- const Perspective& s);
-enum QuicFrameType {
- // Regular frame types. The values set here cannot change without the
- // introduction of a new QUIC version.
- PADDING_FRAME = 0,
- RST_STREAM_FRAME = 1,
- CONNECTION_CLOSE_FRAME = 2,
- GOAWAY_FRAME = 3,
- WINDOW_UPDATE_FRAME = 4,
- BLOCKED_FRAME = 5,
- STOP_WAITING_FRAME = 6,
- PING_FRAME = 7,
- PATH_CLOSE_FRAME = 8,
-
- // STREAM and ACK frames are special frames. They are encoded differently on
- // the wire and their values do not need to be stable.
- STREAM_FRAME,
- ACK_FRAME,
- // The path MTU discovery frame is encoded as a PING frame on the wire.
- MTU_DISCOVERY_FRAME,
- NUM_FRAME_TYPES
-};
-
-enum QuicConnectionIdLength {
- PACKET_0BYTE_CONNECTION_ID = 0,
- PACKET_8BYTE_CONNECTION_ID = 8
-};
-
-enum QuicPacketNumberLength : int8_t {
- PACKET_1BYTE_PACKET_NUMBER = 1,
- PACKET_2BYTE_PACKET_NUMBER = 2,
- PACKET_4BYTE_PACKET_NUMBER = 4,
- PACKET_6BYTE_PACKET_NUMBER = 6
-};
-
-// Used to indicate a QuicSequenceNumberLength using two flag bits.
-enum QuicPacketNumberLengthFlags {
- PACKET_FLAGS_1BYTE_PACKET = 0, // 00
- PACKET_FLAGS_2BYTE_PACKET = 1, // 01
- PACKET_FLAGS_4BYTE_PACKET = 1 << 1, // 10
- PACKET_FLAGS_6BYTE_PACKET = 1 << 1 | 1, // 11
-};
-
-// The public flags are specified in one byte.
-enum QuicPacketPublicFlags {
- PACKET_PUBLIC_FLAGS_NONE = 0,
-
- // Bit 0: Does the packet header contains version info?
- PACKET_PUBLIC_FLAGS_VERSION = 1 << 0,
-
- // Bit 1: Is this packet a public reset packet?
- PACKET_PUBLIC_FLAGS_RST = 1 << 1,
-
- // Bit 2: indicates the that public header includes a nonce.
- PACKET_PUBLIC_FLAGS_NONCE = 1 << 2,
-
- // Bit 3: indicates whether a ConnectionID is included.
- PACKET_PUBLIC_FLAGS_0BYTE_CONNECTION_ID = 0,
- PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID = 1 << 3,
-
- // QUIC_VERSION_32 and earlier use two bits for an 8 byte
- // connection id.
- PACKET_PUBLIC_FLAGS_8BYTE_CONNECTION_ID_OLD = 1 << 3 | 1 << 2,
-
- // Bits 4 and 5 describe the packet number length as follows:
- // --00----: 1 byte
- // --01----: 2 bytes
- // --10----: 4 bytes
- // --11----: 6 bytes
- PACKET_PUBLIC_FLAGS_1BYTE_PACKET = PACKET_FLAGS_1BYTE_PACKET << 4,
- PACKET_PUBLIC_FLAGS_2BYTE_PACKET = PACKET_FLAGS_2BYTE_PACKET << 4,
- PACKET_PUBLIC_FLAGS_4BYTE_PACKET = PACKET_FLAGS_4BYTE_PACKET << 4,
- PACKET_PUBLIC_FLAGS_6BYTE_PACKET = PACKET_FLAGS_6BYTE_PACKET << 4,
-
- // Bit 6: Does the packet header contain a path id?
- PACKET_PUBLIC_FLAGS_MULTIPATH = 1 << 6,
-
- // Reserved, unimplemented flags:
-
- // Bit 7: indicates the presence of a second flags byte.
- PACKET_PUBLIC_FLAGS_TWO_OR_MORE_BYTES = 1 << 7,
-
- // All bits set (bit 7 is not currently used): 01111111
- PACKET_PUBLIC_FLAGS_MAX = (1 << 7) - 1,
-};
-
-// The private flags are specified in one byte.
-enum QuicPacketPrivateFlags {
- PACKET_PRIVATE_FLAGS_NONE = 0,
-
- // Bit 0: Does this packet contain an entropy bit?
- PACKET_PRIVATE_FLAGS_ENTROPY = 1 << 0,
-
- // (bits 1-7 are not used): 00000001
- PACKET_PRIVATE_FLAGS_MAX = (1 << 1) - 1
-};
-
// Version and Crypto tags are written to the wire with a big-endian
// representation of the name of the tag. For example
// the client hello tag (CHLO) will be written as the
@@ -495,25 +366,6 @@ IsAwaitingPacket(const QuicAckFrame& ack_frame,
QuicPacketNumber packet_number,
QuicPacketNumber peer_least_packet_awaiting_ack);
-// Defines for all types of congestion control algorithms that can be used in
-// QUIC. Note that this is separate from the congestion feedback type -
-// some congestion control algorithms may use the same feedback type
-// (Reno and Cubic are the classic example for that).
-enum CongestionControlType {
- kCubic,
- kCubicBytes,
- kReno,
- kRenoBytes,
- kBBR,
-};
-
-enum LossDetectionType {
- kNack, // Used to mimic TCP's loss detection.
- kTime, // Time based loss detection.
- kAdaptiveTime, // Adaptive time based loss detection.
- kLazyFack, // Nack based but with FACK disabled for the first ack.
-};
-
struct NET_EXPORT_PRIVATE QuicRstStreamFrame {
QuicRstStreamFrame();
QuicRstStreamFrame(QuicStreamId stream_id,
@@ -614,35 +466,6 @@ struct NET_EXPORT_PRIVATE QuicPathCloseFrame {
QuicPathId path_id;
};
-// EncryptionLevel enumerates the stages of encryption that a QUIC connection
-// progresses through. When retransmitting a packet, the encryption level needs
-// to be specified so that it is retransmitted at a level which the peer can
-// understand.
-enum EncryptionLevel : int8_t {
- ENCRYPTION_NONE = 0,
- ENCRYPTION_INITIAL = 1,
- ENCRYPTION_FORWARD_SECURE = 2,
-
- NUM_ENCRYPTION_LEVELS,
-};
-
-enum PeerAddressChangeType {
- // IP address and port remain unchanged.
- NO_CHANGE,
- // Port changed, but IP address remains unchanged.
- PORT_CHANGE,
- // IPv4 address changed, but within the /24 subnet (port may have changed.)
- IPV4_SUBNET_CHANGE,
- // IPv4 address changed, excluding /24 subnet change (port may have changed.)
- IPV4_TO_IPV4_CHANGE,
- // IP address change from an IPv4 to an IPv6 address (port may have changed.)
- IPV4_TO_IPV6_CHANGE,
- // IP address change from an IPv6 to an IPv4 address (port may have changed.)
- IPV6_TO_IPV4_CHANGE,
- // IP address change from an IPv6 to an IPv6 address (port may have changed.)
- IPV6_TO_IPV6_CHANGE,
-};
-
struct NET_EXPORT_PRIVATE QuicFrame {
QuicFrame();
explicit QuicFrame(QuicPaddingFrame padding_frame);
« no previous file with comments | « no previous file | net/quic/core/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698