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 /* Copyright 2015 greenbytes GmbH (https://www.greenbytes.de)
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8 
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef __mod_h2__h2_config_h__
17 #define __mod_h2__h2_config_h__
18 
19 #undef PACKAGE_VERSION
20 #undef PACKAGE_TARNAME
21 #undef PACKAGE_STRING
22 #undef PACKAGE_NAME
23 #undef PACKAGE_BUGREPORT
24 
25 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 session_extra_files; /* # of extra files a session may keep open */
71  int modern_tls_only; /* Accept only modern TLS in HTTP/2 connections */
72  int h2_upgrade; /* Allow HTTP/1 upgrade to h2/h2c */
73  apr_int64_t tls_warmup_size; /* Amount of TLS data to send before going full write size */
74  int tls_cooldown_secs; /* Seconds of idle time before going back to small TLS records */
75  int h2_push; /* if HTTP/2 server push is enabled */
76  struct apr_hash_t *priorities;/* map of content-type to h2_priority records */
77 
78  int push_diary_size; /* # of entries in push diary */
79  int copy_files; /* if files shall be copied vs setaside on output */
80  apr_array_header_t *push_list;/* list of h2_push_res configurations */
81  int early_hints; /* support status code 103 */
82 } h2_config;
83 
84 
85 void *h2_config_create_dir(apr_pool_t *pool, char *x);
86 void *h2_config_merge_dir(apr_pool_t *pool, void *basev, void *addv);
88 void *h2_config_merge_svr(apr_pool_t *pool, void *basev, void *addv);
89 
90 extern const command_rec h2_cmds[];
91 
95 
98 
100 
101 const struct h2_priority *h2_config_get_priority(const h2_config *conf,
102  const char *content_type);
103 
104 #endif /* __mod_h2__h2_config_h__ */
105 
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:76
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
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:556
Definition: h2_config.h:33
int stream_max_mem_size
Definition: h2_config.h:64
Definition: h2_config.h:38
Definition: h2.h:71
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:34
Structure to store things which are per connection.
Definition: httpd.h:1110
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:28
int h2_upgrade
Definition: h2_config.h:72
int alt_svc_max_age
Definition: h2_config.h:66
int push_diary_size
Definition: h2_config.h:78
Definition: http_config.h:204
A structure to store information for each virtual server.
Definition: httpd.h:1302
Definition: h2_config.h:27
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:80
int tls_cooldown_secs
Definition: h2_config.h:74
struct h2_push_res h2_push_res
Definition: h2_config.h:31
Definition: h2_config.h:37
Definition: h2_config.h:30
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:25
Definition: h2_config.h:35
Definition: h2_config.h:26
int h2_push
Definition: h2_config.h:75
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:805
const h2_config * h2_config_sget(server_rec *s)
struct h2_config h2_config
apr_int64_t tls_warmup_size
Definition: h2_config.h:73
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:71
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
int early_hints
Definition: h2_config.h:81
int copy_files
Definition: h2_config.h:79
request_rec * r
Definition: mod_dav.h:519
void * h2_config_merge_svr(apr_pool_t *pool, void *basev, void *addv)
Definition: h2_config.h:29
proxy_worker proxy_server_conf * conf
Definition: mod_proxy.h:602
Definition: h2_config.h:43
int serialize_headers
Definition: h2_config.h:67
Definition: h2_config.h:32
int session_extra_files
Definition: h2_config.h:70
const char * name
Definition: h2_config.h:58
Definition: h2_config.h:39
Definition: h2_config.h:36