• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2017 gRPC authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /*
18  * Automatically generated by tools/codegen/core/gen_settings_ids.py
19  */
20 
21 #ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H
22 #define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H
23 
24 #include <grpc/support/port_platform.h>
25 
26 #include <stdbool.h>
27 #include <stdint.h>
28 
29 typedef enum {
30   GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE = 0,               /* wire id 1 */
31   GRPC_CHTTP2_SETTINGS_ENABLE_PUSH = 1,                     /* wire id 2 */
32   GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS = 2,          /* wire id 3 */
33   GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE = 3,             /* wire id 4 */
34   GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE = 4,                  /* wire id 5 */
35   GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE = 5,            /* wire id 6 */
36   GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA = 6, /* wire id 65027 */
37 } grpc_chttp2_setting_id;
38 
39 #define GRPC_CHTTP2_NUM_SETTINGS 7
40 
41 extern const uint16_t grpc_setting_id_to_wire_id[];
42 
43 bool grpc_wire_id_to_setting_id(uint32_t wire_id, grpc_chttp2_setting_id* out);
44 
45 typedef enum {
46   GRPC_CHTTP2_CLAMP_INVALID_VALUE,
47   GRPC_CHTTP2_DISCONNECT_ON_INVALID_VALUE
48 } grpc_chttp2_invalid_value_behavior;
49 
50 typedef struct {
51   const char* name;
52   uint32_t default_value;
53   uint32_t min_value;
54   uint32_t max_value;
55   grpc_chttp2_invalid_value_behavior invalid_value_behavior;
56   uint32_t error_value;
57 } grpc_chttp2_setting_parameters;
58 
59 extern const grpc_chttp2_setting_parameters
60     grpc_chttp2_settings_parameters[GRPC_CHTTP2_NUM_SETTINGS];
61 
62 #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_SETTINGS_H */
63