Data Structures | Functions | Variables

HTTP2.cc File Reference

Fundamental HTTP/2 protocol definitions and parsers. More...

#include "HTTP2.h"
#include "ink_assert.h"
Include dependency graph for HTTP2.cc:

Go to the source code of this file.

Data Structures

union  byte_pointer
union  byte_addressable_value< T >

Functions

static void write_and_advance (byte_pointer &dst, uint32_t src)
static void write_and_advance (byte_pointer &dst, uint16_t src)
static void write_and_advance (byte_pointer &dst, uint8_t src)
template<unsigned N>
static void memcpy_and_advance (uint8_t(&dst)[N], byte_pointer &src)
void memcpy_and_advance (uint8_t(&dst), byte_pointer &src)
static bool http2_are_frame_flags_valid (uint8_t ftype, uint8_t fflags)
bool http2_frame_header_is_valid (const Http2FrameHeader &hdr)
bool http2_settings_parameter_is_valid (const Http2SettingsParameter &param)
bool http2_parse_frame_header (IOVec iov, Http2FrameHeader &hdr)
bool http2_write_frame_header (const Http2FrameHeader &hdr, IOVec iov)
bool http2_write_goaway (const Http2Goaway &goaway, IOVec iov)
bool http2_parse_settings_parameter (IOVec iov, Http2SettingsParameter &param)

Variables

const char *const HTTP2_CONNECTION_PREFACE = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"

Detailed Description

Fundamental HTTP/2 protocol definitions and parsers.

License

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.cc.


Function Documentation

static bool http2_are_frame_flags_valid ( uint8_t  ftype,
uint8_t  fflags 
) [static]

Definition at line 87 of file HTTP2.cc.

Referenced by http2_frame_header_is_valid().

bool http2_frame_header_is_valid ( const Http2FrameHeader hdr  ) 
bool http2_parse_frame_header ( IOVec  iov,
Http2FrameHeader hdr 
)
bool http2_parse_settings_parameter ( IOVec  iov,
Http2SettingsParameter param 
)
bool http2_settings_parameter_is_valid ( const Http2SettingsParameter param  ) 
bool http2_write_frame_header ( const Http2FrameHeader hdr,
IOVec  iov 
)
bool http2_write_goaway ( const Http2Goaway goaway,
IOVec  iov 
)
void memcpy_and_advance ( uint8_t &  dst,
byte_pointer src 
)

Definition at line 80 of file HTTP2.cc.

References byte_pointer::u8.

template<unsigned N>
static void memcpy_and_advance ( uint8_t(&)  dst[N],
byte_pointer src 
) [static]

Definition at line 73 of file HTTP2.cc.

References memcpy, and byte_pointer::u8.

Referenced by http2_parse_frame_header(), and http2_parse_settings_parameter().

static void write_and_advance ( byte_pointer dst,
uint16_t  src 
) [static]
static void write_and_advance ( byte_pointer dst,
uint32_t  src 
) [static]
static void write_and_advance ( byte_pointer dst,
uint8_t  src 
) [static]

Definition at line 66 of file HTTP2.cc.

References byte_pointer::u8.


Variable Documentation

const char* const HTTP2_CONNECTION_PREFACE = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"

Definition at line 27 of file HTTP2.cc.

Referenced by proto_is_http2().