#include "quiche/http2/core/http2_frame_decoder_adapter.h"
#include <stddef.h>
#include <cstdint>
#include <cstring>
#include <memory>
#include <string>
#include "absl/strings/string_view.h"
#include "quiche/http2/core/spdy_alt_svc_wire_format.h"
#include "quiche/http2/core/spdy_headers_handler_interface.h"
#include "quiche/http2/core/spdy_protocol.h"
#include "quiche/http2/decoder/decode_buffer.h"
#include "quiche/http2/decoder/decode_status.h"
#include "quiche/http2/decoder/http2_frame_decoder.h"
#include "quiche/http2/hpack/decoder/hpack_decoding_error.h"
#include "quiche/http2/hpack/hpack_header_table.h"
#include "quiche/http2/http2_constants.h"
#include "quiche/http2/http2_structures.h"
#include "quiche/common/platform/api/quiche_bug_tracker.h"
#include "quiche/common/platform/api/quiche_logging.h"
#include "quiche/common/quiche_endian.h"
#include "quiche/spdy/core/hpack/hpack_decoder_adapter.h"
ExtensionVisitorInterface;
HpackDecoderAdapter;
HpackHeaderTable;
ParseErrorCode;
ParseFrameType;
SpdyAltSvcWireFormat;
SpdyErrorCode;
SpdyFramerDebugVisitorInterface;
SpdyFramerVisitorInterface;
SpdyFrameType;
SpdyHeadersHandlerInterface;
SpdyKnownSettingsId;
SpdySettingsId;
namespace http2 {
namespace {
const bool kHasPriorityFields = …;
const bool kNotHasPriorityFields = …;
bool IsPaddable(Http2FrameType type) { … }
SpdyFrameType ToSpdyFrameType(Http2FrameType type) { … }
uint64_t ToSpdyPingId(const Http2PingFields& ping) { … }
#ifndef NDEBUG
void CorruptFrameHeader(Http2FrameHeader* header) { … }
#else
void CorruptFrameHeader(Http2FrameHeader* ) {}
#endif
Http2DecoderAdapter::SpdyFramerError HpackDecodingErrorToSpdyFramerError(
HpackDecodingError error) { … }
}
const char* Http2DecoderAdapter::StateToString(int state) { … }
const char* Http2DecoderAdapter::SpdyFramerErrorToString(
SpdyFramerError spdy_framer_error) { … }
Http2DecoderAdapter::Http2DecoderAdapter() : … { … }
Http2DecoderAdapter::~Http2DecoderAdapter() = default;
void Http2DecoderAdapter::set_visitor(SpdyFramerVisitorInterface* visitor) { … }
void Http2DecoderAdapter::set_debug_visitor(
SpdyFramerDebugVisitorInterface* debug_visitor) { … }
void Http2DecoderAdapter::set_extension_visitor(
ExtensionVisitorInterface* visitor) { … }
size_t Http2DecoderAdapter::ProcessInput(const char* data, size_t len) { … }
Http2DecoderAdapter::SpdyState Http2DecoderAdapter::state() const { … }
Http2DecoderAdapter::SpdyFramerError Http2DecoderAdapter::spdy_framer_error()
const { … }
bool Http2DecoderAdapter::probable_http_response() const { … }
void Http2DecoderAdapter::StopProcessing() { … }
void Http2DecoderAdapter::SetMaxFrameSize(size_t max_frame_size) { … }
bool Http2DecoderAdapter::OnFrameHeader(const Http2FrameHeader& header) { … }
void Http2DecoderAdapter::OnDataStart(const Http2FrameHeader& header) { … }
void Http2DecoderAdapter::OnDataPayload(const char* data, size_t len) { … }
void Http2DecoderAdapter::OnDataEnd() { … }
void Http2DecoderAdapter::OnHeadersStart(const Http2FrameHeader& header) { … }
void Http2DecoderAdapter::OnHeadersPriority(
const Http2PriorityFields& priority) { … }
void Http2DecoderAdapter::OnHpackFragment(const char* data, size_t len) { … }
void Http2DecoderAdapter::OnHeadersEnd() { … }
void Http2DecoderAdapter::OnPriorityFrame(const Http2FrameHeader& header,
const Http2PriorityFields& priority) { … }
void Http2DecoderAdapter::OnContinuationStart(const Http2FrameHeader& header) { … }
void Http2DecoderAdapter::OnContinuationEnd() { … }
void Http2DecoderAdapter::OnPadLength(size_t trailing_length) { … }
void Http2DecoderAdapter::OnPadding(const char* ,
size_t skipped_length) { … }
void Http2DecoderAdapter::OnRstStream(const Http2FrameHeader& header,
Http2ErrorCode http2_error_code) { … }
void Http2DecoderAdapter::OnSettingsStart(const Http2FrameHeader& header) { … }
void Http2DecoderAdapter::OnSetting(const Http2SettingFields& setting_fields) { … }
void Http2DecoderAdapter::OnSettingsEnd() { … }
void Http2DecoderAdapter::OnSettingsAck(const Http2FrameHeader& header) { … }
void Http2DecoderAdapter::OnPushPromiseStart(
const Http2FrameHeader& header, const Http2PushPromiseFields& promise,
size_t total_padding_length) { … }
void Http2DecoderAdapter::OnPushPromiseEnd() { … }
void Http2DecoderAdapter::OnPing(const Http2FrameHeader& header,
const Http2PingFields& ping) { … }
void Http2DecoderAdapter::OnPingAck(const Http2FrameHeader& header,
const Http2PingFields& ping) { … }
void Http2DecoderAdapter::OnGoAwayStart(const Http2FrameHeader& header,
const Http2GoAwayFields& goaway) { … }
void Http2DecoderAdapter::OnGoAwayOpaqueData(const char* data, size_t len) { … }
void Http2DecoderAdapter::OnGoAwayEnd() { … }
void Http2DecoderAdapter::OnWindowUpdate(const Http2FrameHeader& header,
uint32_t increment) { … }
void Http2DecoderAdapter::OnAltSvcStart(const Http2FrameHeader& header,
size_t origin_length,
size_t value_length) { … }
void Http2DecoderAdapter::OnAltSvcOriginData(const char* data, size_t len) { … }
void Http2DecoderAdapter::OnAltSvcValueData(const char* data, size_t len) { … }
void Http2DecoderAdapter::OnAltSvcEnd() { … }
void Http2DecoderAdapter::OnPriorityUpdateStart(
const Http2FrameHeader& header,
const Http2PriorityUpdateFields& priority_update) { … }
void Http2DecoderAdapter::OnPriorityUpdatePayload(const char* data,
size_t len) { … }
void Http2DecoderAdapter::OnPriorityUpdateEnd() { … }
void Http2DecoderAdapter::OnUnknownStart(const Http2FrameHeader& header) { … }
void Http2DecoderAdapter::OnUnknownPayload(const char* data, size_t len) { … }
void Http2DecoderAdapter::OnUnknownEnd() { … }
void Http2DecoderAdapter::OnPaddingTooLong(const Http2FrameHeader& header,
size_t missing_length) { … }
void Http2DecoderAdapter::OnFrameSizeError(const Http2FrameHeader& header) { … }
size_t Http2DecoderAdapter::ProcessInputFrame(const char* data, size_t len) { … }
void Http2DecoderAdapter::DetermineSpdyState(DecodeStatus status) { … }
void Http2DecoderAdapter::ResetBetweenFrames() { … }
void Http2DecoderAdapter::set_spdy_state(SpdyState v) { … }
void Http2DecoderAdapter::SetSpdyErrorAndNotify(SpdyFramerError error,
std::string detailed_error) { … }
bool Http2DecoderAdapter::HasError() const { … }
const Http2FrameHeader& Http2DecoderAdapter::frame_header() const { … }
uint32_t Http2DecoderAdapter::stream_id() const { … }
Http2FrameType Http2DecoderAdapter::frame_type() const { … }
size_t Http2DecoderAdapter::remaining_total_payload() const { … }
bool Http2DecoderAdapter::IsReadingPaddingLength() { … }
bool Http2DecoderAdapter::IsSkippingPadding() { … }
bool Http2DecoderAdapter::IsDiscardingPayload() { … }
bool Http2DecoderAdapter::IsOkToStartFrame(const Http2FrameHeader& header) { … }
bool Http2DecoderAdapter::HasRequiredStreamId(uint32_t stream_id) { … }
bool Http2DecoderAdapter::HasRequiredStreamId(const Http2FrameHeader& header) { … }
bool Http2DecoderAdapter::HasRequiredStreamIdZero(uint32_t stream_id) { … }
bool Http2DecoderAdapter::HasRequiredStreamIdZero(
const Http2FrameHeader& header) { … }
void Http2DecoderAdapter::ReportReceiveCompressedFrame(
const Http2FrameHeader& header) { … }
void Http2DecoderAdapter::CommonStartHpackBlock() { … }
void Http2DecoderAdapter::MaybeAnnounceEmptyFirstHpackFragment() { … }
void Http2DecoderAdapter::CommonHpackFragmentEnd() { … }
}
namespace spdy {
bool SpdyFramerVisitorInterface::OnGoAwayFrameData(const char* ,
size_t ) { … }
}