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.h40
1 files changed, 25 insertions, 15 deletions
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
index d4330c32..4ee1b8d2 100644
--- a/src/include/microhttpd2.h
+++ b/src/include/microhttpd2.h
@@ -145,6 +145,17 @@ enum MHD_StatusCode
145 * supported by the selected backend. 145 * supported by the selected backend.
146 */ 146 */
147 MHD_TLS_CIPHERS_INVALID = 50002 147 MHD_TLS_CIPHERS_INVALID = 50002
148
149 /**
150 * The application attempted to setup TLS paramters before
151 * enabling TLS.
152 */
153 MHD_TLS_BACKEND_UNINITIALIZED = 50003,
154
155 /**
156 * The selected TLS backend does not yet support this operation.
157 */
158 MHD_TLS_BACKEND_OPERATION_UNSUPPORTED = 50004,
148 159
149}; 160};
150 161
@@ -403,8 +414,9 @@ typedef struct MHD_Action *
403 * 414 *
404 * @param cb function to be called for incoming requests 415 * @param cb function to be called for incoming requests
405 * @param cb_cls closure for @a cb 416 * @param cb_cls closure for @a cb
417 * @return NULL on error
406 */ 418 */
407struct MHD_Daemon * 419_MHD_EXTERN struct MHD_Daemon *
408MHD_daemon_create (MHD_RequestCallback cb, 420MHD_daemon_create (MHD_RequestCallback cb,
409 void *cb_cls); 421 void *cb_cls);
410 422
@@ -621,7 +633,7 @@ enum MHD_AddressFamily
621 /** 633 /**
622 * Pick "best" available method automatically. 634 * Pick "best" available method automatically.
623 */ 635 */
624 MHD_AF_AUTO, 636 MHD_AF_AUTO = 0,
625 637
626 /** 638 /**
627 * Use IPv4. 639 * Use IPv4.
@@ -672,7 +684,7 @@ MHD_daemon_bind_port (struct MHD_Daemon *daemon,
672_MHD_EXTERN void 684_MHD_EXTERN void
673MHD_daemon_bind_socket_address (struct MHD_Daemon *daemon, 685MHD_daemon_bind_socket_address (struct MHD_Daemon *daemon,
674 const struct sockaddr *sa, 686 const struct sockaddr *sa,
675 size_t sa_lem); 687 size_t sa_len);
676 688
677 689
678/** 690/**
@@ -683,8 +695,8 @@ MHD_daemon_bind_socket_address (struct MHD_Daemon *daemon,
683 * @param listen_backlog backlog to use 695 * @param listen_backlog backlog to use
684 */ 696 */
685_MHD_EXTERN void 697_MHD_EXTERN void
686MHD_daemon_listen_queue (struct MHD_Daemon *daemon, 698MHD_daemon_listen_backlog (struct MHD_Daemon *daemon,
687 int listen_backlog); 699 int listen_backlog);
688 700
689 701
690/** 702/**
@@ -810,7 +822,7 @@ MHD_daemon_protocol_strict_level (struct MHD_Daemon *daemon,
810 * @param daemon which instance should be configured 822 * @param daemon which instance should be configured
811 * @param tls_backend which TLS backend should be used, 823 * @param tls_backend which TLS backend should be used,
812 * currently only "gnutls" is supported. You can 824 * currently only "gnutls" is supported. You can
813 * also specify "NULL" for best-available (which is the default). 825 * also specify NULL for best-available (which is the default).
814 * @param ciphers which ciphers should be used by TLS, default is 826 * @param ciphers which ciphers should be used by TLS, default is
815 * "NORMAL" 827 * "NORMAL"
816 * @return status code, #MHD_SC_OK upon success 828 * @return status code, #MHD_SC_OK upon success
@@ -1054,8 +1066,6 @@ typedef void
1054 * @param daemon daemon to set callback for 1066 * @param daemon daemon to set callback for
1055 * @param ncc function to call to check the policy 1067 * @param ncc function to call to check the policy
1056 * @param ncc_cls closure for @a apc 1068 * @param ncc_cls closure for @a apc
1057 * @param ccc function to call upon completion, NULL for none
1058 * @param ccc_cls closure for @a ccc
1059 */ 1069 */
1060_MHD_EXTERN void 1070_MHD_EXTERN void
1061MHD_daemon_set_notify_connection (struct MHD_Daemon *daemon, 1071MHD_daemon_set_notify_connection (struct MHD_Daemon *daemon,
@@ -1064,7 +1074,7 @@ MHD_daemon_set_notify_connection (struct MHD_Daemon *daemon,
1064 1074
1065 1075
1066/** 1076/**
1067 * Maximum memory size per connection (followed by a `size_t`). 1077 * Maximum memory size per connection.
1068 * Default is 32 kb (#MHD_POOL_SIZE_DEFAULT). 1078 * Default is 32 kb (#MHD_POOL_SIZE_DEFAULT).
1069 * Values above 128k are unlikely to result in much benefit, as half 1079 * Values above 128k are unlikely to result in much benefit, as half
1070 * of the memory will be typically used for IO, and TCP buffers are 1080 * of the memory will be typically used for IO, and TCP buffers are
@@ -1178,15 +1188,15 @@ MHD_daemon_digest_auth_random (struct MHD_Daemon *daemon,
1178 1188
1179 1189
1180/** 1190/**
1181 * Size of the internal array holding the map of the nonce and 1191 * Length of the internal array holding the map of the nonce and
1182 * the nonce counter. 1192 * the nonce counter.
1183 * 1193 *
1184 * @param daemon daemon to configure 1194 * @param daemon daemon to configure
1185 * @param nc_length desired array length 1195 * @param nc_length desired array length
1186 */ 1196 */
1187_MHD_EXTERN void 1197_MHD_EXTERN void
1188MHD_daemon_digest_auth_nc_size (struct MHD_Daemon *daemon, 1198MHD_daemon_digest_auth_nc_length (struct MHD_Daemon *daemon,
1189 size_t stack_limit_b); 1199 size_t nc_length);
1190 1200
1191 1201
1192/* ********************* connection options ************** */ 1202/* ********************* connection options ************** */
@@ -1201,7 +1211,7 @@ MHD_daemon_digest_auth_nc_size (struct MHD_Daemon *daemon,
1201 * @param connection connection to configure timeout for 1211 * @param connection connection to configure timeout for
1202 * @param timeout_s new timeout in seconds 1212 * @param timeout_s new timeout in seconds
1203 */ 1213 */
1204struct MHD_ConnectionOption 1214_MHD_EXTERN struct MHD_ConnectionOption
1205MHD_connection_timeout (struct MHD_Connection *connection, 1215MHD_connection_timeout (struct MHD_Connection *connection,
1206 unsigned int timeout_s); 1216 unsigned int timeout_s);
1207 1217
@@ -1443,7 +1453,7 @@ MHD_request_resume (struct MHD_Request *request);
1443 * as a response *is* an action. As no memory is 1453 * as a response *is* an action. As no memory is
1444 * allocated, this operation cannot fail. 1454 * allocated, this operation cannot fail.
1445 */ 1455 */
1446struct MHD_Action * 1456_MHD_EXTERN struct MHD_Action *
1447MHD_action_from_response (struct MHD_Response *response, 1457MHD_action_from_response (struct MHD_Response *response,
1448 enum MHD_bool destroy_after_use); 1458 enum MHD_bool destroy_after_use);
1449 1459
@@ -1484,7 +1494,7 @@ typedef void
1484 * @param termination_cb function to call 1494 * @param termination_cb function to call
1485 * @param termination_cb_cls closure for @e termination_cb 1495 * @param termination_cb_cls closure for @e termination_cb
1486 */ 1496 */
1487void 1497_MHD_EXTERN void
1488MHD_response_option_termination_callback (struct MHD_Response *response, 1498MHD_response_option_termination_callback (struct MHD_Response *response,
1489 MHD_RequestTerminationCallback termination_cb, 1499 MHD_RequestTerminationCallback termination_cb,
1490 void *termination_cb_cls); 1500 void *termination_cb_cls);