Fundamental HTTP/2 protocol definitions and parsers. More...
#include "ink_defs.h"
#include "ink_memory.h"
Go to the source code of this file.
Fundamental HTTP/2 protocol definitions and parsers.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file HTTP2.h.
typedef unsigned Http2StreamId |
typedef int32_t Http2WindowSize |
enum Http2ErrorCode |
enum Http2FrameFlagsData |
enum Http2FrameFlagsPing |
enum Http2FrameType |
bool http2_frame_header_is_valid | ( | const Http2FrameHeader & | ) |
Definition at line 109 of file HTTP2.cc.
References Http2FrameHeader::flags, http2_are_frame_flags_valid(), HTTP2_FRAME_TYPE_MAX, HTTP2_MAX_FRAME_PAYLOAD, Http2FrameHeader::length, and Http2FrameHeader::type.
static bool http2_is_client_streamid | ( | Http2StreamId | streamid | ) | [inline, static] |
static bool http2_is_server_streamid | ( | Http2StreamId | streamid | ) | [inline, static] |
bool http2_parse_frame_header | ( | IOVec | , | |
Http2FrameHeader & | ||||
) |
Definition at line 163 of file HTTP2.cc.
References byte_addressable_value< T >::bytes, Http2FrameHeader::flags, HTTP2_FRAME_HEADER_LEN, Http2FrameHeader::length, memcpy_and_advance(), Http2FrameHeader::streamid, Http2FrameHeader::type, unlikely, and byte_addressable_value< T >::value.
Referenced by Http2Frame::alloc().
bool http2_parse_settings_parameter | ( | IOVec | , | |
Http2SettingsParameter & | ||||
) |
Definition at line 241 of file HTTP2.cc.
References byte_addressable_value< T >::bytes, HTTP2_SETTINGS_PARAMETER_LEN, Http2SettingsParameter::id, memcpy_and_advance(), unlikely, byte_addressable_value< T >::value, and Http2SettingsParameter::value.
Referenced by rcv_settings_frame().
bool http2_settings_parameter_is_valid | ( | const Http2SettingsParameter & | ) |
Definition at line 127 of file HTTP2.cc.
References HTTP2_MAX_WINDOW_SIZE, HTTP2_SETTINGS_MAX, Http2SettingsParameter::id, and Http2SettingsParameter::value.
Referenced by rcv_settings_frame().
bool http2_write_frame_header | ( | const Http2FrameHeader & | , | |
IOVec | ||||
) |
Definition at line 187 of file HTTP2.cc.
References Http2FrameHeader::flags, HTTP2_FRAME_HEADER_LEN, Http2FrameHeader::length, Http2FrameHeader::streamid, Http2FrameHeader::type, unlikely, and write_and_advance().
Referenced by Http2Frame::finalize(), and Http2Frame::Http2Frame().
bool http2_write_goaway | ( | const Http2Goaway & | , | |
IOVec | ||||
) |
Definition at line 216 of file HTTP2.cc.
References Http2Goaway::error_code, HTTP2_GOAWAY_LEN, Http2Goaway::last_streamid, unlikely, and write_and_advance().
Referenced by Http2ConnectionState::main_event_handler().
const char* const HTTP2_CONNECTION_PREFACE |
Definition at line 27 of file HTTP2.cc.
Referenced by proto_is_http2().
const size_t HTTP2_CONNECTION_PREFACE_LEN = 24 |
Definition at line 37 of file HTTP2.h.
Referenced by proto_is_http2().
const size_t HTTP2_FRAME_HEADER_LEN = 8 |
Definition at line 39 of file HTTP2.h.
Referenced by Http2Frame::alloc(), Http2Frame::finalize(), http2_parse_frame_header(), and http2_write_frame_header().
const size_t HTTP2_GOAWAY_LEN = 8 |
Definition at line 40 of file HTTP2.h.
Referenced by http2_write_goaway(), and Http2ConnectionState::main_event_handler().
const Http2WindowSize HTTP2_INITIAL_WINDOW_SIZE = 0x0000FFFF [static] |
const size_t HTTP2_MAX_FRAME_PAYLOAD = 16383 |
Definition at line 44 of file HTTP2.h.
Referenced by http2_frame_header_is_valid().
const Http2WindowSize HTTP2_MAX_WINDOW_SIZE = 0x7FFFFFFF [static] |
Definition at line 219 of file HTTP2.h.
Referenced by http2_settings_parameter_is_valid().
const size_t HTTP2_SETTINGS_PARAMETER_LEN = 5 |
Definition at line 41 of file HTTP2.h.
Referenced by http2_parse_settings_parameter(), and rcv_settings_frame().