VLC 4.0.0-dev
|
Data Structures | |
struct | vlc_h2_parser |
HTTP/2 incoming frames parser. More... | |
Macros | |
#define | vlc_h2_frame_payload(f) ((f)->data + 9) |
Typedefs | |
typedef int(* | vlc_h2_parser) (struct vlc_h2_parser *, struct vlc_h2_frame *, size_t, uint_fast32_t) |
Enumerations | |
enum | { VLC_H2_FRAME_DATA , VLC_H2_FRAME_HEADERS , VLC_H2_FRAME_PRIORITY , VLC_H2_FRAME_RST_STREAM , VLC_H2_FRAME_SETTINGS , VLC_H2_FRAME_PUSH_PROMISE , VLC_H2_FRAME_PING , VLC_H2_FRAME_GOAWAY , VLC_H2_FRAME_WINDOW_UPDATE , VLC_H2_FRAME_CONTINUATION } |
enum | { VLC_H2_DATA_END_STREAM = 0x01 , VLC_H2_DATA_PADDED = 0x08 } |
enum | { VLC_H2_HEADERS_END_STREAM = 0x01 , VLC_H2_HEADERS_END_HEADERS = 0x04 , VLC_H2_HEADERS_PADDED = 0x08 , VLC_H2_HEADERS_PRIORITY = 0x20 } |
enum | { VLC_H2_SETTINGS_ACK = 0x01 } |
enum | { VLC_H2_PUSH_PROMISE_END_HEADERS = 0x04 , VLC_H2_PUSH_PROMISE_PADDED = 0x08 } |
enum | { VLC_H2_PING_ACK = 0x01 } |
enum | { VLC_H2_CONTINUATION_END_HEADERS = 0x04 } |
Functions | |
static struct vlc_h2_frame * | vlc_h2_frame_alloc (uint_fast8_t type, uint_fast8_t flags, uint_fast32_t stream_id, size_t length) |
static uint_fast32_t | vlc_h2_frame_length (const struct vlc_h2_frame *f) |
size_t | vlc_h2_frame_size (const struct vlc_h2_frame *f) |
static uint_fast8_t | vlc_h2_frame_type (const struct vlc_h2_frame *f) |
static uint_fast8_t | vlc_h2_frame_flags (const struct vlc_h2_frame *f) |
static uint_fast32_t | vlc_h2_frame_id (const struct vlc_h2_frame *f) |
static const char * | vlc_h2_type_name (uint_fast8_t type) |
struct vlc_h2_frame * | vlc_h2_frame_headers (uint_fast32_t stream_id, uint_fast32_t mtu, bool eos, unsigned count, const char *const headers[][2]) |
struct vlc_h2_frame * | vlc_h2_frame_data (uint_fast32_t stream_id, const void *buf, size_t len, bool eos) |
struct vlc_h2_frame * | vlc_h2_frame_rst_stream (uint_fast32_t stream_id, uint_fast32_t error_code) |
struct vlc_h2_frame * | vlc_h2_frame_settings (void) |
struct vlc_h2_frame * | vlc_h2_frame_settings_ack (void) |
const char * | vlc_h2_setting_name (uint_fast16_t id) |
struct vlc_h2_frame * | vlc_h2_frame_ping (uint64_t opaque) |
struct vlc_h2_frame * | vlc_h2_frame_pong (uint64_t opaque) |
struct vlc_h2_frame * | vlc_h2_frame_goaway (uint_fast32_t last_stream_id, uint_fast32_t error_code) |
struct vlc_h2_frame * | vlc_h2_frame_window_update (uint_fast32_t stream_id, uint_fast32_t credit) |
const char * | vlc_h2_strerror (uint_fast32_t code) |
void | vlc_h2_frame_dump (void *opaque, const struct vlc_h2_frame *f, const char *msg) |
const uint8_t *() | vlc_h2_frame_data_get (const struct vlc_h2_frame *f, size_t *restrict lenp) |
static int | vlc_h2_parse_generic (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses any HTTP/2 frame. More... | |
static int | vlc_h2_parse_headers_block (struct vlc_h2_parser *, struct vlc_h2_frame *, size_t, uint_fast32_t) |
static int | vlc_h2_parse_error (struct vlc_h2_parser *p, uint_fast32_t code) |
static int | vlc_h2_stream_error (struct vlc_h2_parser *p, uint_fast32_t id, uint_fast32_t code) |
static void * | vlc_h2_stream_lookup (struct vlc_h2_parser *p, uint_fast32_t id) |
static void | vlc_h2_parse_headers_start (struct vlc_h2_parser *p, uint_fast32_t sid, bool eos) |
static int | vlc_h2_parse_headers_append (struct vlc_h2_parser *p, const uint8_t *data, size_t len) |
static int | vlc_h2_parse_headers_end (struct vlc_h2_parser *p) |
static int | vlc_h2_parse_frame_data (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 DATA frame. More... | |
static int | vlc_h2_parse_frame_headers (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 HEADERS frame. More... | |
static int | vlc_h2_parse_frame_priority (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 PRIORITY frame. More... | |
static int | vlc_h2_parse_frame_rst_stream (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 RST_STREAM frame. More... | |
static int | vlc_h2_parse_frame_settings (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 SETTINGS frame. More... | |
static int | vlc_h2_parse_frame_push_promise (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 PUSH_PROMISE frame. More... | |
static int | vlc_h2_parse_frame_ping (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 PING frame. More... | |
static int | vlc_h2_parse_frame_goaway (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 GOAWAY frame. More... | |
static int | vlc_h2_parse_frame_window_update (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 WINDOW_UPDATE frame. More... | |
static int | vlc_h2_parse_frame_continuation (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 CONTINUATION frame. More... | |
static int | vlc_h2_parse_frame_unknown (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses an HTTP/2 frame of unknown type. More... | |
static int | vlc_h2_parse_preface (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
Parses the HTTP/2 connection preface. More... | |
static int | vlc_h2_parse_failed (struct vlc_h2_parser *p, struct vlc_h2_frame *f, size_t len, uint_fast32_t id) |
int | vlc_h2_parse (struct vlc_h2_parser *p, struct vlc_h2_frame *f) |
struct vlc_h2_parser * | vlc_h2_parse_init (void *ctx, const struct vlc_h2_parser_cbs *cbs) |
void | vlc_h2_parse_destroy (struct vlc_h2_parser *p) |
Variables | |
static const vlc_h2_parser | vlc_h2_parsers [] |
#define vlc_h2_frame_payload | ( | f | ) | ((f)->data + 9) |
typedef int(* vlc_h2_parser) (struct vlc_h2_parser *, struct vlc_h2_frame *, size_t, uint_fast32_t) |
anonymous enum |
anonymous enum |
|
static |
References vlc_h2_frame::data, vlc_h2_frame::next, SetDWBE(), unlikely, and VLC_H2_MAX_MAX_FRAME.
Referenced by vlc_h2_frame_data(), vlc_h2_frame_goaway(), vlc_h2_frame_headers(), vlc_h2_frame_ping(), vlc_h2_frame_pong(), vlc_h2_frame_rst_stream(), vlc_h2_frame_settings(), vlc_h2_frame_settings_ack(), and vlc_h2_frame_window_update().
|
static |
References vlc_h2_frame::data.
Referenced by vlc_h2_frame_data_get(), vlc_h2_frame_dump(), vlc_h2_parse_frame_continuation(), vlc_h2_parse_frame_data(), vlc_h2_parse_frame_headers(), vlc_h2_parse_frame_ping(), vlc_h2_parse_frame_push_promise(), vlc_h2_parse_frame_settings(), and vlc_h2_parse_preface().
|
static |
References vlc_h2_frame::data, and GetDWBE.
Referenced by vlc_h2_frame_dump(), and vlc_h2_parse().
|
static |
References vlc_h2_frame::data.
Referenced by vlc_h2_frame_data_get(), vlc_h2_frame_dump(), vlc_h2_frame_size(), and vlc_h2_parse().
|
static |
References vlc_h2_frame::data.
Referenced by vlc_h2_frame_data_get(), vlc_h2_frame_dump(), vlc_h2_parse_generic(), vlc_h2_parse_headers_block(), and vlc_h2_parse_preface().
|
static |
References p.
Referenced by vlc_h2_parse_frame_continuation(), vlc_h2_parse_frame_data(), vlc_h2_parse_frame_goaway(), vlc_h2_parse_frame_headers(), vlc_h2_parse_frame_ping(), vlc_h2_parse_frame_priority(), vlc_h2_parse_frame_push_promise(), vlc_h2_parse_frame_rst_stream(), vlc_h2_parse_frame_settings(), vlc_h2_parse_frame_unknown(), vlc_h2_parse_frame_window_update(), vlc_h2_parse_headers_append(), vlc_h2_parse_headers_block(), vlc_h2_parse_headers_end(), and vlc_h2_parse_preface().
|
static |
References p.
Referenced by vlc_h2_parse().
|
static |
Parses an HTTP/2 CONTINUATION frame.
References p, VLC_H2_CONTINUATION_END_HEADERS, vlc_h2_frame_flags(), vlc_h2_frame_payload, VLC_H2_FRAME_SIZE_ERROR, VLC_H2_MAX_FRAME, vlc_h2_parse_error(), vlc_h2_parse_headers_append(), vlc_h2_parse_headers_end(), and VLC_H2_PROTOCOL_ERROR.
Referenced by vlc_h2_parse_headers_block().
|
static |
Parses an HTTP/2 DATA frame.
References p, VLC_H2_DATA_END_STREAM, VLC_H2_DATA_PADDED, VLC_H2_FLOW_CONTROL_ERROR, vlc_h2_frame_flags(), vlc_h2_frame_payload, VLC_H2_FRAME_SIZE_ERROR, VLC_H2_MAX_FRAME, vlc_h2_parse_error(), VLC_H2_PROTOCOL_ERROR, VLC_H2_STREAM_CLOSED, vlc_h2_stream_error(), and vlc_h2_stream_lookup().
|
static |
Parses an HTTP/2 GOAWAY frame.
References GetDWBE, p, vlc_h2_frame_payload, VLC_H2_FRAME_SIZE_ERROR, VLC_H2_MAX_FRAME, vlc_h2_parse_error(), and VLC_H2_PROTOCOL_ERROR.
|
static |
Parses an HTTP/2 HEADERS frame.
References p, vlc_h2_frame_flags(), vlc_h2_frame_payload, VLC_H2_FRAME_SIZE_ERROR, VLC_H2_HEADERS_END_HEADERS, VLC_H2_HEADERS_END_STREAM, VLC_H2_HEADERS_PADDED, VLC_H2_HEADERS_PRIORITY, VLC_H2_MAX_FRAME, vlc_h2_parse_error(), vlc_h2_parse_headers_append(), vlc_h2_parse_headers_end(), vlc_h2_parse_headers_start(), and VLC_H2_PROTOCOL_ERROR.
|
static |
Parses an HTTP/2 PING frame.
References p, vlc_h2_frame_flags(), vlc_h2_frame_payload, VLC_H2_FRAME_SIZE_ERROR, vlc_h2_parse_error(), VLC_H2_PING_ACK, and VLC_H2_PROTOCOL_ERROR.
|
static |
Parses an HTTP/2 PRIORITY frame.
References p, VLC_H2_FRAME_SIZE_ERROR, vlc_h2_parse_error(), VLC_H2_PROTOCOL_ERROR, and vlc_h2_stream_error().
|
static |
Parses an HTTP/2 PUSH_PROMISE frame.
References p, vlc_h2_frame_flags(), vlc_h2_frame_payload, VLC_H2_FRAME_SIZE_ERROR, VLC_H2_MAX_FRAME, vlc_h2_parse_error(), VLC_H2_PROTOCOL_ERROR, and VLC_H2_PUSH_PROMISE_PADDED.
|
static |
Parses an HTTP/2 RST_STREAM frame.
References GetDWBE, p, vlc_h2_frame_payload, VLC_H2_FRAME_SIZE_ERROR, vlc_h2_parse_error(), VLC_H2_PROTOCOL_ERROR, and vlc_h2_stream_lookup().
|
static |
Parses an HTTP/2 SETTINGS frame.
References GetDWBE, GetWBE, p, vlc_h2_frame_flags(), vlc_h2_frame_payload, VLC_H2_FRAME_SIZE_ERROR, VLC_H2_MAX_FRAME, vlc_h2_parse_error(), VLC_H2_PROTOCOL_ERROR, and VLC_H2_SETTINGS_ACK.
Referenced by vlc_h2_parse_preface().
|
static |
Parses an HTTP/2 frame of unknown type.
References p, VLC_H2_FRAME_SIZE_ERROR, VLC_H2_MAX_FRAME, vlc_h2_parse_error(), and vlc_h2_stream_error().
Referenced by vlc_h2_parse_generic().
|
static |
Parses an HTTP/2 WINDOW_UPDATE frame.
References GetDWBE, p, vlc_h2_frame_payload, VLC_H2_FRAME_SIZE_ERROR, vlc_h2_parse_error(), VLC_H2_PROTOCOL_ERROR, vlc_h2_stream_error(), and vlc_h2_stream_lookup().
|
static |
Parses any HTTP/2 frame.
References p, vlc_h2_frame_type(), vlc_h2_parse_frame_unknown(), and vlc_h2_parsers.
Referenced by vlc_h2_parse_headers_end(), and vlc_h2_parse_preface().
|
static |
References p, unlikely, VLC_H2_INTERNAL_ERROR, and vlc_h2_parse_error().
Referenced by vlc_h2_parse_frame_continuation(), and vlc_h2_parse_frame_headers().
|
static |
References p, VLC_H2_FRAME_CONTINUATION, vlc_h2_frame_type(), vlc_h2_parse_error(), vlc_h2_parse_frame_continuation(), and VLC_H2_PROTOCOL_ERROR.
Referenced by vlc_h2_parse_headers_start().
|
static |
|
static |
References p, and vlc_h2_parse_headers_block().
Referenced by vlc_h2_parse_frame_headers().
|
static |
Parses the HTTP/2 connection preface.
References p, VLC_H2_DEFAULT_MAX_FRAME, vlc_h2_frame_flags(), VLC_H2_FRAME_SETTINGS, vlc_h2_frame_type(), vlc_h2_parse_error(), vlc_h2_parse_frame_settings(), vlc_h2_parse_generic(), VLC_H2_PROTOCOL_ERROR, and VLC_H2_SETTINGS_ACK.
Referenced by vlc_h2_parse_init().
|
static |
References p.
Referenced by vlc_h2_parse_frame_data(), vlc_h2_parse_frame_priority(), vlc_h2_parse_frame_unknown(), vlc_h2_parse_frame_window_update(), and vlc_h2_parse_headers_end().
|
static |
References p.
Referenced by vlc_h2_parse_frame_data(), vlc_h2_parse_frame_rst_stream(), vlc_h2_parse_frame_window_update(), and vlc_h2_parse_headers_end().
|
static |
|
static |
Referenced by vlc_h2_parse_generic().