Code Coverage: vinyl-cache/bin/vinyld/mgt/mgt_param.h
 
82217aa4fc7094b3610340078afaf78cd95a8ec9
 
0
/*-
1
 * Copyright (c) 2006 Verdens Gang AS
2
 * Copyright (c) 2006-2011 Varnish Software AS
3
 * All rights reserved.
4
 *
5
 * Author: Poul-Henning Kamp <phk@phk.freebsd.dk>
6
 *
7
 * SPDX-License-Identifier: BSD-2-Clause
8
 *
9
 * Redistribution and use in source and binary forms, with or without
10
 * modification, are permitted provided that the following conditions
11
 * are met:
12
 * 1. Redistributions of source code must retain the above copyright
13
 *    notice, this list of conditions and the following disclaimer.
14
 * 2. Redistributions in binary form must reproduce the above copyright
15
 *    notice, this list of conditions and the following disclaimer in the
16
 *    documentation and/or other materials provided with the distribution.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
 * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
22
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28
 * SUCH DAMAGE.
29
 *
30
 */
31
32
struct parspec;
33
34
typedef int tweak_t(struct vsb *, const struct parspec *, const char *arg);
35
36
/* Sentinel for the arg position of tweak_t to ask for JSON formatting. */
37
extern const char * const JSON_FMT;
38
39
struct parspec {
40
        const char      *name;
41
        tweak_t         *func;
42
        volatile void   *priv;
43
        const char      *min;
44
        const char      *max;
45
        const char      *def;
46
        const char      *units;
47
        const char      *descr;
48
        unsigned         flags;
49 455
#define DELAYED_EFFECT          (1<<0)
50 455
#define EXPERIMENTAL            (1<<1)
51 843
#define MUST_RESTART            (1<<2)
52 10489
#define MUST_RELOAD             (1<<3)
53 455
#define WIZARD                  (1<<4)
54 10454
#define PROTECTED               (1<<5)
55 455
#define OBJ_STICKY              (1<<6)
56 455
#define ONLY_ROOT               (1<<7)
57 152212
#define NOT_IMPLEMENTED         (1<<8)
58 436
#define PLATFORM_DEPENDENT      (1<<9)
59 822
#define BUILD_OPTIONS           (1<<10)
60 91
#define TYPE_TIMEOUT            (1<<11)
61
62 248
#define DOCS_FLAGS      (NOT_IMPLEMENTED|PLATFORM_DEPENDENT|BUILD_OPTIONS)
63
64
        const char      *dyn_min_reason;
65
        const char      *dyn_max_reason;
66
        const char      *dyn_def_reason;
67
        char            *dyn_min;
68
        char            *dyn_max;
69
        char            *dyn_def;
70
};
71
72
tweak_t tweak_alias;
73
tweak_t tweak_boolean;
74
tweak_t tweak_bytes;
75
tweak_t tweak_bytes_u;
76
tweak_t tweak_double;
77
tweak_t tweak_duration;
78
tweak_t tweak_debug;
79
tweak_t tweak_experimental;
80
tweak_t tweak_feature;
81
tweak_t tweak_poolparam;
82
tweak_t tweak_storage;
83
tweak_t tweak_string;
84
tweak_t tweak_thread_pool_min;
85
tweak_t tweak_thread_pool_max;
86
tweak_t tweak_timeout;
87
tweak_t tweak_uint;
88
tweak_t tweak_uint_orzero;
89
tweak_t tweak_vcc_feature;
90
tweak_t tweak_vsl_buffer;
91
tweak_t tweak_vsl_mask;
92
tweak_t tweak_vsl_reclen;