proxygen
HTTP2Framer.h File Reference
#include <cstdint>
#include <deque>
#include <folly/Optional.h>
#include <folly/Range.h>
#include <folly/io/Cursor.h>
#include <proxygen/lib/http/codec/ErrorCode.h>
#include <proxygen/lib/http/codec/HTTPCodec.h>
#include <proxygen/lib/http/codec/SettingsId.h>
#include <proxygen/lib/utils/Export.h>
#include <string.h>
#include <proxygen/lib/http/codec/HTTP2Constants.h>

Go to the source code of this file.

Classes

struct  proxygen::http2::FrameHeader
 
struct  proxygen::http2::PriorityUpdate
 

Namespaces

 proxygen
 
 proxygen::http2
 

Typedefs

using proxygen::http2::Padding = folly::Optional< uint8_t >
 

Enumerations

enum  proxygen::http2::FrameType : uint8_t {
  proxygen::http2::FrameType::DATA = 0, proxygen::http2::FrameType::HEADERS = 1, proxygen::http2::PRIORITY = 2, proxygen::http2::FrameType::RST_STREAM = 3,
  proxygen::http2::FrameType::SETTINGS = 4, proxygen::http2::FrameType::PUSH_PROMISE = 5, proxygen::http2::FrameType::PING = 6, proxygen::http2::FrameType::GOAWAY = 7,
  proxygen::http2::FrameType::WINDOW_UPDATE = 8, proxygen::http2::FrameType::CONTINUATION = 9, proxygen::http2::FrameType::ALTSVC = 10, proxygen::http2::FrameType::EX_HEADERS = 0xfb,
  proxygen::http2::FrameType::CERTIFICATE_REQUEST = 0xf0, proxygen::http2::FrameType::CERTIFICATE = 0xf1, proxygen::http2::FrameType::CERTIFICATE_NEEDED = 0xf2, proxygen::http2::FrameType::USE_CERTIFICATE = 0xf3
}
 
enum  proxygen::http2::Flags {
  proxygen::http2::ACK = 0x1, proxygen::http2::END_STREAM = 0x1, proxygen::http2::END_HEADERS = 0x4, proxygen::http2::PADDED = 0x8,
  proxygen::http2::PRIORITY = 0x20, proxygen::http2::PRIORITY = 2, proxygen::http2::UNIDIRECTIONAL = 0x40, proxygen::http2::UNSOLICITED = 0x1,
  proxygen::http2::TO_BE_CONTINUED = 0x1
}
 

Functions

bool proxygen::http2::isValidFrameType (FrameType type)
 
bool proxygen::http2::frameAffectsCompression (FrameType t)
 
bool proxygen::http2::frameHasPadding (const FrameHeader &header)
 
ErrorCode proxygen::http2::parseFrameHeader (Cursor &cursor, FrameHeader &header) noexcept
 
ErrorCode proxygen::http2::parseData (Cursor &cursor, const FrameHeader &header, std::unique_ptr< IOBuf > &outBuf, uint16_t &outPadding) noexcept
 
ErrorCode proxygen::http2::parseDataBegin (Cursor &cursor, const FrameHeader &header, size_t &, uint16_t &outPadding) noexcept
 
ErrorCode proxygen::http2::parseDataEnd (Cursor &cursor, const size_t bufLen, const size_t pendingDataFramePaddingBytes, size_t &toSkip) noexcept
 
ErrorCode proxygen::http2::parseHeaders (Cursor &cursor, const FrameHeader &header, folly::Optional< PriorityUpdate > &outPriority, std::unique_ptr< IOBuf > &outBuf) noexcept
 
ErrorCode proxygen::http2::parseExHeaders (Cursor &cursor, const FrameHeader &header, HTTPCodec::ExAttributes &outExAttributes, folly::Optional< PriorityUpdate > &outPriority, std::unique_ptr< IOBuf > &outBuf) noexcept
 
ErrorCode proxygen::http2::parsePriority (Cursor &cursor, const FrameHeader &header, PriorityUpdate &outPriority) noexcept
 
ErrorCode proxygen::http2::parseRstStream (Cursor &cursor, const FrameHeader &header, ErrorCode &outCode) noexcept
 
ErrorCode proxygen::http2::parseSettings (Cursor &cursor, const FrameHeader &header, std::deque< SettingPair > &settings) noexcept
 
ErrorCode proxygen::http2::parsePushPromise (Cursor &cursor, const FrameHeader &header, uint32_t &outPromisedStream, std::unique_ptr< IOBuf > &outBuf) noexcept
 
ErrorCode proxygen::http2::parsePing (Cursor &cursor, const FrameHeader &header, uint64_t &outOpaqueData) noexcept
 
ErrorCode proxygen::http2::parseGoaway (Cursor &cursor, const FrameHeader &header, uint32_t &outLastStreamID, ErrorCode &outCode, std::unique_ptr< IOBuf > &outDebugData) noexcept
 
ErrorCode proxygen::http2::parseWindowUpdate (Cursor &cursor, const FrameHeader &header, uint32_t &outAmount) noexcept
 
ErrorCode proxygen::http2::parseContinuation (Cursor &cursor, const FrameHeader &header, std::unique_ptr< IOBuf > &outBuf) noexcept
 
ErrorCode proxygen::http2::parseAltSvc (Cursor &cursor, const FrameHeader &header, uint32_t &outMaxAge, uint32_t &outPort, std::string &outProtocol, std::string &outHost, std::string &outOrigin) noexcept
 
ErrorCode proxygen::http2::parseCertificateRequest (folly::io::Cursor &cursor, const FrameHeader &header, uint16_t &outRequestId, std::unique_ptr< folly::IOBuf > &outAuthRequest) noexcept
 
ErrorCode proxygen::http2::parseCertificate (folly::io::Cursor &cursor, const FrameHeader &header, uint16_t &outCertId, std::unique_ptr< folly::IOBuf > &outAuthenticator) noexcept
 
size_t proxygen::http2::writeData (IOBufQueue &queue, std::unique_ptr< IOBuf > data, uint32_t stream, folly::Optional< uint8_t > padding, bool endStream, bool reuseIOBufHeadroom) noexcept
 
size_t proxygen::http2::writeHeaders (IOBufQueue &queue, std::unique_ptr< IOBuf > headers, uint32_t stream, folly::Optional< PriorityUpdate > priority, folly::Optional< uint8_t > padding, bool endStream, bool endHeaders) noexcept
 
size_t proxygen::http2::writeExHeaders (IOBufQueue &queue, std::unique_ptr< IOBuf > headers, uint32_t stream, const HTTPCodec::ExAttributes &exAttributes, const folly::Optional< PriorityUpdate > &priority, const folly::Optional< uint8_t > &padding, bool endStream, bool endHeaders) noexcept
 
size_t proxygen::http2::writePriority (IOBufQueue &queue, uint32_t stream, PriorityUpdate priority) noexcept
 
size_t proxygen::http2::writeRstStream (IOBufQueue &queue, uint32_t stream, ErrorCode errorCode) noexcept
 
size_t proxygen::http2::writeSettings (IOBufQueue &queue, const std::deque< SettingPair > &settings)
 
size_t proxygen::http2::writeSettingsAck (IOBufQueue &queue)
 
size_t proxygen::http2::writePushPromise (IOBufQueue &queue, uint32_t associatedStream, uint32_t promisedStream, std::unique_ptr< IOBuf > headers, folly::Optional< uint8_t > padding, bool endHeaders) noexcept
 
size_t proxygen::http2::writePing (IOBufQueue &queue, uint64_t opaqueData, bool ack) noexcept
 
size_t proxygen::http2::writeGoaway (IOBufQueue &queue, uint32_t lastStreamID, ErrorCode errorCode, std::unique_ptr< IOBuf > debugData) noexcept
 
size_t proxygen::http2::writeWindowUpdate (IOBufQueue &queue, uint32_t stream, uint32_t amount) noexcept
 
size_t proxygen::http2::writeContinuation (IOBufQueue &queue, uint32_t stream, bool endHeaders, std::unique_ptr< IOBuf > headers) noexcept
 
size_t proxygen::http2::writeAltSvc (IOBufQueue &queue, uint32_t stream, uint32_t maxAge, uint16_t port, StringPiece protocol, StringPiece host, StringPiece origin) noexcept
 
size_t proxygen::http2::writeCertificateRequest (folly::IOBufQueue &writeBuf, uint16_t requestId, std::unique_ptr< folly::IOBuf > authRequest)
 
size_t proxygen::http2::writeCertificate (folly::IOBufQueue &writeBuf, uint16_t certId, std::unique_ptr< folly::IOBuf > authenticator, bool toBeContinued)
 
const char * proxygen::http2::getFrameTypeString (FrameType type)