qlog dropped Retry packets

This commit is contained in:
Marten Seemann
2020-04-10 13:31:57 +07:00
parent 4ae1a13503
commit 24508a3d39
4 changed files with 59 additions and 20 deletions

View File

@@ -242,20 +242,26 @@ func (t keyUpdateTrigger) String() string {
type PacketDropReason uint8
const (
// PacketDropKeyUnavailable: when a packet is dropped because keys are unavailable
// PacketDropKeyUnavailable is used when a packet is dropped because keys are unavailable
PacketDropKeyUnavailable PacketDropReason = iota
// PacketDropUnknownConnectionID: when a packet is dropped because the connection ID is unknown
// PacketDropUnknownConnectionID is used when a packet is dropped because the connection ID is unknown
PacketDropUnknownConnectionID
// PacketDropHeaderParseError: when a packet is dropped because header parsing failed
// PacketDropHeaderParseError is used when a packet is dropped because header parsing failed
PacketDropHeaderParseError
// PacketDropPayloadDecryptError: when a packet is dropped because decrypting the payload failed
// PacketDropPayloadDecryptError is used when a packet is dropped because decrypting the payload failed
PacketDropPayloadDecryptError
// PacketDropProtocolViolation: when a packet is dropped due to a protocol violation
// PacketDropProtocolViolation is used when a packet is dropped due to a protocol violation
PacketDropProtocolViolation
// PacketDropDOSPrevention: when a packet is dropped to mitigate a DoS attack
// PacketDropDOSPrevention is used when a packet is dropped to mitigate a DoS attack
PacketDropDOSPrevention
// PacketDropUnsupportedVersion: when a packet is dropped because the version is not supported
// PacketDropUnsupportedVersion is used when a packet is dropped because the version is not supported
PacketDropUnsupportedVersion
// PacketDropUnexpectedPacket is used when an unexpected packet is received
PacketDropUnexpectedPacket
// PacketDropUnexpectedSourceConnectionID is used when a packet with an unexpected source connection ID is received
PacketDropUnexpectedSourceConnectionID
// PacketDropUnexpectedVersion is used when a packet with an unexpected version is received
PacketDropUnexpectedVersion
)
func (r PacketDropReason) String() string {
@@ -274,6 +280,12 @@ func (r PacketDropReason) String() string {
return "dos_prevention"
case PacketDropUnsupportedVersion:
return "unsupported_version"
case PacketDropUnexpectedPacket:
return "unexpected_packet"
case PacketDropUnexpectedSourceConnectionID:
return "unexpected_source_connection_id"
case PacketDropUnexpectedVersion:
return "unexpected_version"
default:
panic("unknown packet drop reason")
}