GRPC Core
18.0.0
|
#include <grpc/support/port_platform.h>
#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h"
#include <assert.h>
#include <string.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/ext/transport/chttp2/transport/bin_encoder.h"
#include "src/core/ext/transport/chttp2/transport/hpack_table.h"
#include "src/core/ext/transport/chttp2/transport/varint.h"
#include "src/core/lib/debug/stats.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "src/core/lib/surface/validate_metadata.h"
#include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/static_metadata.h"
#include "src/core/lib/transport/timeout_encoding.h"
Data Structures | |
struct | framer_state |
struct | wire_value |
struct | EmitIndexedStatus |
Macros | |
#define | GRPC_HPACK_ENCODER_USE_CUCKOO_HASH 1 |
#define | HASH_FRAGMENT_MASK (GRPC_CHTTP2_HPACKC_NUM_VALUES - 1) |
#define | HASH_FRAGMENT_1(x) ((x)&HASH_FRAGMENT_MASK) |
#define | HASH_FRAGMENT_2(x) (((x) >> GRPC_CHTTP2_HPACKC_NUM_VALUES_BITS) & HASH_FRAGMENT_MASK) |
#define | HASH_FRAGMENT_3(x) (((x) >> (GRPC_CHTTP2_HPACKC_NUM_VALUES_BITS * 2)) & HASH_FRAGMENT_MASK) |
#define | HASH_FRAGMENT_4(x) (((x) >> (GRPC_CHTTP2_HPACKC_NUM_VALUES_BITS * 3)) & HASH_FRAGMENT_MASK) |
#define | ONE_ON_ADD_PROBABILITY (GRPC_CHTTP2_HPACKC_NUM_VALUES >> 1) |
#define | STRLEN_LIT(x) (sizeof(x) - 1) |
#define | TIMEOUT_KEY "grpc-timeout" |
Functions | |
void | grpc_chttp2_hpack_compressor_init (grpc_chttp2_hpack_compressor *c) |
void | grpc_chttp2_hpack_compressor_destroy (grpc_chttp2_hpack_compressor *c) |
void | grpc_chttp2_hpack_compressor_set_max_usable_size (grpc_chttp2_hpack_compressor *c, uint32_t max_table_size) |
void | grpc_chttp2_hpack_compressor_set_max_table_size (grpc_chttp2_hpack_compressor *c, uint32_t max_table_size) |
void | grpc_chttp2_encode_header (grpc_chttp2_hpack_compressor *c, grpc_mdelem **extra_headers, size_t extra_headers_size, grpc_metadata_batch *metadata, const grpc_encode_header_options *options, grpc_slice_buffer *outbuf) |
#define GRPC_HPACK_ENCODER_USE_CUCKOO_HASH 1 |
#define HASH_FRAGMENT_1 | ( | x | ) | ((x)&HASH_FRAGMENT_MASK) |
#define HASH_FRAGMENT_2 | ( | x | ) | (((x) >> GRPC_CHTTP2_HPACKC_NUM_VALUES_BITS) & HASH_FRAGMENT_MASK) |
#define HASH_FRAGMENT_3 | ( | x | ) | (((x) >> (GRPC_CHTTP2_HPACKC_NUM_VALUES_BITS * 2)) & HASH_FRAGMENT_MASK) |
#define HASH_FRAGMENT_4 | ( | x | ) | (((x) >> (GRPC_CHTTP2_HPACKC_NUM_VALUES_BITS * 3)) & HASH_FRAGMENT_MASK) |
#define HASH_FRAGMENT_MASK (GRPC_CHTTP2_HPACKC_NUM_VALUES - 1) |
#define ONE_ON_ADD_PROBABILITY (GRPC_CHTTP2_HPACKC_NUM_VALUES >> 1) |
#define STRLEN_LIT | ( | x | ) | (sizeof(x) - 1) |
#define TIMEOUT_KEY "grpc-timeout" |
void grpc_chttp2_encode_header | ( | grpc_chttp2_hpack_compressor * | c, |
grpc_mdelem ** | extra_headers, | ||
size_t | extra_headers_size, | ||
grpc_metadata_batch * | metadata, | ||
const grpc_encode_header_options * | options, | ||
grpc_slice_buffer * | outbuf | ||
) |
void grpc_chttp2_hpack_compressor_destroy | ( | grpc_chttp2_hpack_compressor * | c | ) |
void grpc_chttp2_hpack_compressor_init | ( | grpc_chttp2_hpack_compressor * | c | ) |
void grpc_chttp2_hpack_compressor_set_max_table_size | ( | grpc_chttp2_hpack_compressor * | c, |
uint32_t | max_table_size | ||
) |
void grpc_chttp2_hpack_compressor_set_max_usable_size | ( | grpc_chttp2_hpack_compressor * | c, |
uint32_t | max_table_size | ||
) |