#include "quiche/http2/core/spdy_protocol.h"
#include <cstddef>
#include <cstdint>
#include <limits>
#include <memory>
#include <ostream>
#include <string>
#include <utility>
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "quiche/http2/core/spdy_alt_svc_wire_format.h"
#include "quiche/common/platform/api/quiche_bug_tracker.h"
#include "quiche/common/platform/api/quiche_flag_utils.h"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/spdy/core/http2_header_block.h"
namespace spdy {
const char* const kHttp2ConnectionHeaderPrefix = …;
std::ostream& operator<<(std::ostream& out, SpdyKnownSettingsId id) { … }
std::ostream& operator<<(std::ostream& out, SpdyFrameType frame_type) { … }
SpdyPriority ClampSpdy3Priority(SpdyPriority priority) { … }
int ClampHttp2Weight(int weight) { … }
int Spdy3PriorityToHttp2Weight(SpdyPriority priority) { … }
SpdyPriority Http2WeightToSpdy3Priority(int weight) { … }
bool IsDefinedFrameType(uint8_t frame_type_field) { … }
SpdyFrameType ParseFrameType(uint8_t frame_type_field) { … }
uint8_t SerializeFrameType(SpdyFrameType frame_type) { … }
bool IsValidHTTP2FrameStreamId(SpdyStreamId current_frame_stream_id,
SpdyFrameType frame_type_field) { … }
const char* FrameTypeToString(SpdyFrameType frame_type) { … }
bool ParseSettingsId(SpdySettingsId wire_setting_id,
SpdyKnownSettingsId* setting_id) { … }
std::string SettingsIdToString(SpdySettingsId id) { … }
SpdyErrorCode ParseErrorCode(uint32_t wire_error_code) { … }
const char* ErrorCodeToString(SpdyErrorCode error_code) { … }
const char* WriteSchedulerTypeToString(WriteSchedulerType type) { … }
size_t GetNumberRequiredContinuationFrames(size_t size) { … }
const char* const kHttp2Npn = …;
const char* const kHttp2AuthorityHeader = …;
const char* const kHttp2MethodHeader = …;
const char* const kHttp2PathHeader = …;
const char* const kHttp2SchemeHeader = …;
const char* const kHttp2ProtocolHeader = …;
const char* const kHttp2StatusHeader = …;
bool SpdyFrameIR::fin() const { … }
int SpdyFrameIR::flow_control_window_consumed() const { … }
bool SpdyFrameWithFinIR::fin() const { … }
SpdyFrameWithHeaderBlockIR::SpdyFrameWithHeaderBlockIR(
SpdyStreamId stream_id, Http2HeaderBlock header_block)
: … { … }
SpdyFrameWithHeaderBlockIR::~SpdyFrameWithHeaderBlockIR() = default;
SpdyDataIR::SpdyDataIR(SpdyStreamId stream_id, absl::string_view data)
: … { … }
SpdyDataIR::SpdyDataIR(SpdyStreamId stream_id, const char* data)
: … { … }
SpdyDataIR::SpdyDataIR(SpdyStreamId stream_id, std::string data)
: … { … }
SpdyDataIR::SpdyDataIR(SpdyStreamId stream_id)
: … { … }
SpdyDataIR::~SpdyDataIR() = default;
void SpdyDataIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyDataIR::frame_type() const { … }
int SpdyDataIR::flow_control_window_consumed() const { … }
size_t SpdyDataIR::size() const { … }
SpdyRstStreamIR::SpdyRstStreamIR(SpdyStreamId stream_id,
SpdyErrorCode error_code)
: … { … }
SpdyRstStreamIR::~SpdyRstStreamIR() = default;
void SpdyRstStreamIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyRstStreamIR::frame_type() const { … }
size_t SpdyRstStreamIR::size() const { … }
SpdySettingsIR::SpdySettingsIR() : … { … }
SpdySettingsIR::~SpdySettingsIR() = default;
void SpdySettingsIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdySettingsIR::frame_type() const { … }
size_t SpdySettingsIR::size() const { … }
void SpdyPingIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyPingIR::frame_type() const { … }
size_t SpdyPingIR::size() const { … }
SpdyGoAwayIR::SpdyGoAwayIR(SpdyStreamId last_good_stream_id,
SpdyErrorCode error_code,
absl::string_view description)
: … { … }
SpdyGoAwayIR::SpdyGoAwayIR(SpdyStreamId last_good_stream_id,
SpdyErrorCode error_code, const char* description)
: … { … }
SpdyGoAwayIR::SpdyGoAwayIR(SpdyStreamId last_good_stream_id,
SpdyErrorCode error_code, std::string description)
: … { … }
SpdyGoAwayIR::~SpdyGoAwayIR() = default;
void SpdyGoAwayIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyGoAwayIR::frame_type() const { … }
size_t SpdyGoAwayIR::size() const { … }
SpdyContinuationIR::SpdyContinuationIR(SpdyStreamId stream_id)
: … { … }
SpdyContinuationIR::~SpdyContinuationIR() = default;
void SpdyContinuationIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyContinuationIR::frame_type() const { … }
size_t SpdyContinuationIR::size() const { … }
void SpdyHeadersIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyHeadersIR::frame_type() const { … }
size_t SpdyHeadersIR::size() const { … }
void SpdyWindowUpdateIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyWindowUpdateIR::frame_type() const { … }
size_t SpdyWindowUpdateIR::size() const { … }
void SpdyPushPromiseIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyPushPromiseIR::frame_type() const { … }
size_t SpdyPushPromiseIR::size() const { … }
SpdyAltSvcIR::SpdyAltSvcIR(SpdyStreamId stream_id) : … { … }
SpdyAltSvcIR::~SpdyAltSvcIR() = default;
void SpdyAltSvcIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyAltSvcIR::frame_type() const { … }
size_t SpdyAltSvcIR::size() const { … }
void SpdyPriorityIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyPriorityIR::frame_type() const { … }
size_t SpdyPriorityIR::size() const { … }
void SpdyPriorityUpdateIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyPriorityUpdateIR::frame_type() const { … }
size_t SpdyPriorityUpdateIR::size() const { … }
void SpdyAcceptChIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyAcceptChIR::frame_type() const { … }
size_t SpdyAcceptChIR::size() const { … }
void SpdyUnknownIR::Visit(SpdyFrameVisitor* visitor) const { … }
SpdyFrameType SpdyUnknownIR::frame_type() const { … }
size_t SpdyUnknownIR::size() const { … }
int SpdyUnknownIR::flow_control_window_consumed() const { … }
const size_t kPadLengthFieldSize = …;
size_t GetHeaderFrameSizeSansBlock(const SpdyHeadersIR& header_ir) { … }
size_t GetPushPromiseFrameSizeSansBlock(
const SpdyPushPromiseIR& push_promise_ir) { … }
}