Blame modules/http2/h2_config.h

Packit 90a5c9
/* Licensed to the Apache Software Foundation (ASF) under one or more
Packit 90a5c9
 * contributor license agreements.  See the NOTICE file distributed with
Packit 90a5c9
 * this work for additional information regarding copyright ownership.
Packit 90a5c9
 * The ASF licenses this file to You under the Apache License, Version 2.0
Packit 90a5c9
 * (the "License"); you may not use this file except in compliance with
Packit 90a5c9
 * the License.  You may obtain a copy of the License at
Packit 90a5c9
 *
Packit 90a5c9
 *     http://www.apache.org/licenses/LICENSE-2.0
Packit 90a5c9
 *
Packit 90a5c9
 * Unless required by applicable law or agreed to in writing, software
Packit 90a5c9
 * distributed under the License is distributed on an "AS IS" BASIS,
Packit 90a5c9
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit 90a5c9
 * See the License for the specific language governing permissions and
Packit 90a5c9
 * limitations under the License.
Packit 90a5c9
 */
Packit 90a5c9
Packit 90a5c9
#ifndef __mod_h2__h2_config_h__
Packit 90a5c9
#define __mod_h2__h2_config_h__
Packit 90a5c9
Packit 90a5c9
#undef PACKAGE_VERSION
Packit 90a5c9
#undef PACKAGE_TARNAME
Packit 90a5c9
#undef PACKAGE_STRING
Packit 90a5c9
#undef PACKAGE_NAME
Packit 90a5c9
#undef PACKAGE_BUGREPORT
Packit 90a5c9
Packit 90a5c9
typedef enum {
Packit 90a5c9
    H2_CONF_MAX_STREAMS,
Packit 90a5c9
    H2_CONF_WIN_SIZE,
Packit 90a5c9
    H2_CONF_MIN_WORKERS,
Packit 90a5c9
    H2_CONF_MAX_WORKERS,
Packit 90a5c9
    H2_CONF_MAX_WORKER_IDLE_SECS,
Packit 90a5c9
    H2_CONF_STREAM_MAX_MEM,
Packit 90a5c9
    H2_CONF_ALT_SVCS,
Packit 90a5c9
    H2_CONF_ALT_SVC_MAX_AGE,
Packit 90a5c9
    H2_CONF_SER_HEADERS,
Packit 90a5c9
    H2_CONF_DIRECT,
Packit 90a5c9
    H2_CONF_MODERN_TLS_ONLY,
Packit 90a5c9
    H2_CONF_UPGRADE,
Packit 90a5c9
    H2_CONF_TLS_WARMUP_SIZE,
Packit 90a5c9
    H2_CONF_TLS_COOLDOWN_SECS,
Packit 90a5c9
    H2_CONF_PUSH,
Packit 90a5c9
    H2_CONF_PUSH_DIARY_SIZE,
Packit 90a5c9
    H2_CONF_COPY_FILES,
Packit 90a5c9
    H2_CONF_EARLY_HINTS,
Packit 90a5c9
} h2_config_var_t;
Packit 90a5c9
Packit 90a5c9
struct apr_hash_t;
Packit 90a5c9
struct h2_priority;
Packit 90a5c9
struct h2_push_res;
Packit 90a5c9
Packit 90a5c9
typedef struct h2_push_res {
Packit 90a5c9
    const char *uri_ref;
Packit 90a5c9
    int critical;
Packit 90a5c9
} h2_push_res;
Packit 90a5c9
Packit 90a5c9
/* Apache httpd module configuration for h2. */
Packit 90a5c9
typedef struct h2_config {
Packit 90a5c9
    const char *name;
Packit 90a5c9
    int h2_max_streams;           /* max concurrent # streams (http2) */
Packit 90a5c9
    int h2_window_size;           /* stream window size (http2) */
Packit 90a5c9
    int min_workers;              /* min # of worker threads/child */
Packit 90a5c9
    int max_workers;              /* max # of worker threads/child */
Packit 90a5c9
    int max_worker_idle_secs;     /* max # of idle seconds for worker */
Packit 90a5c9
    int stream_max_mem_size;      /* max # bytes held in memory/stream */
Packit 90a5c9
    apr_array_header_t *alt_svcs; /* h2_alt_svc specs for this server */
Packit 90a5c9
    int alt_svc_max_age;          /* seconds clients can rely on alt-svc info*/
Packit 90a5c9
    int serialize_headers;        /* Use serialized HTTP/1.1 headers for 
Packit 90a5c9
                                     processing, better compatibility */
Packit 90a5c9
    int h2_direct;                /* if mod_h2 is active directly */
Packit 90a5c9
    int modern_tls_only;          /* Accept only modern TLS in HTTP/2 connections */  
Packit 90a5c9
    int h2_upgrade;               /* Allow HTTP/1 upgrade to h2/h2c */
Packit 90a5c9
    apr_int64_t tls_warmup_size;  /* Amount of TLS data to send before going full write size */
Packit 90a5c9
    int tls_cooldown_secs;        /* Seconds of idle time before going back to small TLS records */
Packit 90a5c9
    int h2_push;                  /* if HTTP/2 server push is enabled */
Packit 90a5c9
    struct apr_hash_t *priorities;/* map of content-type to h2_priority records */
Packit 90a5c9
    
Packit 90a5c9
    int push_diary_size;          /* # of entries in push diary */
Packit 90a5c9
    int copy_files;               /* if files shall be copied vs setaside on output */
Packit 90a5c9
    apr_array_header_t *push_list;/* list of h2_push_res configurations */
Packit 90a5c9
    int early_hints;              /* support status code 103 */
Packit 90a5c9
} h2_config;
Packit 90a5c9
Packit 90a5c9
Packit 90a5c9
void *h2_config_create_dir(apr_pool_t *pool, char *x);
Packit 90a5c9
void *h2_config_merge_dir(apr_pool_t *pool, void *basev, void *addv);
Packit 90a5c9
void *h2_config_create_svr(apr_pool_t *pool, server_rec *s);
Packit 90a5c9
void *h2_config_merge_svr(apr_pool_t *pool, void *basev, void *addv);
Packit 90a5c9
Packit 90a5c9
extern const command_rec h2_cmds[];
Packit 90a5c9
Packit 90a5c9
const h2_config *h2_config_get(conn_rec *c);
Packit 90a5c9
const h2_config *h2_config_sget(server_rec *s);
Packit 90a5c9
const h2_config *h2_config_rget(request_rec *r);
Packit 90a5c9
Packit 90a5c9
int h2_config_geti(const h2_config *conf, h2_config_var_t var);
Packit 90a5c9
apr_int64_t h2_config_geti64(const h2_config *conf, h2_config_var_t var);
Packit 90a5c9
Packit 90a5c9
void h2_get_num_workers(server_rec *s, int *minw, int *maxw);
Packit 90a5c9
Packit 90a5c9
void h2_config_init(apr_pool_t *pool);
Packit 90a5c9
Packit 90a5c9
const struct h2_priority *h2_config_get_priority(const h2_config *conf, 
Packit 90a5c9
                                                 const char *content_type);
Packit 90a5c9
       
Packit 90a5c9
#endif /* __mod_h2__h2_config_h__ */
Packit 90a5c9