diff --git a/codecov.yml b/codecov.yml index cfe901ead..e3384e33e 100644 --- a/codecov.yml +++ b/codecov.yml @@ -10,6 +10,7 @@ coverage: - internal/utils/byteinterval_linkedlist.go - internal/utils/packetinterval_linkedlist.go - internal/utils/linkedlist/linkedlist.go + - quictrace/ status: project: default: diff --git a/go.mod b/go.mod index 8a758472d..dac16695e 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.12 require ( github.com/cheekybits/genny v1.0.0 github.com/golang/mock v1.2.0 + github.com/golang/protobuf v1.3.0 github.com/marten-seemann/qpack v0.1.0 github.com/marten-seemann/qtls v0.2.4 github.com/onsi/ginkgo v1.7.0 diff --git a/go.sum b/go.sum index c4f970fa8..ec82effc3 100644 --- a/go.sum +++ b/go.sum @@ -6,6 +6,8 @@ github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0 h1:kbxbvI4Un1LUWKxufD+BiE6AEExYYgkQLQmLFqA1LFk= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/marten-seemann/qpack v0.1.0 h1:/0M7lkda/6mus9B8u34Asqm8ZhHAAt9Ho0vniNuVSVg= @@ -31,6 +33,7 @@ golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e h1:ZytStCyV048ZqDsWHiYDdoI2V golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= diff --git a/quictrace/pb/quic-trace.pb.go b/quictrace/pb/quic-trace.pb.go new file mode 100644 index 000000000..e05d7a50a --- /dev/null +++ b/quictrace/pb/quic-trace.pb.go @@ -0,0 +1,1083 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: quic-trace.proto + +package pb + +import ( + fmt "fmt" + proto "github.com/golang/protobuf/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type FrameType int32 + +const ( + FrameType_UNKNOWN_FRAME FrameType = 0 + FrameType_STREAM FrameType = 1 + FrameType_ACK FrameType = 2 + FrameType_RESET_STREAM FrameType = 3 + FrameType_CONNECTION_CLOSE FrameType = 4 + FrameType_MAX_DATA FrameType = 5 + FrameType_MAX_STREAM_DATA FrameType = 6 + FrameType_PING FrameType = 7 + FrameType_BLOCKED FrameType = 8 + FrameType_STREAM_BLOCKED FrameType = 9 + FrameType_PADDING FrameType = 10 +) + +var FrameType_name = map[int32]string{ + 0: "UNKNOWN_FRAME", + 1: "STREAM", + 2: "ACK", + 3: "RESET_STREAM", + 4: "CONNECTION_CLOSE", + 5: "MAX_DATA", + 6: "MAX_STREAM_DATA", + 7: "PING", + 8: "BLOCKED", + 9: "STREAM_BLOCKED", + 10: "PADDING", +} + +var FrameType_value = map[string]int32{ + "UNKNOWN_FRAME": 0, + "STREAM": 1, + "ACK": 2, + "RESET_STREAM": 3, + "CONNECTION_CLOSE": 4, + "MAX_DATA": 5, + "MAX_STREAM_DATA": 6, + "PING": 7, + "BLOCKED": 8, + "STREAM_BLOCKED": 9, + "PADDING": 10, +} + +func (x FrameType) Enum() *FrameType { + p := new(FrameType) + *p = x + return p +} + +func (x FrameType) String() string { + return proto.EnumName(FrameType_name, int32(x)) +} + +func (x *FrameType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FrameType_value, data, "FrameType") + if err != nil { + return err + } + *x = FrameType(value) + return nil +} + +func (FrameType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{0} +} + +type EncryptionLevel int32 + +const ( + EncryptionLevel_ENCRYPTION_UNKNOWN EncryptionLevel = 0 + EncryptionLevel_ENCRYPTION_INITIAL EncryptionLevel = 1 + EncryptionLevel_ENCRYPTION_0RTT EncryptionLevel = 2 + EncryptionLevel_ENCRYPTION_1RTT EncryptionLevel = 3 + EncryptionLevel_ENCRYPTION_HANDSHAKE EncryptionLevel = 4 +) + +var EncryptionLevel_name = map[int32]string{ + 0: "ENCRYPTION_UNKNOWN", + 1: "ENCRYPTION_INITIAL", + 2: "ENCRYPTION_0RTT", + 3: "ENCRYPTION_1RTT", + 4: "ENCRYPTION_HANDSHAKE", +} + +var EncryptionLevel_value = map[string]int32{ + "ENCRYPTION_UNKNOWN": 0, + "ENCRYPTION_INITIAL": 1, + "ENCRYPTION_0RTT": 2, + "ENCRYPTION_1RTT": 3, + "ENCRYPTION_HANDSHAKE": 4, +} + +func (x EncryptionLevel) Enum() *EncryptionLevel { + p := new(EncryptionLevel) + *p = x + return p +} + +func (x EncryptionLevel) String() string { + return proto.EnumName(EncryptionLevel_name, int32(x)) +} + +func (x *EncryptionLevel) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(EncryptionLevel_value, data, "EncryptionLevel") + if err != nil { + return err + } + *x = EncryptionLevel(value) + return nil +} + +func (EncryptionLevel) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{1} +} + +type EventType int32 + +const ( + EventType_UNKNOWN_EVENT EventType = 0 + EventType_PACKET_SENT EventType = 1 + EventType_PACKET_RECEIVED EventType = 2 + EventType_PACKET_LOST EventType = 3 + // An APPLICATION_LIMITED event occurs when the sender is capable of sending + // more data and tries to send it, but discovers that it does not have any + // outstanding data to send. Such events are important to some congestion + // control algorithms (for example, BBR) since they are trying to measure the + // largest achievable throughput, but it is impossible to measure it when the + // application does not send anything. + EventType_APPLICATION_LIMITED EventType = 4 + // Record when external information about expected network conditions + // (available bandwidth, RTT, congestion window, etc) is supplied to the + // sender. + EventType_EXTERNAL_PARAMETERS EventType = 5 +) + +var EventType_name = map[int32]string{ + 0: "UNKNOWN_EVENT", + 1: "PACKET_SENT", + 2: "PACKET_RECEIVED", + 3: "PACKET_LOST", + 4: "APPLICATION_LIMITED", + 5: "EXTERNAL_PARAMETERS", +} + +var EventType_value = map[string]int32{ + "UNKNOWN_EVENT": 0, + "PACKET_SENT": 1, + "PACKET_RECEIVED": 2, + "PACKET_LOST": 3, + "APPLICATION_LIMITED": 4, + "EXTERNAL_PARAMETERS": 5, +} + +func (x EventType) Enum() *EventType { + p := new(EventType) + *p = x + return p +} + +func (x EventType) String() string { + return proto.EnumName(EventType_name, int32(x)) +} + +func (x *EventType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(EventType_value, data, "EventType") + if err != nil { + return err + } + *x = EventType(value) + return nil +} + +func (EventType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{2} +} + +type TransmissionReason int32 + +const ( + // Indicates that there was not any particular special reason the packet was + // sent. + TransmissionReason_NORMAL_TRANSMISSION TransmissionReason = 0 + // Indicates that the packet sent is a tail loss probe, cf. + // https://tools.ietf.org/html/draft-ietf-quic-recovery-14#section-4.3.2 + TransmissionReason_TAIL_LOSS_PROBE TransmissionReason = 1 + // Indicates that the packet is sent due to retransmission timeout, cf + // https://tools.ietf.org/html/draft-ietf-quic-recovery-14#section-4.3.3 + TransmissionReason_RTO_TRANSMISSION TransmissionReason = 2 + // Indicates that the packet is sent in order to probe whether there is extra + // bandwidth available in cases where the sender needs an estimate of + // available bandwidth, but the application does not provide enough data for + // such estimate to become naturally available. This is usually only used in + // real-time protocols. + TransmissionReason_PROBING_TRANSMISSION TransmissionReason = 3 +) + +var TransmissionReason_name = map[int32]string{ + 0: "NORMAL_TRANSMISSION", + 1: "TAIL_LOSS_PROBE", + 2: "RTO_TRANSMISSION", + 3: "PROBING_TRANSMISSION", +} + +var TransmissionReason_value = map[string]int32{ + "NORMAL_TRANSMISSION": 0, + "TAIL_LOSS_PROBE": 1, + "RTO_TRANSMISSION": 2, + "PROBING_TRANSMISSION": 3, +} + +func (x TransmissionReason) Enum() *TransmissionReason { + p := new(TransmissionReason) + *p = x + return p +} + +func (x TransmissionReason) String() string { + return proto.EnumName(TransmissionReason_name, int32(x)) +} + +func (x *TransmissionReason) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TransmissionReason_value, data, "TransmissionReason") + if err != nil { + return err + } + *x = TransmissionReason(value) + return nil +} + +func (TransmissionReason) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{3} +} + +// Metadata for STREAM frames. +type StreamFrameInfo struct { + StreamId *uint64 `protobuf:"varint,1,opt,name=stream_id,json=streamId" json:"stream_id,omitempty"` + Fin *bool `protobuf:"varint,2,opt,name=fin" json:"fin,omitempty"` + Length *uint64 `protobuf:"varint,3,opt,name=length" json:"length,omitempty"` + Offset *uint64 `protobuf:"varint,4,opt,name=offset" json:"offset,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StreamFrameInfo) Reset() { *m = StreamFrameInfo{} } +func (m *StreamFrameInfo) String() string { return proto.CompactTextString(m) } +func (*StreamFrameInfo) ProtoMessage() {} +func (*StreamFrameInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{0} +} + +func (m *StreamFrameInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StreamFrameInfo.Unmarshal(m, b) +} +func (m *StreamFrameInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StreamFrameInfo.Marshal(b, m, deterministic) +} +func (m *StreamFrameInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_StreamFrameInfo.Merge(m, src) +} +func (m *StreamFrameInfo) XXX_Size() int { + return xxx_messageInfo_StreamFrameInfo.Size(m) +} +func (m *StreamFrameInfo) XXX_DiscardUnknown() { + xxx_messageInfo_StreamFrameInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_StreamFrameInfo proto.InternalMessageInfo + +func (m *StreamFrameInfo) GetStreamId() uint64 { + if m != nil && m.StreamId != nil { + return *m.StreamId + } + return 0 +} + +func (m *StreamFrameInfo) GetFin() bool { + if m != nil && m.Fin != nil { + return *m.Fin + } + return false +} + +func (m *StreamFrameInfo) GetLength() uint64 { + if m != nil && m.Length != nil { + return *m.Length + } + return 0 +} + +func (m *StreamFrameInfo) GetOffset() uint64 { + if m != nil && m.Offset != nil { + return *m.Offset + } + return 0 +} + +// The intervals are closed, i.e. the interval represented here is +// [first_packet, last_packet]. +type AckBlock struct { + FirstPacket *uint64 `protobuf:"varint,1,opt,name=first_packet,json=firstPacket" json:"first_packet,omitempty"` + LastPacket *uint64 `protobuf:"varint,2,opt,name=last_packet,json=lastPacket" json:"last_packet,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AckBlock) Reset() { *m = AckBlock{} } +func (m *AckBlock) String() string { return proto.CompactTextString(m) } +func (*AckBlock) ProtoMessage() {} +func (*AckBlock) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{1} +} + +func (m *AckBlock) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AckBlock.Unmarshal(m, b) +} +func (m *AckBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AckBlock.Marshal(b, m, deterministic) +} +func (m *AckBlock) XXX_Merge(src proto.Message) { + xxx_messageInfo_AckBlock.Merge(m, src) +} +func (m *AckBlock) XXX_Size() int { + return xxx_messageInfo_AckBlock.Size(m) +} +func (m *AckBlock) XXX_DiscardUnknown() { + xxx_messageInfo_AckBlock.DiscardUnknown(m) +} + +var xxx_messageInfo_AckBlock proto.InternalMessageInfo + +func (m *AckBlock) GetFirstPacket() uint64 { + if m != nil && m.FirstPacket != nil { + return *m.FirstPacket + } + return 0 +} + +func (m *AckBlock) GetLastPacket() uint64 { + if m != nil && m.LastPacket != nil { + return *m.LastPacket + } + return 0 +} + +// Metadata for ACK frames. +type AckInfo struct { + AckedPackets []*AckBlock `protobuf:"bytes,1,rep,name=acked_packets,json=ackedPackets" json:"acked_packets,omitempty"` + AckDelayUs *uint64 `protobuf:"varint,2,opt,name=ack_delay_us,json=ackDelayUs" json:"ack_delay_us,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AckInfo) Reset() { *m = AckInfo{} } +func (m *AckInfo) String() string { return proto.CompactTextString(m) } +func (*AckInfo) ProtoMessage() {} +func (*AckInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{2} +} + +func (m *AckInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AckInfo.Unmarshal(m, b) +} +func (m *AckInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AckInfo.Marshal(b, m, deterministic) +} +func (m *AckInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_AckInfo.Merge(m, src) +} +func (m *AckInfo) XXX_Size() int { + return xxx_messageInfo_AckInfo.Size(m) +} +func (m *AckInfo) XXX_DiscardUnknown() { + xxx_messageInfo_AckInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_AckInfo proto.InternalMessageInfo + +func (m *AckInfo) GetAckedPackets() []*AckBlock { + if m != nil { + return m.AckedPackets + } + return nil +} + +func (m *AckInfo) GetAckDelayUs() uint64 { + if m != nil && m.AckDelayUs != nil { + return *m.AckDelayUs + } + return 0 +} + +// Metadata for RST_STREAM frames. +type ResetStreamInfo struct { + StreamId *uint64 `protobuf:"varint,1,opt,name=stream_id,json=streamId" json:"stream_id,omitempty"` + ApplicationErrorCode *uint32 `protobuf:"varint,2,opt,name=application_error_code,json=applicationErrorCode" json:"application_error_code,omitempty"` + FinalOffset *uint64 `protobuf:"varint,3,opt,name=final_offset,json=finalOffset" json:"final_offset,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResetStreamInfo) Reset() { *m = ResetStreamInfo{} } +func (m *ResetStreamInfo) String() string { return proto.CompactTextString(m) } +func (*ResetStreamInfo) ProtoMessage() {} +func (*ResetStreamInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{3} +} + +func (m *ResetStreamInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResetStreamInfo.Unmarshal(m, b) +} +func (m *ResetStreamInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResetStreamInfo.Marshal(b, m, deterministic) +} +func (m *ResetStreamInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResetStreamInfo.Merge(m, src) +} +func (m *ResetStreamInfo) XXX_Size() int { + return xxx_messageInfo_ResetStreamInfo.Size(m) +} +func (m *ResetStreamInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ResetStreamInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ResetStreamInfo proto.InternalMessageInfo + +func (m *ResetStreamInfo) GetStreamId() uint64 { + if m != nil && m.StreamId != nil { + return *m.StreamId + } + return 0 +} + +func (m *ResetStreamInfo) GetApplicationErrorCode() uint32 { + if m != nil && m.ApplicationErrorCode != nil { + return *m.ApplicationErrorCode + } + return 0 +} + +func (m *ResetStreamInfo) GetFinalOffset() uint64 { + if m != nil && m.FinalOffset != nil { + return *m.FinalOffset + } + return 0 +} + +// Metadata for CONNECTION_CLOSE/APPLICATION_CLOSE frames. +type CloseInfo struct { + ErrorCode *uint32 `protobuf:"varint,1,opt,name=error_code,json=errorCode" json:"error_code,omitempty"` + ReasonPhrase *string `protobuf:"bytes,2,opt,name=reason_phrase,json=reasonPhrase" json:"reason_phrase,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CloseInfo) Reset() { *m = CloseInfo{} } +func (m *CloseInfo) String() string { return proto.CompactTextString(m) } +func (*CloseInfo) ProtoMessage() {} +func (*CloseInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{4} +} + +func (m *CloseInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CloseInfo.Unmarshal(m, b) +} +func (m *CloseInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CloseInfo.Marshal(b, m, deterministic) +} +func (m *CloseInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CloseInfo.Merge(m, src) +} +func (m *CloseInfo) XXX_Size() int { + return xxx_messageInfo_CloseInfo.Size(m) +} +func (m *CloseInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CloseInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CloseInfo proto.InternalMessageInfo + +func (m *CloseInfo) GetErrorCode() uint32 { + if m != nil && m.ErrorCode != nil { + return *m.ErrorCode + } + return 0 +} + +func (m *CloseInfo) GetReasonPhrase() string { + if m != nil && m.ReasonPhrase != nil { + return *m.ReasonPhrase + } + return "" +} + +// Metadata for MAX_DATA/MAX_STREAM_DATA frames. +type FlowControlInfo struct { + MaxData *uint64 `protobuf:"varint,1,opt,name=max_data,json=maxData" json:"max_data,omitempty"` + StreamId *uint64 `protobuf:"varint,2,opt,name=stream_id,json=streamId" json:"stream_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FlowControlInfo) Reset() { *m = FlowControlInfo{} } +func (m *FlowControlInfo) String() string { return proto.CompactTextString(m) } +func (*FlowControlInfo) ProtoMessage() {} +func (*FlowControlInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{5} +} + +func (m *FlowControlInfo) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FlowControlInfo.Unmarshal(m, b) +} +func (m *FlowControlInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FlowControlInfo.Marshal(b, m, deterministic) +} +func (m *FlowControlInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_FlowControlInfo.Merge(m, src) +} +func (m *FlowControlInfo) XXX_Size() int { + return xxx_messageInfo_FlowControlInfo.Size(m) +} +func (m *FlowControlInfo) XXX_DiscardUnknown() { + xxx_messageInfo_FlowControlInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_FlowControlInfo proto.InternalMessageInfo + +func (m *FlowControlInfo) GetMaxData() uint64 { + if m != nil && m.MaxData != nil { + return *m.MaxData + } + return 0 +} + +func (m *FlowControlInfo) GetStreamId() uint64 { + if m != nil && m.StreamId != nil { + return *m.StreamId + } + return 0 +} + +// A message representing a frame, either sent or received. +type Frame struct { + FrameType *FrameType `protobuf:"varint,1,opt,name=frame_type,json=frameType,enum=pb.FrameType" json:"frame_type,omitempty"` + StreamFrameInfo *StreamFrameInfo `protobuf:"bytes,2,opt,name=stream_frame_info,json=streamFrameInfo" json:"stream_frame_info,omitempty"` + AckInfo *AckInfo `protobuf:"bytes,3,opt,name=ack_info,json=ackInfo" json:"ack_info,omitempty"` + ResetStreamInfo *ResetStreamInfo `protobuf:"bytes,4,opt,name=reset_stream_info,json=resetStreamInfo" json:"reset_stream_info,omitempty"` + CloseInfo *CloseInfo `protobuf:"bytes,5,opt,name=close_info,json=closeInfo" json:"close_info,omitempty"` + FlowControlInfo *FlowControlInfo `protobuf:"bytes,6,opt,name=flow_control_info,json=flowControlInfo" json:"flow_control_info,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Frame) Reset() { *m = Frame{} } +func (m *Frame) String() string { return proto.CompactTextString(m) } +func (*Frame) ProtoMessage() {} +func (*Frame) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{6} +} + +func (m *Frame) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Frame.Unmarshal(m, b) +} +func (m *Frame) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Frame.Marshal(b, m, deterministic) +} +func (m *Frame) XXX_Merge(src proto.Message) { + xxx_messageInfo_Frame.Merge(m, src) +} +func (m *Frame) XXX_Size() int { + return xxx_messageInfo_Frame.Size(m) +} +func (m *Frame) XXX_DiscardUnknown() { + xxx_messageInfo_Frame.DiscardUnknown(m) +} + +var xxx_messageInfo_Frame proto.InternalMessageInfo + +func (m *Frame) GetFrameType() FrameType { + if m != nil && m.FrameType != nil { + return *m.FrameType + } + return FrameType_UNKNOWN_FRAME +} + +func (m *Frame) GetStreamFrameInfo() *StreamFrameInfo { + if m != nil { + return m.StreamFrameInfo + } + return nil +} + +func (m *Frame) GetAckInfo() *AckInfo { + if m != nil { + return m.AckInfo + } + return nil +} + +func (m *Frame) GetResetStreamInfo() *ResetStreamInfo { + if m != nil { + return m.ResetStreamInfo + } + return nil +} + +func (m *Frame) GetCloseInfo() *CloseInfo { + if m != nil { + return m.CloseInfo + } + return nil +} + +func (m *Frame) GetFlowControlInfo() *FlowControlInfo { + if m != nil { + return m.FlowControlInfo + } + return nil +} + +// Metadata that represents transport stack's understanding of the current state +// of the transport channel. +type TransportState struct { + MinRttUs *uint64 `protobuf:"varint,1,opt,name=min_rtt_us,json=minRttUs" json:"min_rtt_us,omitempty"` + // Smoothed RTT, usually computed using EWMA. + SmoothedRttUs *uint64 `protobuf:"varint,2,opt,name=smoothed_rtt_us,json=smoothedRttUs" json:"smoothed_rtt_us,omitempty"` + // The latest RTT measureent available. + LastRttUs *uint64 `protobuf:"varint,3,opt,name=last_rtt_us,json=lastRttUs" json:"last_rtt_us,omitempty"` + InFlightBytes *uint64 `protobuf:"varint,4,opt,name=in_flight_bytes,json=inFlightBytes" json:"in_flight_bytes,omitempty"` + CwndBytes *uint64 `protobuf:"varint,5,opt,name=cwnd_bytes,json=cwndBytes" json:"cwnd_bytes,omitempty"` + // Pacing rate, in bits per second. + PacingRateBps *uint64 `protobuf:"varint,6,opt,name=pacing_rate_bps,json=pacingRateBps" json:"pacing_rate_bps,omitempty"` + // Any arbitrary information about congestion control state that is not + // representable via parameters above. + CongestionControlState *string `protobuf:"bytes,7,opt,name=congestion_control_state,json=congestionControlState" json:"congestion_control_state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TransportState) Reset() { *m = TransportState{} } +func (m *TransportState) String() string { return proto.CompactTextString(m) } +func (*TransportState) ProtoMessage() {} +func (*TransportState) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{7} +} + +func (m *TransportState) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TransportState.Unmarshal(m, b) +} +func (m *TransportState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TransportState.Marshal(b, m, deterministic) +} +func (m *TransportState) XXX_Merge(src proto.Message) { + xxx_messageInfo_TransportState.Merge(m, src) +} +func (m *TransportState) XXX_Size() int { + return xxx_messageInfo_TransportState.Size(m) +} +func (m *TransportState) XXX_DiscardUnknown() { + xxx_messageInfo_TransportState.DiscardUnknown(m) +} + +var xxx_messageInfo_TransportState proto.InternalMessageInfo + +func (m *TransportState) GetMinRttUs() uint64 { + if m != nil && m.MinRttUs != nil { + return *m.MinRttUs + } + return 0 +} + +func (m *TransportState) GetSmoothedRttUs() uint64 { + if m != nil && m.SmoothedRttUs != nil { + return *m.SmoothedRttUs + } + return 0 +} + +func (m *TransportState) GetLastRttUs() uint64 { + if m != nil && m.LastRttUs != nil { + return *m.LastRttUs + } + return 0 +} + +func (m *TransportState) GetInFlightBytes() uint64 { + if m != nil && m.InFlightBytes != nil { + return *m.InFlightBytes + } + return 0 +} + +func (m *TransportState) GetCwndBytes() uint64 { + if m != nil && m.CwndBytes != nil { + return *m.CwndBytes + } + return 0 +} + +func (m *TransportState) GetPacingRateBps() uint64 { + if m != nil && m.PacingRateBps != nil { + return *m.PacingRateBps + } + return 0 +} + +func (m *TransportState) GetCongestionControlState() string { + if m != nil && m.CongestionControlState != nil { + return *m.CongestionControlState + } + return "" +} + +// Documents external network parameters supplied to the sender. Typically not +// all of those would be supplied (e.g. if bandwidth and RTT are supplied, you +// can infer the suggested CWND), but there are no restrictions on which fields +// may or may not be set. +type ExternalNetworkParameters struct { + BandwidthBps *uint64 `protobuf:"varint,1,opt,name=bandwidth_bps,json=bandwidthBps" json:"bandwidth_bps,omitempty"` + RttUs *uint64 `protobuf:"varint,2,opt,name=rtt_us,json=rttUs" json:"rtt_us,omitempty"` + CwndBytes *uint64 `protobuf:"varint,3,opt,name=cwnd_bytes,json=cwndBytes" json:"cwnd_bytes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExternalNetworkParameters) Reset() { *m = ExternalNetworkParameters{} } +func (m *ExternalNetworkParameters) String() string { return proto.CompactTextString(m) } +func (*ExternalNetworkParameters) ProtoMessage() {} +func (*ExternalNetworkParameters) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{8} +} + +func (m *ExternalNetworkParameters) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExternalNetworkParameters.Unmarshal(m, b) +} +func (m *ExternalNetworkParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExternalNetworkParameters.Marshal(b, m, deterministic) +} +func (m *ExternalNetworkParameters) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExternalNetworkParameters.Merge(m, src) +} +func (m *ExternalNetworkParameters) XXX_Size() int { + return xxx_messageInfo_ExternalNetworkParameters.Size(m) +} +func (m *ExternalNetworkParameters) XXX_DiscardUnknown() { + xxx_messageInfo_ExternalNetworkParameters.DiscardUnknown(m) +} + +var xxx_messageInfo_ExternalNetworkParameters proto.InternalMessageInfo + +func (m *ExternalNetworkParameters) GetBandwidthBps() uint64 { + if m != nil && m.BandwidthBps != nil { + return *m.BandwidthBps + } + return 0 +} + +func (m *ExternalNetworkParameters) GetRttUs() uint64 { + if m != nil && m.RttUs != nil { + return *m.RttUs + } + return 0 +} + +func (m *ExternalNetworkParameters) GetCwndBytes() uint64 { + if m != nil && m.CwndBytes != nil { + return *m.CwndBytes + } + return 0 +} + +// An event that has occurred over duration of the connection. +type Event struct { + TimeUs *uint64 `protobuf:"varint,1,opt,name=time_us,json=timeUs" json:"time_us,omitempty"` + EventType *EventType `protobuf:"varint,2,opt,name=event_type,json=eventType,enum=pb.EventType" json:"event_type,omitempty"` + PacketNumber *uint64 `protobuf:"varint,3,opt,name=packet_number,json=packetNumber" json:"packet_number,omitempty"` + Frames []*Frame `protobuf:"bytes,4,rep,name=frames" json:"frames,omitempty"` + PacketSize *uint64 `protobuf:"varint,5,opt,name=packet_size,json=packetSize" json:"packet_size,omitempty"` + EncryptionLevel *EncryptionLevel `protobuf:"varint,6,opt,name=encryption_level,json=encryptionLevel,enum=pb.EncryptionLevel" json:"encryption_level,omitempty"` + // State of the transport stack after the event has happened. + TransportState *TransportState `protobuf:"bytes,7,opt,name=transport_state,json=transportState" json:"transport_state,omitempty"` + // For event_type = EXTERNAL_PARAMETERS, record parameters specified. + ExternalNetworkParameters *ExternalNetworkParameters `protobuf:"bytes,8,opt,name=external_network_parameters,json=externalNetworkParameters" json:"external_network_parameters,omitempty"` + // For sent packets, indicate if there is a special reason for why the packet + // in question was transmitted. + TransmissionReason *TransmissionReason `protobuf:"varint,9,opt,name=transmission_reason,json=transmissionReason,enum=pb.TransmissionReason,def=0" json:"transmission_reason,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Event) Reset() { *m = Event{} } +func (m *Event) String() string { return proto.CompactTextString(m) } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{9} +} + +func (m *Event) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Event.Unmarshal(m, b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Event.Marshal(b, m, deterministic) +} +func (m *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return xxx_messageInfo_Event.Size(m) +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +const Default_Event_TransmissionReason TransmissionReason = TransmissionReason_NORMAL_TRANSMISSION + +func (m *Event) GetTimeUs() uint64 { + if m != nil && m.TimeUs != nil { + return *m.TimeUs + } + return 0 +} + +func (m *Event) GetEventType() EventType { + if m != nil && m.EventType != nil { + return *m.EventType + } + return EventType_UNKNOWN_EVENT +} + +func (m *Event) GetPacketNumber() uint64 { + if m != nil && m.PacketNumber != nil { + return *m.PacketNumber + } + return 0 +} + +func (m *Event) GetFrames() []*Frame { + if m != nil { + return m.Frames + } + return nil +} + +func (m *Event) GetPacketSize() uint64 { + if m != nil && m.PacketSize != nil { + return *m.PacketSize + } + return 0 +} + +func (m *Event) GetEncryptionLevel() EncryptionLevel { + if m != nil && m.EncryptionLevel != nil { + return *m.EncryptionLevel + } + return EncryptionLevel_ENCRYPTION_UNKNOWN +} + +func (m *Event) GetTransportState() *TransportState { + if m != nil { + return m.TransportState + } + return nil +} + +func (m *Event) GetExternalNetworkParameters() *ExternalNetworkParameters { + if m != nil { + return m.ExternalNetworkParameters + } + return nil +} + +func (m *Event) GetTransmissionReason() TransmissionReason { + if m != nil && m.TransmissionReason != nil { + return *m.TransmissionReason + } + return Default_Event_TransmissionReason +} + +type Trace struct { + // QUIC version tag, as represented on wire. Should be always 4 bytes long. + ProtocolVersion []byte `protobuf:"bytes,1,opt,name=protocol_version,json=protocolVersion" json:"protocol_version,omitempty"` + // Source and destination connection ID. If multiple connection IDs are used, + // record the first one used with short-form header. + SourceConnectionId []byte `protobuf:"bytes,2,opt,name=source_connection_id,json=sourceConnectionId" json:"source_connection_id,omitempty"` + DestinationConnectionId []byte `protobuf:"bytes,3,opt,name=destination_connection_id,json=destinationConnectionId" json:"destination_connection_id,omitempty"` + Events []*Event `protobuf:"bytes,4,rep,name=events" json:"events,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Trace) Reset() { *m = Trace{} } +func (m *Trace) String() string { return proto.CompactTextString(m) } +func (*Trace) ProtoMessage() {} +func (*Trace) Descriptor() ([]byte, []int) { + return fileDescriptor_79ecf15e0416742d, []int{10} +} + +func (m *Trace) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Trace.Unmarshal(m, b) +} +func (m *Trace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Trace.Marshal(b, m, deterministic) +} +func (m *Trace) XXX_Merge(src proto.Message) { + xxx_messageInfo_Trace.Merge(m, src) +} +func (m *Trace) XXX_Size() int { + return xxx_messageInfo_Trace.Size(m) +} +func (m *Trace) XXX_DiscardUnknown() { + xxx_messageInfo_Trace.DiscardUnknown(m) +} + +var xxx_messageInfo_Trace proto.InternalMessageInfo + +func (m *Trace) GetProtocolVersion() []byte { + if m != nil { + return m.ProtocolVersion + } + return nil +} + +func (m *Trace) GetSourceConnectionId() []byte { + if m != nil { + return m.SourceConnectionId + } + return nil +} + +func (m *Trace) GetDestinationConnectionId() []byte { + if m != nil { + return m.DestinationConnectionId + } + return nil +} + +func (m *Trace) GetEvents() []*Event { + if m != nil { + return m.Events + } + return nil +} + +func init() { + proto.RegisterEnum("pb.FrameType", FrameType_name, FrameType_value) + proto.RegisterEnum("pb.EncryptionLevel", EncryptionLevel_name, EncryptionLevel_value) + proto.RegisterEnum("pb.EventType", EventType_name, EventType_value) + proto.RegisterEnum("pb.TransmissionReason", TransmissionReason_name, TransmissionReason_value) + proto.RegisterType((*StreamFrameInfo)(nil), "pb.StreamFrameInfo") + proto.RegisterType((*AckBlock)(nil), "pb.AckBlock") + proto.RegisterType((*AckInfo)(nil), "pb.AckInfo") + proto.RegisterType((*ResetStreamInfo)(nil), "pb.ResetStreamInfo") + proto.RegisterType((*CloseInfo)(nil), "pb.CloseInfo") + proto.RegisterType((*FlowControlInfo)(nil), "pb.FlowControlInfo") + proto.RegisterType((*Frame)(nil), "pb.Frame") + proto.RegisterType((*TransportState)(nil), "pb.TransportState") + proto.RegisterType((*ExternalNetworkParameters)(nil), "pb.ExternalNetworkParameters") + proto.RegisterType((*Event)(nil), "pb.Event") + proto.RegisterType((*Trace)(nil), "pb.Trace") +} + +func init() { proto.RegisterFile("quic-trace.proto", fileDescriptor_79ecf15e0416742d) } + +var fileDescriptor_79ecf15e0416742d = []byte{ + // 1311 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x55, 0xdd, 0x6e, 0xdb, 0x46, + 0x16, 0xb6, 0xfe, 0xa5, 0x23, 0xc9, 0xa4, 0xc7, 0x5e, 0x47, 0x46, 0x36, 0xbb, 0x8e, 0x16, 0x08, + 0xb2, 0x46, 0x36, 0x48, 0x8c, 0xbd, 0x28, 0x52, 0xa0, 0x01, 0x2d, 0xd1, 0x09, 0x61, 0x99, 0x12, + 0x46, 0x74, 0x9a, 0x02, 0x6d, 0x07, 0x63, 0x6a, 0x64, 0x13, 0xa6, 0x48, 0x96, 0x1c, 0xdb, 0x71, + 0xee, 0x8b, 0x3c, 0x46, 0xdf, 0xa2, 0x2f, 0xd0, 0xfb, 0xbe, 0x4b, 0xdf, 0xa0, 0x38, 0x33, 0x94, + 0x2c, 0x29, 0x0d, 0x7a, 0x27, 0x7e, 0xe7, 0x3b, 0xe7, 0xcc, 0x39, 0xdf, 0x37, 0x23, 0x30, 0x7f, + 0xba, 0x0e, 0xfc, 0xff, 0xc9, 0x94, 0xfb, 0xe2, 0x79, 0x92, 0xc6, 0x32, 0x26, 0xc5, 0xe4, 0xbc, + 0x9b, 0x80, 0x31, 0x96, 0xa9, 0xe0, 0xb3, 0xe3, 0x94, 0xcf, 0x84, 0x13, 0x4d, 0x63, 0xf2, 0x10, + 0x1a, 0x99, 0x82, 0x58, 0x30, 0xe9, 0x14, 0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xf1, 0x01, 0x6c, 0x5b, 0xa3, 0xd1, 0xc0, 0xe9, 0x59, 0xaa, + 0xe5, 0xc0, 0x39, 0x75, 0x3c, 0xbb, 0x6f, 0x96, 0x31, 0x60, 0xbf, 0xf7, 0x6c, 0xea, 0x5a, 0x03, + 0x36, 0xb2, 0x50, 0x25, 0xcf, 0xa6, 0x63, 0xb3, 0x72, 0x90, 0x02, 0xf9, 0xdc, 0xcf, 0x48, 0xff, + 0x0b, 0x47, 0x9b, 0x1b, 0x78, 0x0c, 0xcf, 0x72, 0x06, 0xd8, 0x6f, 0xcc, 0x46, 0x74, 0x78, 0x64, + 0x9b, 0x05, 0x94, 0x91, 0x7a, 0xc3, 0x55, 0x6a, 0x11, 0xa7, 0x47, 0x82, 0xe3, 0xbe, 0x59, 0x8d, + 0x94, 0xfe, 0x0c, 0x00, 0x00, 0xff, 0xff, 0x86, 0xf9, 0xef, 0x6e, 0x42, 0x0a, 0x00, 0x00, +} diff --git a/quictrace/pb/quic-trace.proto b/quictrace/pb/quic-trace.proto new file mode 100644 index 000000000..e3e9afaee --- /dev/null +++ b/quictrace/pb/quic-trace.proto @@ -0,0 +1,184 @@ +// copied from https://github.com/google/quic-trace/ +// Only changed the package name. + +syntax = "proto2"; + +package pb; + +enum FrameType { + UNKNOWN_FRAME = 0; + + STREAM = 1; + ACK = 2; + RESET_STREAM = 3; + CONNECTION_CLOSE = 4; + MAX_DATA = 5; + MAX_STREAM_DATA = 6; + PING = 7; + BLOCKED = 8; + STREAM_BLOCKED = 9; + PADDING = 10; +}; + +// Metadata for STREAM frames. +message StreamFrameInfo { + optional uint64 stream_id = 1; + optional bool fin = 2; + optional uint64 length = 3; + optional uint64 offset = 4; +}; + +// The intervals are closed, i.e. the interval represented here is +// [first_packet, last_packet]. +message AckBlock { + optional uint64 first_packet = 1; + optional uint64 last_packet = 2; +}; + +// Metadata for ACK frames. +message AckInfo { + repeated AckBlock acked_packets = 1; + optional uint64 ack_delay_us = 2; +}; + +// Metadata for RST_STREAM frames. +message ResetStreamInfo { + optional uint64 stream_id = 1; + optional uint32 application_error_code = 2; + optional uint64 final_offset = 3; +}; + +// Metadata for CONNECTION_CLOSE/APPLICATION_CLOSE frames. +message CloseInfo { + optional uint32 error_code = 1; + optional string reason_phrase = 2; +}; + +// Metadata for MAX_DATA/MAX_STREAM_DATA frames. +message FlowControlInfo { + optional uint64 max_data = 1; + optional uint64 stream_id = 2; +}; + +// A message representing a frame, either sent or received. +message Frame { + optional FrameType frame_type = 1; + + optional StreamFrameInfo stream_frame_info = 2; + optional AckInfo ack_info = 3; + optional ResetStreamInfo reset_stream_info = 4; + optional CloseInfo close_info = 5; + optional FlowControlInfo flow_control_info = 6; +}; + +// Metadata that represents transport stack's understanding of the current state +// of the transport channel. +message TransportState { + optional uint64 min_rtt_us = 1; + // Smoothed RTT, usually computed using EWMA. + optional uint64 smoothed_rtt_us = 2; + // The latest RTT measureent available. + optional uint64 last_rtt_us = 3; + + optional uint64 in_flight_bytes = 4; + optional uint64 cwnd_bytes = 5; + // Pacing rate, in bits per second. + optional uint64 pacing_rate_bps = 6; + + // Any arbitrary information about congestion control state that is not + // representable via parameters above. + optional string congestion_control_state = 7; +}; + +// Documents external network parameters supplied to the sender. Typically not +// all of those would be supplied (e.g. if bandwidth and RTT are supplied, you +// can infer the suggested CWND), but there are no restrictions on which fields +// may or may not be set. +message ExternalNetworkParameters { + optional uint64 bandwidth_bps = 1; // in bits per second + optional uint64 rtt_us = 2; + optional uint64 cwnd_bytes = 3; +}; + +enum EncryptionLevel { + ENCRYPTION_UNKNOWN = 0; + + ENCRYPTION_INITIAL = 1; + ENCRYPTION_0RTT = 2; + ENCRYPTION_1RTT = 3; + ENCRYPTION_HANDSHAKE = 4; +}; + +enum EventType { + UNKNOWN_EVENT = 0; + + PACKET_SENT = 1; + PACKET_RECEIVED = 2; + PACKET_LOST = 3; + + // An APPLICATION_LIMITED event occurs when the sender is capable of sending + // more data and tries to send it, but discovers that it does not have any + // outstanding data to send. Such events are important to some congestion + // control algorithms (for example, BBR) since they are trying to measure the + // largest achievable throughput, but it is impossible to measure it when the + // application does not send anything. + APPLICATION_LIMITED = 4; + + // Record when external information about expected network conditions + // (available bandwidth, RTT, congestion window, etc) is supplied to the + // sender. + EXTERNAL_PARAMETERS = 5; +}; + +enum TransmissionReason { + // Indicates that there was not any particular special reason the packet was + // sent. + NORMAL_TRANSMISSION = 0; + + // Indicates that the packet sent is a tail loss probe, cf. + // https://tools.ietf.org/html/draft-ietf-quic-recovery-14#section-4.3.2 + TAIL_LOSS_PROBE = 1; + + // Indicates that the packet is sent due to retransmission timeout, cf + // https://tools.ietf.org/html/draft-ietf-quic-recovery-14#section-4.3.3 + RTO_TRANSMISSION = 2; + + // Indicates that the packet is sent in order to probe whether there is extra + // bandwidth available in cases where the sender needs an estimate of + // available bandwidth, but the application does not provide enough data for + // such estimate to become naturally available. This is usually only used in + // real-time protocols. + PROBING_TRANSMISSION = 3; +}; + +// An event that has occurred over duration of the connection. +message Event { + optional uint64 time_us = 1; + optional EventType event_type = 2; + + optional uint64 packet_number = 3; + repeated Frame frames = 4; + optional uint64 packet_size = 5; + optional EncryptionLevel encryption_level = 6; + // State of the transport stack after the event has happened. + optional TransportState transport_state = 7; + // For event_type = EXTERNAL_PARAMETERS, record parameters specified. + optional ExternalNetworkParameters external_network_parameters = 8; + + // For sent packets, indicate if there is a special reason for why the packet + // in question was transmitted. + optional TransmissionReason transmission_reason = 9 + [default = NORMAL_TRANSMISSION]; +}; + +message Trace { + // QUIC version tag, as represented on wire. Should be always 4 bytes long. + optional bytes protocol_version = 1; + + // Source and destination connection ID. If multiple connection IDs are used, + // record the first one used with short-form header. + optional bytes source_connection_id = 2; + optional bytes destination_connection_id = 3; + + repeated Event events = 4; +};