#include "net/quic/quic_connection_logger.h"
#include <algorithm>
#include <limits>
#include <memory>
#include <utility>
#include <vector>
#include "base/metrics/histogram_base.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/values.h"
#include "net/base/ip_address.h"
#include "net/cert/x509_certificate.h"
#include "net/quic/address_utils.h"
#include "net/quic/quic_address_mismatch.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/crypto_handshake_message.h"
#include "net/third_party/quiche/src/quiche/quic/core/crypto/crypto_protocol.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_connection_id.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_packets.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_socket_address_coder.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_time.h"
#include "net/third_party/quiche/src/quiche/quic/core/quic_utils.h"
kMaxOutgoingPacketSize;
string;
namespace net {
namespace {
AddressFamily GetRealAddressFamily(const IPAddress& address) { … }
}
QuicConnectionLogger::QuicConnectionLogger(
quic::QuicSession* session,
const char* const connection_description,
std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
const NetLogWithSource& net_log)
: … { … }
QuicConnectionLogger::~QuicConnectionLogger() { … }
void QuicConnectionLogger::OnFrameAddedToPacket(const quic::QuicFrame& frame) { … }
void QuicConnectionLogger::OnStreamFrameCoalesced(
const quic::QuicStreamFrame& frame) { … }
void QuicConnectionLogger::OnPacketSent(
quic::QuicPacketNumber packet_number,
quic::QuicPacketLength packet_length,
bool has_crypto_handshake,
quic::TransmissionType transmission_type,
quic::EncryptionLevel encryption_level,
const quic::QuicFrames& retransmittable_frames,
const quic::QuicFrames& nonretransmittable_frames,
quic::QuicTime sent_time,
uint32_t batch_id) { … }
void QuicConnectionLogger::OnPacketLoss(
quic::QuicPacketNumber lost_packet_number,
quic::EncryptionLevel encryption_level,
quic::TransmissionType transmission_type,
quic::QuicTime detection_time) { … }
void QuicConnectionLogger::OnConfigProcessed(
const quic::QuicSentPacketManager::DebugDelegate::SendParameters&
parameters) { … }
void QuicConnectionLogger::OnPingSent() { … }
void QuicConnectionLogger::OnPacketReceived(
const quic::QuicSocketAddress& self_address,
const quic::QuicSocketAddress& peer_address,
const quic::QuicEncryptedPacket& packet) { … }
void QuicConnectionLogger::OnUnauthenticatedHeader(
const quic::QuicPacketHeader& header) { … }
void QuicConnectionLogger::OnIncorrectConnectionId(
quic::QuicConnectionId connection_id) { … }
void QuicConnectionLogger::OnUndecryptablePacket(
quic::EncryptionLevel decryption_level,
bool dropped) { … }
void QuicConnectionLogger::OnAttemptingToProcessUndecryptablePacket(
quic::EncryptionLevel decryption_level) { … }
void QuicConnectionLogger::OnDuplicatePacket(
quic::QuicPacketNumber packet_number) { … }
void QuicConnectionLogger::OnProtocolVersionMismatch(
quic::ParsedQuicVersion received_version) { … }
void QuicConnectionLogger::OnPacketHeader(const quic::QuicPacketHeader& header,
quic::QuicTime receive_time,
quic::EncryptionLevel level) { … }
void QuicConnectionLogger::OnStreamFrame(const quic::QuicStreamFrame& frame) { … }
void QuicConnectionLogger::OnPathChallengeFrame(
const quic::QuicPathChallengeFrame& frame) { … }
void QuicConnectionLogger::OnPathResponseFrame(
const quic::QuicPathResponseFrame& frame) { … }
void QuicConnectionLogger::OnCryptoFrame(const quic::QuicCryptoFrame& frame) { … }
void QuicConnectionLogger::OnStopSendingFrame(
const quic::QuicStopSendingFrame& frame) { … }
void QuicConnectionLogger::OnStreamsBlockedFrame(
const quic::QuicStreamsBlockedFrame& frame) { … }
void QuicConnectionLogger::OnMaxStreamsFrame(
const quic::QuicMaxStreamsFrame& frame) { … }
void QuicConnectionLogger::OnIncomingAck(
quic::QuicPacketNumber ack_packet_number,
quic::EncryptionLevel ack_decrypted_level,
const quic::QuicAckFrame& frame,
quic::QuicTime ack_receive_time,
quic::QuicPacketNumber largest_observed,
bool rtt_updated,
quic::QuicPacketNumber least_unacked_sent_packet) { … }
void QuicConnectionLogger::OnRstStreamFrame(
const quic::QuicRstStreamFrame& frame) { … }
void QuicConnectionLogger::OnConnectionCloseFrame(
const quic::QuicConnectionCloseFrame& frame) { … }
void QuicConnectionLogger::OnWindowUpdateFrame(
const quic::QuicWindowUpdateFrame& frame,
const quic::QuicTime& receive_time) { … }
void QuicConnectionLogger::OnBlockedFrame(const quic::QuicBlockedFrame& frame) { … }
void QuicConnectionLogger::OnGoAwayFrame(const quic::QuicGoAwayFrame& frame) { … }
void QuicConnectionLogger::OnPingFrame(
const quic::QuicPingFrame& frame,
quic::QuicTime::Delta ping_received_delay) { … }
void QuicConnectionLogger::OnPaddingFrame(const quic::QuicPaddingFrame& frame) { … }
void QuicConnectionLogger::OnNewConnectionIdFrame(
const quic::QuicNewConnectionIdFrame& frame) { … }
void QuicConnectionLogger::OnNewTokenFrame(
const quic::QuicNewTokenFrame& frame) { … }
void QuicConnectionLogger::OnRetireConnectionIdFrame(
const quic::QuicRetireConnectionIdFrame& frame) { … }
void QuicConnectionLogger::OnMessageFrame(const quic::QuicMessageFrame& frame) { … }
void QuicConnectionLogger::OnHandshakeDoneFrame(
const quic::QuicHandshakeDoneFrame& frame) { … }
void QuicConnectionLogger::OnCoalescedPacketSent(
const quic::QuicCoalescedPacket& coalesced_packet,
size_t length) { … }
void QuicConnectionLogger::OnVersionNegotiationPacket(
const quic::QuicVersionNegotiationPacket& packet) { … }
void QuicConnectionLogger::OnCryptoHandshakeMessageReceived(
const quic::CryptoHandshakeMessage& message) { … }
void QuicConnectionLogger::OnCryptoHandshakeMessageSent(
const quic::CryptoHandshakeMessage& message) { … }
void QuicConnectionLogger::OnConnectionClosed(
const quic::QuicConnectionCloseFrame& frame,
quic::ConnectionCloseSource source) { … }
void QuicConnectionLogger::OnSuccessfulVersionNegotiation(
const quic::ParsedQuicVersion& version) { … }
void QuicConnectionLogger::UpdateReceivedFrameCounts(
quic::QuicStreamId stream_id,
int num_frames_received,
int num_duplicate_frames_received) { … }
void QuicConnectionLogger::OnCertificateVerified(
const CertVerifyResult& result) { … }
float QuicConnectionLogger::ReceivedPacketLossRate() const { … }
void QuicConnectionLogger::OnRttChanged(quic::QuicTime::Delta rtt) const { … }
void QuicConnectionLogger::OnTransportParametersSent(
const quic::TransportParameters& transport_parameters) { … }
void QuicConnectionLogger::OnTransportParametersReceived(
const quic::TransportParameters& transport_parameters) { … }
void QuicConnectionLogger::OnTransportParametersResumed(
const quic::TransportParameters& transport_parameters) { … }
void QuicConnectionLogger::OnZeroRttRejected(int reason) { … }
void QuicConnectionLogger::OnEncryptedClientHelloSent(
std::string_view client_hello) { … }
void QuicConnectionLogger::RecordAggregatePacketLossRate() const { … }
}