aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd2.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/microhttpd2.h')
-rw-r--r--src/include/microhttpd2.h173
1 files changed, 163 insertions, 10 deletions
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
index 4ee1b8d2..7a67fbd3 100644
--- a/src/include/microhttpd2.h
+++ b/src/include/microhttpd2.h
@@ -129,34 +129,181 @@ enum MHD_StatusCode
129 */ 129 */
130 MHD_SC_DAEMON_STARTED = 10000, 130 MHD_SC_DAEMON_STARTED = 10000,
131 131
132
133 /**
134 * MHD does not support the requested combination of
135 * EPOLL with thread-per-connection mode.
136 */
137 MHD_SC_SYSCALL_THREAD_COMBINATION_INVALID = 40000,
138
139 /**
140 * MHD does not support quiescing if ITC was disabled
141 * and threads are used.
142 */
143 MHD_SC_SYSCALL_QUIESCE_REQUIRES_ITC = 40001,
144
132 /** 145 /**
133 * This build of MHD does not support TLS, but the application 146 * This build of MHD does not support TLS, but the application
134 * requested TLS. 147 * requested TLS.
135 */ 148 */
136 MHD_TLS_DISABLED = 50000, 149 MHD_SC_TLS_DISABLED = 50000,
137 150
138 /** 151 /**
139 * The application requested an unsupported TLS backend to be used. 152 * The application requested an unsupported TLS backend to be used.
140 */ 153 */
141 MHD_TLS_BACKEND_UNSUPPORTED = 50001, 154 MHD_SC_TLS_BACKEND_UNSUPPORTED = 50001,
142 155
143 /** 156 /**
144 * The application requested a TLS cipher suite which is not 157 * The application requested a TLS cipher suite which is not
145 * supported by the selected backend. 158 * supported by the selected backend.
146 */ 159 */
147 MHD_TLS_CIPHERS_INVALID = 50002 160 MHD_SC_TLS_CIPHERS_INVALID = 50002
148 161
149 /** 162 /**
150 * The application attempted to setup TLS paramters before 163 * The application attempted to setup TLS paramters before
151 * enabling TLS. 164 * enabling TLS.
152 */ 165 */
153 MHD_TLS_BACKEND_UNINITIALIZED = 50003, 166 MHD_SC_TLS_BACKEND_UNINITIALIZED = 50003,
154 167
155 /** 168 /**
156 * The selected TLS backend does not yet support this operation. 169 * The selected TLS backend does not yet support this operation.
157 */ 170 */
158 MHD_TLS_BACKEND_OPERATION_UNSUPPORTED = 50004, 171 MHD_SC_TLS_BACKEND_OPERATION_UNSUPPORTED = 50004,
172
173 /**
174 * Failed to setup ITC channel.
175 */
176 MHD_SC_ITC_INITIALIZATION_FAILED = 50005,
177
178 /**
179 * File descriptor for ITC channel too large.
180 */
181 MHD_SC_ITC_DESCRIPTOR_TOO_LARGE = 50006,
182
183 /**
184 * The specified value for the NC length is way too large
185 * for this platform (integer overflow on `size_t`).
186 */
187 MHD_SC_DIGEST_AUTH_NC_LENGTH_TOO_BIG = 50007,
188
189 /**
190 * We failed to allocate memory for the specified nonce
191 * counter array. The option was not set.
192 */
193 MHD_SC_DIGEST_AUTH_NC_ALLOCATION_FAILURE = 50008,
194
195 /**
196 * This build of the library does not support
197 * digest authentication.
198 */
199 MHD_SC_DIGEST_AUTH_NOT_SUPPORTED_BY_BUILD = 50009,
200
201 /**
202 * IPv6 requested but not supported by this build.
203 */
204 MHD_SC_IPV6_NOT_SUPPORTED_BY_BUILD = 50010,
205
206 /**
207 * We failed to open the listen socket. Maybe the build
208 * supports IPv6, but your kernel does not?
209 */
210 MHD_SC_FAILED_TO_OPEN_LISTEN_SOCKET = 50011,
211
212 /**
213 * Specified address family is not supported by this build.
214 */
215 MHD_SC_AF_NOT_SUPPORTED_BY_BUILD = 50012,
216
217 /**
218 * Failed to enable listen address reuse.
219 */
220 MHD_SC_LISTEN_ADDRESS_REUSE_ENABLE_FAILED = 50013,
221
222 /**
223 * Enabling listen address reuse is not supported by this platform.
224 */
225 MHD_SC_LISTEN_ADDRESS_REUSE_ENABLE_NOT_SUPPORTED = 50014,
226
227 /**
228 * Failed to disable listen address reuse.
229 */
230 MHD_SC_LISTEN_ADDRESS_REUSE_DISABLE_FAILED = 50015,
231
232 /**
233 * Disabling listen address reuse is not supported by this platform.
234 */
235 MHD_SC_LISTEN_ADDRESS_REUSE_DISABLE_NOT_SUPPORTED = 50016,
236
237 /**
238 * We failed to explicitly enable or disable dual stack for
239 * the IPv6 listen socket. The socket will be used in whatever
240 * the default is the OS gives us.
241 */
242 MHD_SC_LISTEN_DUAL_STACK_CONFIGURATION_FAILED = 50017,
243
244 /**
245 * On this platform, MHD does not support explicitly configuring
246 * dual stack behavior.
247 */
248 MHD_SC_LISTEN_DUAL_STACK_CONFIGURATION_NOT_SUPPORTED = 50018,
249
250 /**
251 * We failed to bind the listen socket.
252 */
253 MHD_SC_LISTEN_SOCKET_BIND_FAILED = 50019,
254
255 /**
256 * Failed to enable TCP FAST OPEN option.
257 */
258 MHD_SC_FAST_OPEN_FAILURE = 50020,
159 259
260 /**
261 * Failed to start listening on listen socket.
262 */
263 MHD_SC_LISTEN_FAILURE = 50021,
264
265 /**
266 * Failed to obtain our listen port via introspection.
267 */
268 MHD_SC_LISTEN_PORT_INTROSPECTION_FAILURE = 50022,
269
270 /**
271 * Failed to obtain our listen port via introspection
272 * due to unsupported address family being used.
273 */
274 MHD_SC_LISTEN_PORT_INTROSPECTION_UNKNOWN_AF = 50023,
275
276 /**
277 * We failed to set the listen socket to non-blocking.
278 */
279 MHD_SC_LISTEN_SOCKET_NONBLOCKING_FAILURE = 50024,
280
281 /**
282 * Listen socket value is too large (for use with select()).
283 */
284 MHD_SC_LISTEN_SOCKET_TOO_LARGE = 50025,
285
286 /**
287 * We failed to allocate memory for the thread pool.
288 */
289 MHD_SC_THREAD_POOL_MALLOC_FAILURE = 50026,
290
291 /**
292 * We failed to allocate mutex for thread pool worker.
293 */
294 MHD_SC_THREAD_POOL_CREATE_MUTEX_FAILURE = 50027,
295
296 /**
297 * We failed to initialize the main thread for listening.
298 */
299 MHD_SC_THREAD_MAIN_LAUNCH_FAILURE = 50030,
300
301 /**
302 * We failed to initialize the threads for the worker pool.
303 */
304 MHD_SC_THREAD_POOL_LAUNCH_FAILURE = 50031,
305
306
160}; 307};
161 308
162 309
@@ -631,10 +778,17 @@ MHD_daemon_tcp_fastopen (struct MHD_Daemon *daemon,
631enum MHD_AddressFamily 778enum MHD_AddressFamily
632{ 779{
633 /** 780 /**
781 * Option not given, do not listen at all
782 * (unless listen socket or address specified by
783 * other means).
784 */
785 MHD_AF_NONE = 0,
786
787 /**
634 * Pick "best" available method automatically. 788 * Pick "best" available method automatically.
635 */ 789 */
636 MHD_AF_AUTO = 0, 790 MHD_AF_AUTO,
637 791
638 /** 792 /**
639 * Use IPv4. 793 * Use IPv4.
640 */ 794 */
@@ -662,8 +816,7 @@ enum MHD_AddressFamily
662 * is specified, MHD will simply not listen on any socket! 816 * is specified, MHD will simply not listen on any socket!
663 * 817 *
664 * @param daemon which instance to configure the TCP port for 818 * @param daemon which instance to configure the TCP port for
665 * @param af address family to use, i.e. #AF_INET or #AF_INET6, 819 * @param af address family to use
666 * or #AF_UNSPEC for dual stack
667 * @param port port to use, 0 to bind to a random (free) port 820 * @param port port to use, 0 to bind to a random (free) port
668 */ 821 */
669_MHD_EXTERN void 822_MHD_EXTERN void
@@ -1194,7 +1347,7 @@ MHD_daemon_digest_auth_random (struct MHD_Daemon *daemon,
1194 * @param daemon daemon to configure 1347 * @param daemon daemon to configure
1195 * @param nc_length desired array length 1348 * @param nc_length desired array length
1196 */ 1349 */
1197_MHD_EXTERN void 1350_MHD_EXTERN enum MHD_StatusCode
1198MHD_daemon_digest_auth_nc_length (struct MHD_Daemon *daemon, 1351MHD_daemon_digest_auth_nc_length (struct MHD_Daemon *daemon,
1199 size_t nc_length); 1352 size_t nc_length);
1200 1353