GNU libmicrohttpd
1.0.10
Toggle main menu visibility
Loading...
Searching...
No Matches
mhd_opt_matrix.h
Go to the documentation of this file.
1
/*
2
This file is part of GNU libmicrohttpd
3
Copyright (C) 2026 Christian Grothoff
4
5
GNU libmicrohttpd is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
9
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public
16
License along with GNU libmicrohttpd.
17
If not, see <http://www.gnu.org/licenses/>.
18
*/
19
82
83
#ifndef MHD_OPT_MATRIX_H
84
#define MHD_OPT_MATRIX_H 1
85
86
#include <stddef.h>
87
#include <
microhttpd.h
>
88
92
#define MHD_OPT_MATRIX_PROFILE_ENV "MHD_TEST_PROFILE"
93
97
#define MHD_OPT_MATRIX_MEM_ENV "MHD_TEST_MEM_LIMIT"
98
102
#define MHD_OPT_MATRIX_DISCP_ENV "MHD_TEST_DISCIPLINE"
103
108
#define MHD_OPT_MATRIX_STRICT_ENV "MHD_TEST_STRICT_FOR_CLIENT"
109
113
#define MHD_OPT_MATRIX_THREADING_ENV "MHD_TEST_THREADING"
114
118
#define MHD_OPT_MATRIX_POLL_ENV "MHD_TEST_POLL"
119
123
enum
MHD_OptMatrixThreading
124
{
128
MHD_OPT_MATRIX_THR_EXTERNAL
= 0,
129
133
MHD_OPT_MATRIX_THR_INTERNAL
= 1,
134
138
MHD_OPT_MATRIX_THR_PER_CONNECTION
= 2,
139
143
MHD_OPT_MATRIX_THR_POOL
= 3
144
};
145
146
150
enum
MHD_OptMatrixPoll
151
{
155
MHD_OPT_MATRIX_POLL_SELECT
= 0,
156
160
MHD_OPT_MATRIX_POLL_POLL
= 1,
161
165
MHD_OPT_MATRIX_POLL_EPOLL
= 2
166
};
167
168
176
struct
MHD_OptMatrixProfile
177
{
182
const
char
*
name
;
183
188
size_t
mem_limit
;
189
195
int
discipline_lvl
;
196
202
int
use_legacy_strict
;
203
207
enum
MHD_OptMatrixThreading
threading
;
208
212
enum
MHD_OptMatrixPoll
poll_backend
;
213
218
unsigned
int
thread_pool_size
;
219
};
220
221
225
unsigned
int
226
mhd_opt_matrix_num_profiles
(
void
);
227
228
239
const
struct
MHD_OptMatrixProfile
*
240
mhd_opt_matrix_profile
(
unsigned
int
idx);
241
242
249
const
struct
MHD_OptMatrixProfile
*
250
mhd_opt_matrix_lookup
(
const
char
*name_or_idx);
251
252
260
const
struct
MHD_OptMatrixProfile
*
261
mhd_opt_matrix_from_env
(
void
);
262
263
277
int
278
mhd_opt_matrix_effective_discipline
(
const
struct
MHD_OptMatrixProfile
*prof);
279
280
288
int
289
mhd_opt_matrix_profile_supported
(
const
struct
MHD_OptMatrixProfile
*prof);
290
291
300
const
char
*
301
mhd_opt_matrix_describe
(
const
struct
MHD_OptMatrixProfile
*prof,
302
char
*buf,
303
size_t
buf_size);
304
305
327
unsigned
int
328
mhd_opt_matrix_fill_options
(
const
struct
MHD_OptMatrixProfile
*prof,
329
struct
MHD_OptionItem
*ops,
330
unsigned
int
max_ops);
331
332
344
unsigned
int
345
mhd_opt_matrix_daemon_flags
(
const
struct
MHD_OptMatrixProfile
*prof,
346
unsigned
int
base_flags,
347
int
allow_external);
348
349
356
int
357
mhd_opt_matrix_is_external
(
const
struct
MHD_OptMatrixProfile
*prof);
358
359
372
int
373
mhd_opt_matrix_raise_mem_limit
(
struct
MHD_OptMatrixProfile
*prof,
374
size_t
min_limit);
375
376
383
void
384
mhd_opt_matrix_print_notice
(
const
char
*test_name);
385
386
387
#endif
/* MHD_OPT_MATRIX_H */
MHD_OptMatrixThreading
MHD_OptMatrixThreading
Definition
mhd_opt_matrix.h:124
MHD_OPT_MATRIX_THR_EXTERNAL
@ MHD_OPT_MATRIX_THR_EXTERNAL
Definition
mhd_opt_matrix.h:128
MHD_OPT_MATRIX_THR_POOL
@ MHD_OPT_MATRIX_THR_POOL
Definition
mhd_opt_matrix.h:143
MHD_OPT_MATRIX_THR_INTERNAL
@ MHD_OPT_MATRIX_THR_INTERNAL
Definition
mhd_opt_matrix.h:133
MHD_OPT_MATRIX_THR_PER_CONNECTION
@ MHD_OPT_MATRIX_THR_PER_CONNECTION
Definition
mhd_opt_matrix.h:138
mhd_opt_matrix_num_profiles
unsigned int mhd_opt_matrix_num_profiles(void)
Definition
mhd_opt_matrix.c:122
mhd_opt_matrix_lookup
const struct MHD_OptMatrixProfile * mhd_opt_matrix_lookup(const char *name_or_idx)
Definition
mhd_opt_matrix.c:136
mhd_opt_matrix_profile
const struct MHD_OptMatrixProfile * mhd_opt_matrix_profile(unsigned int idx)
Definition
mhd_opt_matrix.c:129
mhd_opt_matrix_from_env
const struct MHD_OptMatrixProfile * mhd_opt_matrix_from_env(void)
Definition
mhd_opt_matrix.c:227
mhd_opt_matrix_profile_supported
int mhd_opt_matrix_profile_supported(const struct MHD_OptMatrixProfile *prof)
Definition
mhd_opt_matrix.c:339
mhd_opt_matrix_fill_options
unsigned int mhd_opt_matrix_fill_options(const struct MHD_OptMatrixProfile *prof, struct MHD_OptionItem *ops, unsigned int max_ops)
Definition
mhd_opt_matrix.c:414
mhd_opt_matrix_effective_discipline
int mhd_opt_matrix_effective_discipline(const struct MHD_OptMatrixProfile *prof)
Definition
mhd_opt_matrix.c:323
mhd_opt_matrix_describe
const char * mhd_opt_matrix_describe(const struct MHD_OptMatrixProfile *prof, char *buf, size_t buf_size)
Definition
mhd_opt_matrix.c:367
mhd_opt_matrix_print_notice
void mhd_opt_matrix_print_notice(const char *test_name)
Definition
mhd_opt_matrix.c:521
mhd_opt_matrix_raise_mem_limit
int mhd_opt_matrix_raise_mem_limit(struct MHD_OptMatrixProfile *prof, size_t min_limit)
Definition
mhd_opt_matrix.c:508
MHD_OptMatrixPoll
MHD_OptMatrixPoll
Definition
mhd_opt_matrix.h:151
MHD_OPT_MATRIX_POLL_POLL
@ MHD_OPT_MATRIX_POLL_POLL
Definition
mhd_opt_matrix.h:160
MHD_OPT_MATRIX_POLL_EPOLL
@ MHD_OPT_MATRIX_POLL_EPOLL
Definition
mhd_opt_matrix.h:165
MHD_OPT_MATRIX_POLL_SELECT
@ MHD_OPT_MATRIX_POLL_SELECT
Definition
mhd_opt_matrix.h:155
mhd_opt_matrix_is_external
int mhd_opt_matrix_is_external(const struct MHD_OptMatrixProfile *prof)
Definition
mhd_opt_matrix.c:499
mhd_opt_matrix_daemon_flags
unsigned int mhd_opt_matrix_daemon_flags(const struct MHD_OptMatrixProfile *prof, unsigned int base_flags, int allow_external)
Definition
mhd_opt_matrix.c:458
microhttpd.h
public interface to libmicrohttpd
MHD_OptMatrixProfile
Definition
mhd_opt_matrix.h:177
MHD_OptMatrixProfile::use_legacy_strict
int use_legacy_strict
Definition
mhd_opt_matrix.h:202
MHD_OptMatrixProfile::mem_limit
size_t mem_limit
Definition
mhd_opt_matrix.h:188
MHD_OptMatrixProfile::discipline_lvl
int discipline_lvl
Definition
mhd_opt_matrix.h:195
MHD_OptMatrixProfile::name
const char * name
Definition
mhd_opt_matrix.h:182
MHD_OptMatrixProfile::threading
enum MHD_OptMatrixThreading threading
Definition
mhd_opt_matrix.h:207
MHD_OptMatrixProfile::poll_backend
enum MHD_OptMatrixPoll poll_backend
Definition
mhd_opt_matrix.h:212
MHD_OptMatrixProfile::thread_pool_size
unsigned int thread_pool_size
Definition
mhd_opt_matrix.h:218
MHD_OptionItem
Definition
microhttpd.h:2251
src
microhttpd
mhd_opt_matrix.h
Generated by
1.17.0