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.h146
1 files changed, 122 insertions, 24 deletions
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
index ebb8f00a..91b0074b 100644
--- a/src/include/microhttpd2.h
+++ b/src/include/microhttpd2.h
@@ -348,6 +348,80 @@ enum MHD_StatusCode
348 */ 348 */
349 MHD_SC_NO_TIMEOUT = 10001, 349 MHD_SC_NO_TIMEOUT = 10001,
350 350
351 /**
352 * Informational event, we accepted a connection.
353 */
354 MHD_SC_CONNECTION_ACCEPTED = 10002,
355
356 /**
357 * Informational event, thread processing connection termiantes.
358 */
359 MHD_SC_THREAD_TERMINATING = 10003,
360
361
362 /**
363 * Resource limit in terms of number of parallel connections
364 * hit.
365 */
366 MHD_SC_LIMIT_CONNECTIONS_REACHED = 30000,
367
368 /**
369 * accept() returned transient error.
370 */
371 MHD_SC_ACCEPT_FAILED_EAGAIN = 30001,
372
373 /**
374 * We failed to allocate memory for poll() syscall.
375 * (May be transient.)
376 */
377 MHD_SC_POLL_MALLOC_FAILURE = 30002,
378
379 /**
380 * The operation failed because the respective
381 * daemon is already too deep inside of the shutdown
382 * activity.
383 */
384 MHD_SC_DAEMON_ALREADY_SHUTDOWN = 30003,
385
386 /**
387 * We failed to start a thread.
388 */
389 MHD_SC_THREAD_LAUNCH_FAILURE = 30004,
390
391 /**
392 * The operation failed because we either have no
393 * listen socket or were already quiesced.
394 */
395 MHD_SC_DAEMON_ALREADY_QUIESCED = 30005,
396
397 /**
398 * The operation failed because client disconnected
399 * faster than we could accept().
400 */
401 MHD_SC_ACCEPT_FAST_DISCONNECT = 30006,
402
403 /**
404 * Operating resource limits hit on accept().
405 */
406 MHD_SC_ACCEPT_SYSTEM_LIMIT_REACHED = 30007,
407
408 /**
409 * Connection was refused by accept policy callback.
410 */
411 MHD_SC_ACCEPT_POLICY_REJECTED = 30008,
412
413 /**
414 * We failed to allocate memory for the connection.
415 * (May be transient.)
416 */
417 MHD_SC_CONNECTION_MALLOC_FAILURE = 30009,
418
419 /**
420 * We failed to allocate memory for the connection's memory pool.
421 * (May be transient.)
422 */
423 MHD_SC_POOL_MALLOC_FAILURE = 30010,
424
351 425
352 /** 426 /**
353 * MHD does not support the requested combination of 427 * MHD does not support the requested combination of
@@ -362,21 +436,27 @@ enum MHD_StatusCode
362 MHD_SC_SYSCALL_QUIESCE_REQUIRES_ITC = 40001, 436 MHD_SC_SYSCALL_QUIESCE_REQUIRES_ITC = 40001,
363 437
364 /** 438 /**
365 * This build of MHD does not support TLS, but the application 439 * We failed to bind the listen socket.
366 * requested TLS.
367 */ 440 */
368 MHD_SC_TLS_DISABLED = 50000, 441 MHD_SC_LISTEN_SOCKET_BIND_FAILED = 40002,
369 442
370 /** 443 /**
371 * The application requested an unsupported TLS backend to be used. 444 * The application requested an unsupported TLS backend to be used.
372 */ 445 */
373 MHD_SC_TLS_BACKEND_UNSUPPORTED = 50001, 446 MHD_SC_TLS_BACKEND_UNSUPPORTED = 40003,
374 447
375 /** 448 /**
376 * The application requested a TLS cipher suite which is not 449 * The application requested a TLS cipher suite which is not
377 * supported by the selected backend. 450 * supported by the selected backend.
378 */ 451 */
379 MHD_SC_TLS_CIPHERS_INVALID = 50002, 452 MHD_SC_TLS_CIPHERS_INVALID = 40004,
453
454
455 /**
456 * This build of MHD does not support TLS, but the application
457 * requested TLS.
458 */
459 MHD_SC_TLS_DISABLED = 50000,
380 460
381 /** 461 /**
382 * The application attempted to setup TLS paramters before 462 * The application attempted to setup TLS paramters before
@@ -467,11 +547,6 @@ enum MHD_StatusCode
467 MHD_SC_LISTEN_DUAL_STACK_CONFIGURATION_NOT_SUPPORTED = 50018, 547 MHD_SC_LISTEN_DUAL_STACK_CONFIGURATION_NOT_SUPPORTED = 50018,
468 548
469 /** 549 /**
470 * We failed to bind the listen socket.
471 */
472 MHD_SC_LISTEN_SOCKET_BIND_FAILED = 50019,
473
474 /**
475 * Failed to enable TCP FAST OPEN option. 550 * Failed to enable TCP FAST OPEN option.
476 */ 551 */
477 MHD_SC_FAST_OPEN_FAILURE = 50020, 552 MHD_SC_FAST_OPEN_FAILURE = 50020,
@@ -519,12 +594,10 @@ enum MHD_StatusCode
519 MHD_SC_UPGRADE_ON_DAEMON_WITH_UPGRADE_DISALLOWED = 50028, 594 MHD_SC_UPGRADE_ON_DAEMON_WITH_UPGRADE_DISALLOWED = 50028,
520 595
521 /** 596 /**
522 * Queueing a response failed because the respective 597 * Failed to signal via ITC channel.
523 * daemon is already too deep inside of the shutdown
524 * activity and the reponse cannot be sent any longer.
525 */ 598 */
526 MHD_SC_DAEMON_ALREADY_SHUTDOWN = 50029, 599 MHD_SC_ITC_USE_FAILED = 50029,
527 600
528 /** 601 /**
529 * We failed to initialize the main thread for listening. 602 * We failed to initialize the main thread for listening.
530 */ 603 */
@@ -539,11 +612,6 @@ enum MHD_StatusCode
539 * We failed to add a socket to the epoll() set. 612 * We failed to add a socket to the epoll() set.
540 */ 613 */
541 MHD_SC_EPOLL_CTL_ADD_FAILED = 50032, 614 MHD_SC_EPOLL_CTL_ADD_FAILED = 50032,
542
543 /**
544 * We failed to start a thread.
545 */
546 MHD_SC_THREAD_LAUNCH_FAILURE = 50033,
547 615
548 /** 616 /**
549 * We failed to create control socket for the epoll(). 617 * We failed to create control socket for the epoll().
@@ -608,12 +676,13 @@ enum MHD_StatusCode
608 * (should never happen). 676 * (should never happen).
609 */ 677 */
610 MHD_SC_UNEXPECTED_POLL_ERROR = 50044, 678 MHD_SC_UNEXPECTED_POLL_ERROR = 50044,
611 679
612 /** 680 /**
613 * We failed to allocate memory for poll() syscall. 681 * We failed to configure accepted socket
682 * to not use a signal pipe.
614 */ 683 */
615 MHD_SC_POLL_MALLOC_FAILURE = 50045, 684 MHD_SC_ACCEPT_CONFIGURE_NOSIGPIPE_FAILED = 50045,
616 685
617 /** 686 /**
618 * Encountered an unexpected error from epoll_wait() 687 * Encountered an unexpected error from epoll_wait()
619 * (should never happen). 688 * (should never happen).
@@ -625,6 +694,35 @@ enum MHD_StatusCode
625 */ 694 */
626 MHD_SC_EPOLL_FD_INVALID = 50047, 695 MHD_SC_EPOLL_FD_INVALID = 50047,
627 696
697 /**
698 * We failed to configure accepted socket
699 * to be non-inheritable.
700 */
701 MHD_SC_ACCEPT_CONFIGURE_NOINHERIT_FAILED = 50048,
702
703 /**
704 * We failed to configure accepted socket
705 * to be non-blocking.
706 */
707 MHD_SC_ACCEPT_CONFIGURE_NONBLOCKING_FAILED = 50049,
708
709 /**
710 * accept() returned non-transient error.
711 */
712 MHD_SC_ACCEPT_FAILED_UNEXPECTEDLY = 50050,
713
714 /**
715 * Operating resource limits hit on accept() while
716 * zero connections are active. Oopsie.
717 */
718 MHD_SC_ACCEPT_SYSTEM_LIMIT_REACHED_INSTANTLY = 50051,
719
720 /**
721 * Failed to add IP address to per-IP counter for
722 * some reason.
723 */
724 MHD_SC_IP_COUNTER_FAILURE = 50052,
725
628}; 726};
629 727
630 728