Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
h2_config.h
Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. 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 #ifndef __mod_h2__h2_config_h__
18 #define __mod_h2__h2_config_h__
19 
20 #undef PACKAGE_VERSION
21 #undef PACKAGE_TARNAME
22 #undef PACKAGE_STRING
23 #undef PACKAGE_NAME
24 #undef PACKAGE_BUGREPORT
25 
26 typedef enum {
46 
47 struct apr_hash_t;
48 struct h2_priority;
49 struct h2_push_res;
50 
51 typedef struct h2_push_res {
52  const char *uri_ref;
53  int critical;
54 } h2_push_res;
55 
56 /* Apache httpd module configuration for h2. */
57 typedef struct h2_config {
58  const char *name;
59  int h2_max_streams; /* max concurrent # streams (http2) */
60  int h2_window_size; /* stream window size (http2) */
61  int min_workers; /* min # of worker threads/child */
62  int max_workers; /* max # of worker threads/child */
63  int max_worker_idle_secs; /* max # of idle seconds for worker */
64  int stream_max_mem_size; /* max # bytes held in memory/stream */
65  apr_array_header_t *alt_svcs; /* h2_alt_svc specs for this server */
66  int alt_svc_max_age; /* seconds clients can rely on alt-svc info*/
67  int serialize_headers; /* Use serialized HTTP/1.1 headers for
68  processing, better compatibility */
69  int h2_direct; /* if mod_h2 is active directly */
70  int modern_tls_only; /* Accept only modern TLS in HTTP/2 connections */
71  int h2_upgrade; /* Allow HTTP/1 upgrade to h2/h2c */
72  apr_int64_t tls_warmup_size; /* Amount of TLS data to send before going full write size */
73  int tls_cooldown_secs; /* Seconds of idle time before going back to small TLS records */
74  int h2_push; /* if HTTP/2 server push is enabled */
75  struct apr_hash_t *priorities;/* map of content-type to h2_priority records */
76 
77  int push_diary_size; /* # of entries in push diary */
78  int copy_files; /* if files shall be copied vs setaside on output */
79  apr_array_header_t *push_list;/* list of h2_push_res configurations */
80  int early_hints; /* support status code 103 */
81 } h2_config;
82 
83 
84 void *h2_config_create_dir(apr_pool_t *pool, char *x);
85 void *h2_config_merge_dir(apr_pool_t *pool, void *basev, void *addv);
87 void *h2_config_merge_svr(apr_pool_t *pool, void *basev, void *addv);
88 
89 extern const command_rec h2_cmds[];
90 
94 
97 
98 void h2_get_num_workers(server_rec *s, int *minw, int *maxw);
99 
101 
102 const struct h2_priority *h2_config_get_priority(const h2_config *conf,
103  const char *content_type);
104 
105 #endif /* __mod_h2__h2_config_h__ */
106 
int max_workers
Definition: h2_config.h:62
int h2_max_streams
Definition: h2_config.h:59
struct apr_hash_t * priorities
Definition: h2_config.h:75
void h2_config_init(apr_pool_t *pool)
const h2_config * h2_config_rget(request_rec *r)
Definition: h2_config.h:40
Definition: h2_config.h:44
void h2_get_num_workers(server_rec *s, int *minw, int *maxw)
Definition: apr_tables.h:62
int critical
Definition: h2_config.h:53
Definition: h2_config.h:42
void * h2_config_create_dir(apr_pool_t *pool, char *x)
apr_array_header_t * alt_svcs
Definition: h2_config.h:65
apr_bucket_brigade request_rec apr_pool_t * pool
Definition: mod_dav.h:552
Definition: h2_config.h:34
int stream_max_mem_size
Definition: h2_config.h:64
Definition: h2_config.h:38
Definition: h2.h:75
int min_workers
Definition: h2_config.h:61
void * h2_config_merge_dir(apr_pool_t *pool, void *basev, void *addv)
Definition: h2_config.h:41
Definition: h2_config.h:57
Definition: h2_config.h:35
Structure to store things which are per connection.
Definition: httpd.h:1116
const command_rec h2_cmds[]
int max_worker_idle_secs
Definition: h2_config.h:63
const h2_config * h2_config_get(conn_rec *c)
void * h2_config_create_svr(apr_pool_t *pool, server_rec *s)
Definition: h2_config.h:29
int h2_upgrade
Definition: h2_config.h:71
int alt_svc_max_age
Definition: h2_config.h:66
int push_diary_size
Definition: h2_config.h:77
Definition: http_config.h:204
A structure to store information for each virtual server.
Definition: httpd.h:1307
Definition: h2_config.h:28
int h2_direct
Definition: h2_config.h:69
int h2_config_geti(const h2_config *conf, h2_config_var_t var)
apr_array_header_t * push_list
Definition: h2_config.h:79
int tls_cooldown_secs
Definition: h2_config.h:73
struct h2_push_res h2_push_res
Definition: h2_config.h:32
Definition: h2_config.h:37
Definition: h2_config.h:31
struct apr_hash_t apr_hash_t
Definition: apr_hash.h:52
const struct h2_priority * h2_config_get_priority(const h2_config *conf, const char *content_type)
h2_config_var_t
Definition: h2_config.h:26
Definition: h2_config.h:36
Definition: h2_config.h:27
int h2_push
Definition: h2_config.h:74
apr_int64_t h2_config_geti64(const h2_config *conf, h2_config_var_t var)
const char * uri_ref
Definition: h2_config.h:52
A structure that represents the current request.
Definition: httpd.h:806
const h2_config * h2_config_sget(server_rec *s)
struct h2_config h2_config
apr_int64_t tls_warmup_size
Definition: h2_config.h:72
long apr_int64_t
Definition: apr.h:371
int h2_window_size
Definition: h2_config.h:60
Definition: h2_config.h:51
int modern_tls_only
Definition: h2_config.h:70
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
int early_hints
Definition: h2_config.h:80
int copy_files
Definition: h2_config.h:78
request_rec * r
Definition: mod_dav.h:515
void * h2_config_merge_svr(apr_pool_t *pool, void *basev, void *addv)
Definition: h2_config.h:30
proxy_worker proxy_server_conf * conf
Definition: mod_proxy.h:611
Definition: h2_config.h:43
int serialize_headers
Definition: h2_config.h:67
Definition: h2_config.h:33
const char * name
Definition: h2_config.h:58
Definition: h2_config.h:39