GNU libmicrohttpd  0.9.29
internal.h
Go to the documentation of this file.
1 /*
2  This file is part of libmicrohttpd
3  Copyright (C) 2007-2017 Daniel Pittman and Christian Grothoff
4 
5  This library 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 this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
27 #ifndef INTERNAL_H
28 #define INTERNAL_H
29 
30 #include "mhd_options.h"
31 #include "platform.h"
32 #include "microhttpd.h"
33 #ifdef HTTPS_SUPPORT
34 #include <gnutls/gnutls.h>
35 #if GNUTLS_VERSION_MAJOR >= 3
36 #include <gnutls/abstract.h>
37 #endif
38 #endif /* HTTPS_SUPPORT */
39 
40 #ifdef HAVE_STDBOOL_H
41 #include <stdbool.h>
42 #endif
43 
44 
45 #ifdef MHD_PANIC
46 /* Override any defined MHD_PANIC macro with proper one */
47 #undef MHD_PANIC
48 #endif /* MHD_PANIC */
49 
50 #ifdef HAVE_MESSAGES
51 
56 #define MHD_PANIC(msg) do { mhd_panic (mhd_panic_cls, __FILE__, __LINE__, msg); BUILTIN_NOT_REACHED; } while (0)
57 #else
58 
63 #define MHD_PANIC(msg) do { mhd_panic (mhd_panic_cls, __FILE__, __LINE__, NULL); BUILTIN_NOT_REACHED; } while (0)
64 #endif
65 
66 #include "mhd_threads.h"
67 #include "mhd_locks.h"
68 #include "mhd_sockets.h"
69 #include "mhd_itc_types.h"
70 
71 
76 #define MHD_fd_close_chk_(fd) do { \
77  if (0 == close ((fd)) && (EBADF == errno)) \
78  MHD_PANIC(_("Failed to close FD.\n")); \
79  } while(0)
80 
85 #define EXTRA_CHECKS MHD_NO
86 
87 #define MHD_MAX(a,b) (((a)<(b)) ? (b) : (a))
88 #define MHD_MIN(a,b) (((a)<(b)) ? (a) : (b))
89 
90 
98 #define MHD_BUF_INC_SIZE 1024
99 
100 
105 
109 extern void *mhd_panic_cls;
110 
111 /* If we have Clang or gcc >= 4.5, use __buildin_unreachable() */
112 #if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
113 #define BUILTIN_NOT_REACHED __builtin_unreachable()
114 #elif defined(_MSC_FULL_VER)
115 #define BUILTIN_NOT_REACHED __assume(0)
116 #else
117 #define BUILTIN_NOT_REACHED
118 #endif
119 
120 #ifndef MHD_STATICSTR_LEN_
121 
124 #define MHD_STATICSTR_LEN_(macro) (sizeof(macro)/sizeof(char) - 1)
125 #endif /* ! MHD_STATICSTR_LEN_ */
126 
127 
132 {
133 
139 
145 
151 
156 
161 
166 
171 };
172 
173 
178 {
183 
188 
193 
198 };
199 
200 
205 #define MHD_TEST_ALLOW_SUSPEND_RESUME 8192
206 
213 #define MAX_NONCE_LENGTH 129
214 
215 
221 {
222 
227  uint64_t nc;
228 
233  uint64_t nmask;
234 
239 
240 };
241 
242 #ifdef HAVE_MESSAGES
243 
247 void
248 MHD_DLOG (const struct MHD_Daemon *daemon,
249  const char *format,
250  ...);
251 #endif
252 
253 
258 {
263 
267  char *header;
268 
272  char *value;
273 
279 
280 };
281 
282 
287 {
288 
295 
300  char *data;
301 
306  void *crc_cls;
307 
313 
319 
320 #ifdef UPGRADE_SUPPORT
321 
326  MHD_UpgradeHandler upgrade_handler;
327 
331  void *upgrade_handler_cls;
332 #endif /* UPGRADE_SUPPORT */
333 
338  MHD_mutex_ mutex;
339 
343  uint64_t total_size;
344 
349  uint64_t data_start;
350 
354  uint64_t fd_off;
355 
360  size_t data_size;
361 
366 
371  unsigned int reference_count;
372 
376  int fd;
377 
381  enum MHD_ResponseFlags flags;
382 
383 };
384 
385 
402 {
408 
413 
418 
423 
428 
433 
438 
443 
449 
455 
461 
466 
471 
477 
482 
487 
492 
497 
502 
507 
512 
513  /*
514  * SSL/TLS connection states
515  */
516 
523 
524 #ifdef UPGRADE_SUPPORT
525 
529  MHD_CONNECTION_UPGRADE = MHD_TLS_CONNECTION_INIT + 1,
530 #endif /* UPGRADE_SUPPORT */
531 
532 };
533 
537 #define DEBUG_STATES MHD_NO
538 
539 
540 #ifdef HAVE_MESSAGES
541 #if DEBUG_STATES
542 const char *
543 MHD_state_to_string (enum MHD_CONNECTION_STATE state);
544 #endif
545 #endif
546 
555 typedef ssize_t
557  void *write_to,
558  size_t max_bytes);
559 
560 
569 typedef ssize_t
571  const void *read_from,
572  size_t max_bytes);
573 
574 
579 {
584 
589 
594 };
595 
600 {
601 
602 #ifdef EPOLL_SUPPORT
603 
606  struct MHD_Connection *nextE;
607 
611  struct MHD_Connection *prevE;
612 #endif
613 
618 
623 
632 
637 
642 
647 
652 
657 
666  struct MemoryPool *pool;
667 
675 
684 
688  char *method;
689 
694  const char *url;
695 
700  char *version;
701 
707  enum MHD_ConnKeepAlive keepalive;
708 
714  char *read_buffer;
715 
721 
728  char *last;
729 
737  char *colon;
738 
743  struct sockaddr *addr;
744 
749  MHD_thread_handle_ pid;
750 
758 
764 
769 
774 
780 
785  size_t header_size;
786 
792 
799 
800 #if LINUX
801  enum MHD_resp_sender_
802  {
803  MHD_resp_sender_std = 0,
804  MHD_resp_sender_sendfile
805  } resp_sender;
806 #endif /* LINUX */
807 
813 
817  socklen_t addr_len;
818 
824 
830 
835 
842 
849 
854 
862 
867 
872  bool in_idle;
873 
879 
880 #ifdef EPOLL_SUPPORT
881 
884  enum MHD_EpollState epoll_state;
885 #endif
886 
891 
895  enum MHD_ConnectionEventLoopInfo event_loop_info;
896 
901  unsigned int responseCode;
902 
911 
919 
925 
930  int (*read_handler) (struct MHD_Connection *connection);
931 
936  int (*write_handler) (struct MHD_Connection *connection);
937 
942  int (*idle_handler) (struct MHD_Connection *connection);
943 
948 
953 
954 #ifdef UPGRADE_SUPPORT
955 
961  struct MHD_UpgradeResponseHandle *urh;
962 #endif /* UPGRADE_SUPPORT */
963 
964 #ifdef HTTPS_SUPPORT
965 
969  gnutls_session_t tls_session;
970 
974  int protocol;
975 
979  int cipher;
980 
985  bool tls_read_ready;
986 
990  bool tls_closed;
991 #endif /* HTTPS_SUPPORT */
992 
996  bool suspended;
997 
1002 
1006  bool resuming;
1007 };
1008 
1009 
1010 #ifdef UPGRADE_SUPPORT
1011 
1020 #define RESERVE_EBUF_SIZE 8
1021 
1028 struct UpgradeEpollHandle
1029 {
1034  struct MHD_UpgradeResponseHandle *urh;
1035 
1051  MHD_socket socket;
1052 
1056  enum MHD_EpollState celi;
1057 
1058 };
1059 
1060 
1066 struct MHD_UpgradeResponseHandle
1067 {
1073  struct MHD_Connection *connection;
1074 
1075 #ifdef HTTPS_SUPPORT
1076 
1079  struct MHD_UpgradeResponseHandle *next;
1080 
1084  struct MHD_UpgradeResponseHandle *prev;
1085 
1086 #ifdef EPOLL_SUPPORT
1087 
1090  struct MHD_UpgradeResponseHandle *nextE;
1091 
1095  struct MHD_UpgradeResponseHandle *prevE;
1096 
1100  bool in_eready_list;
1101 #endif
1102 
1108  char *in_buffer;
1109 
1115  char *out_buffer;
1116 
1122  size_t in_buffer_size;
1123 
1129  size_t out_buffer_size;
1130 
1138  size_t in_buffer_used;
1139 
1147  size_t out_buffer_used;
1148 
1152  struct UpgradeEpollHandle app;
1153 
1158  struct UpgradeEpollHandle mhd;
1159 
1164  char e_buf[RESERVE_EBUF_SIZE];
1165 
1166 #endif /* HTTPS_SUPPORT */
1167 
1178  volatile bool was_closed;
1179 
1201  bool clean_ready;
1202 };
1203 #endif /* UPGRADE_SUPPORT */
1204 
1205 
1214 typedef void *
1215 (*LogCallback)(void *cls,
1216  const char *uri,
1217  struct MHD_Connection *con);
1218 
1228 typedef size_t
1229 (*UnescapeCallback)(void *cls,
1230  struct MHD_Connection *conn,
1231  char *uri);
1232 
1233 
1242 {
1243 
1248 
1253 
1258 
1263 
1268 
1273 
1278 
1283 
1284 #ifdef EPOLL_SUPPORT
1285 
1288  struct MHD_Connection *eready_head;
1289 
1293  struct MHD_Connection *eready_tail;
1294 
1295 #ifdef UPGRADE_SUPPORT
1296 
1299  struct MHD_UpgradeResponseHandle *eready_urh_head;
1300 
1304  struct MHD_UpgradeResponseHandle *eready_urh_tail;
1305 #endif /* UPGRADE_SUPPORT */
1306 #endif /* EPOLL_SUPPORT */
1307 
1323 
1330 
1338 
1345 
1351 
1355  void *apc_cls;
1356 
1362 
1367 
1373 
1378 
1387 
1392 
1397 
1402 
1403 #ifdef HAVE_MESSAGES
1404 
1408  void (*custom_error_log) (void *cls, const char *fmt, va_list va);
1409 
1413  void *custom_error_log_cls;
1414 #endif
1415 
1420 
1425 
1430 
1434  size_t pool_size;
1435 
1440 
1445 
1449  unsigned int worker_pool_size;
1450 
1454  MHD_thread_handle_ pid;
1455 
1460 
1466 
1471 
1482 
1483 #ifdef EPOLL_SUPPORT
1484 
1487  int epoll_fd;
1488 
1493  bool listen_socket_in_epoll;
1494 
1495 #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
1496 
1500  int epoll_upgrade_fd;
1501 
1506  bool upgrade_fd_in_epoll;
1507 #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */
1508 
1509 #endif
1510 
1514  struct MHD_itc_ itc;
1515 
1519  volatile bool shutdown;
1520 
1526  volatile bool was_quiesced;
1527 
1535  bool at_limit;
1536 
1537  /*
1538  * Do we need to process resuming connections?
1539  */
1540  bool resuming;
1541 
1552 
1556  unsigned int connections;
1557 
1561  unsigned int connection_limit;
1562 
1568 
1574 
1578  enum MHD_FLAG options;
1579 
1583  uint16_t port;
1584 
1589 
1590 #ifdef HTTPS_SUPPORT
1591 #ifdef UPGRADE_SUPPORT
1592 
1597  struct MHD_UpgradeResponseHandle *urh_head;
1598 
1604  struct MHD_UpgradeResponseHandle *urh_tail;
1605 #endif /* UPGRADE_SUPPORT */
1606 
1610  gnutls_priority_t priority_cache;
1611 
1616  gnutls_credentials_type_t cred_type;
1617 
1621  gnutls_certificate_credentials_t x509_cred;
1622 
1626  gnutls_dh_params_t dh_params;
1627 
1628 #if GNUTLS_VERSION_MAJOR >= 3
1629 
1633  gnutls_certificate_retrieve_function2 *cert_callback;
1634 #endif
1635 
1639  const char *https_mem_key;
1640 
1644  const char *https_mem_cert;
1645 
1649  const char *https_key_password;
1650 
1654  const char *https_mem_trust;
1655 
1659  gnutls_dh_params_t https_mem_dhparams;
1660 
1664  bool have_dhparams;
1665 
1666 #endif /* HTTPS_SUPPORT */
1667 
1668 #ifdef DAUTH_SUPPORT
1669 
1673  const char *digest_auth_random;
1674 
1678  struct MHD_NonceNc *nnc;
1679 
1683  MHD_mutex_ nnc_lock;
1684 
1688  size_t digest_auth_rand_size;
1689 
1693  unsigned int nonce_nc_size;
1694 
1695 #endif
1696 
1697 #ifdef TCP_FASTOPEN
1698 
1701  unsigned int fastopen_queue_size;
1702 #endif
1703 
1707  unsigned int listen_backlog_size;
1708 };
1709 
1710 
1711 #if EXTRA_CHECKS
1712 #define EXTRA_CHECK(a) do { if (!(a)) abort(); } while (0)
1713 #else
1714 #define EXTRA_CHECK(a)
1715 #endif
1716 
1717 
1726 #define DLL_insert(head,tail,element) do { \
1727  EXTRA_CHECK (NULL == (element)->next); \
1728  EXTRA_CHECK (NULL == (element)->prev); \
1729  (element)->next = (head); \
1730  (element)->prev = NULL; \
1731  if ((tail) == NULL) \
1732  (tail) = element; \
1733  else \
1734  (head)->prev = element; \
1735  (head) = (element); } while (0)
1736 
1737 
1747 #define DLL_remove(head,tail,element) do { \
1748  EXTRA_CHECK ( (NULL != (element)->next) || ((element) == (tail))); \
1749  EXTRA_CHECK ( (NULL != (element)->prev) || ((element) == (head))); \
1750  if ((element)->prev == NULL) \
1751  (head) = (element)->next; \
1752  else \
1753  (element)->prev->next = (element)->next; \
1754  if ((element)->next == NULL) \
1755  (tail) = (element)->prev; \
1756  else \
1757  (element)->next->prev = (element)->prev; \
1758  (element)->next = NULL; \
1759  (element)->prev = NULL; } while (0)
1760 
1761 
1762 
1771 #define XDLL_insert(head,tail,element) do { \
1772  EXTRA_CHECK (NULL == (element)->nextX); \
1773  EXTRA_CHECK (NULL == (element)->prevX); \
1774  (element)->nextX = (head); \
1775  (element)->prevX = NULL; \
1776  if (NULL == (tail)) \
1777  (tail) = element; \
1778  else \
1779  (head)->prevX = element; \
1780  (head) = (element); } while (0)
1781 
1782 
1792 #define XDLL_remove(head,tail,element) do { \
1793  EXTRA_CHECK ( (NULL != (element)->nextX) || ((element) == (tail))); \
1794  EXTRA_CHECK ( (NULL != (element)->prevX) || ((element) == (head))); \
1795  if (NULL == (element)->prevX) \
1796  (head) = (element)->nextX; \
1797  else \
1798  (element)->prevX->nextX = (element)->nextX; \
1799  if (NULL == (element)->nextX) \
1800  (tail) = (element)->prevX; \
1801  else \
1802  (element)->nextX->prevX = (element)->prevX; \
1803  (element)->nextX = NULL; \
1804  (element)->prevX = NULL; } while (0)
1805 
1806 
1815 #define EDLL_insert(head,tail,element) do { \
1816  (element)->nextE = (head); \
1817  (element)->prevE = NULL; \
1818  if ((tail) == NULL) \
1819  (tail) = element; \
1820  else \
1821  (head)->prevE = element; \
1822  (head) = (element); } while (0)
1823 
1824 
1834 #define EDLL_remove(head,tail,element) do { \
1835  if ((element)->prevE == NULL) \
1836  (head) = (element)->nextE; \
1837  else \
1838  (element)->prevE->nextE = (element)->nextE; \
1839  if ((element)->nextE == NULL) \
1840  (tail) = (element)->prevE; \
1841  else \
1842  (element)->nextE->prevE = (element)->prevE; \
1843  (element)->nextE = NULL; \
1844  (element)->prevE = NULL; } while (0)
1845 
1846 
1852 void
1853 MHD_unescape_plus (char *arg);
1854 
1855 
1867 typedef int
1869  const char *key,
1870  const char *value,
1871  enum MHD_ValueKind kind);
1872 
1873 
1888 int
1889 MHD_parse_arguments_ (struct MHD_Connection *connection,
1890  enum MHD_ValueKind kind,
1891  char *args,
1893  unsigned int *num_headers);
1894 
1895 
1909 bool
1911  const char *key,
1912  const char *token,
1913  size_t token_len);
1914 
1926 #define MHD_check_response_header_s_token_ci(r,k,tkn) \
1927  MHD_check_response_header_token_ci((r),(k),(tkn),MHD_STATICSTR_LEN_(tkn))
1928 
1938 void
1939 internal_suspend_connection_ (struct MHD_Connection *connection);
1940 
1941 #endif
bool thread_joined
Definition: internal.h:866
#define MAX_NONCE_LENGTH
Definition: internal.h:213
unsigned int per_ip_connection_limit
Definition: internal.h:1573
void * unescape_callback_cls
Definition: internal.h:1401
uint64_t total_size
Definition: internal.h:343
bool have_chunked_upload
Definition: internal.h:910
additional automatic macros for MHD_config.h
bool MHD_check_response_header_token_ci(const struct MHD_Response *response, const char *key, const char *token, size_t token_len)
Definition: response.c:265
uint64_t fd_off
Definition: internal.h:354
uint64_t current_chunk_offset
Definition: internal.h:924
void internal_suspend_connection_(struct MHD_Connection *connection)
Definition: daemon.c:2711
bool data_already_pending
Definition: internal.h:1551
socklen_t addr_len
Definition: internal.h:817
void * socket_context
Definition: internal.h:683
size_t(* UnescapeCallback)(void *cls, struct MHD_Connection *conn, char *uri)
Definition: internal.h:1229
uint64_t response_write_position
Definition: internal.h:798
public interface to libmicrohttpd
ssize_t(* ReceiveCallback)(struct MHD_Connection *conn, void *write_to, size_t max_bytes)
Definition: internal.h:556
MHD_ConnKeepAlive
Definition: internal.h:578
void * mhd_panic_cls
Definition: daemon.c:154
time_t connection_timeout
Definition: internal.h:1567
MHD_ContentReaderFreeCallback crfc
Definition: internal.h:318
void(* MHD_ContentReaderFreeCallback)(void *cls)
Definition: microhttpd.h:2059
char * version
Definition: internal.h:700
int suspended_dummy
Definition: internal.h:1001
struct MHD_Response * response
Definition: internal.h:656
char * colon
Definition: internal.h:737
char * write_buffer
Definition: internal.h:720
struct MHD_Connection * normal_timeout_tail
Definition: internal.h:1329
volatile bool was_quiesced
Definition: internal.h:1526
size_t data_size
Definition: internal.h:360
enum MHD_ValueKind kind
Definition: internal.h:278
struct MHD_HTTP_Header * first_header
Definition: internal.h:294
MHD_AccessHandlerCallback default_handler
Definition: internal.h:1247
int MHD_socket
Definition: microhttpd.h:181
uint64_t remaining_upload_size
Definition: internal.h:791
unsigned int responseCode
Definition: internal.h:901
platform-specific includes for libmicrohttpd
MHD_CONNECTION_STATE
Definition: internal.h:401
char * value
Definition: internal.h:272
void * uri_log_callback_cls
Definition: internal.h:1391
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
Definition: microhttpd.h:1863
size_t header_size
Definition: internal.h:785
struct MHD_Daemon * daemon
Definition: internal.h:641
int(* idle_handler)(struct MHD_Connection *connection)
Definition: internal.h:942
int listening_address_reuse
Definition: internal.h:1481
MHD_mutex_ per_ip_connection_mutex
Definition: internal.h:1459
struct MHD_Connection * manual_timeout_head
Definition: internal.h:1337
MHD_NotifyConnectionCallback notify_connection
Definition: internal.h:1372
struct MHD_Connection * cleanup_head
Definition: internal.h:1277
MHD_PanicCallback mhd_panic
Definition: daemon.c:149
bool client_aware
Definition: internal.h:841
int strict_for_client
Definition: internal.h:1588
struct MHD_Connection * cleanup_tail
Definition: internal.h:1282
struct MHD_Connection * prev
Definition: internal.h:622
uint64_t nmask
Definition: internal.h:233
size_t data_buffer_size
Definition: internal.h:365
size_t write_buffer_send_offset
Definition: internal.h:773
struct MHD_Daemon * worker_pool
Definition: internal.h:1424
size_t read_buffer_size
Definition: internal.h:757
void * client_context
Definition: internal.h:674
struct MHD_Connection * nextX
Definition: internal.h:631
struct MHD_Connection * manual_timeout_tail
Definition: internal.h:1344
const char * url
Definition: internal.h:694
size_t continue_message_write_offset
Definition: internal.h:812
MHD_socket socket_fd
Definition: internal.h:848
char * method
Definition: internal.h:688
MHD_thread_handle_ pid
Definition: internal.h:749
unsigned int connection_limit
Definition: internal.h:1561
char nonce[MAX_NONCE_LENGTH]
Definition: internal.h:238
unsigned int worker_pool_size
Definition: internal.h:1449
LogCallback uri_log_callback
Definition: internal.h:1386
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
Definition: microhttpd.h:2043
bool in_cleanup
Definition: internal.h:878
unsigned int reference_count
Definition: internal.h:371
time_t connection_timeout
Definition: internal.h:829
MHD_EpollState
Definition: internal.h:131
uint16_t port
Definition: internal.h:1583
char * last
Definition: internal.h:728
unsigned int connections
Definition: internal.h:1556
struct MHD_Connection * normal_timeout_head
Definition: internal.h:1322
MHD_ValueKind
Definition: microhttpd.h:1524
char * read_buffer
Definition: internal.h:714
ReceiveCallback recv_cls
Definition: internal.h:947
size_t thread_stack_size
Definition: internal.h:1444
size_t write_buffer_size
Definition: internal.h:768
Header for platform-independent threads abstraction.
uint64_t data_start
Definition: internal.h:349
UnescapeCallback unescape_callback
Definition: internal.h:1396
ssize_t(* TransmitCallback)(struct MHD_Connection *conn, const void *read_from, size_t max_bytes)
Definition: internal.h:570
int(* write_handler)(struct MHD_Connection *connection)
Definition: internal.h:936
unsigned int listen_backlog_size
Definition: internal.h:1707
unsigned int connection_timeout_dummy
Definition: internal.h:834
struct MHD_Connection * connections_head
Definition: internal.h:1257
struct MHD_Daemon * master
Definition: internal.h:1419
size_t pool_size
Definition: internal.h:1434
char * header
Definition: internal.h:267
struct MHD_Connection * next
Definition: internal.h:617
MHD_AcceptPolicyCallback apc
Definition: internal.h:1350
time_t last_activity
Definition: internal.h:823
void *(* LogCallback)(void *cls, const char *uri, struct MHD_Connection *con)
Definition: internal.h:1215
int(* MHD_ArgumentIterator_)(struct MHD_Connection *connection, const char *key, const char *value, enum MHD_ValueKind kind)
Definition: internal.h:1868
int(* MHD_AccessHandlerCallback)(void *cls, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls)
Definition: microhttpd.h:1922
bool sk_nonblck
Definition: internal.h:853
struct MemoryPool * pool
Definition: internal.h:666
uint64_t nc
Definition: internal.h:227
void(* MHD_RequestCompletedCallback)(void *cls, struct MHD_Connection *connection, void **con_cls, enum MHD_RequestTerminationCode toe)
Definition: microhttpd.h:1945
size_t write_buffer_append_offset
Definition: internal.h:779
struct MHD_HTTP_Header * next
Definition: internal.h:262
MHD_RequestCompletedCallback notify_completed
Definition: internal.h:1361
struct MHD_Connection * prevX
Definition: internal.h:636
bool resuming
Definition: internal.h:1540
bool read_closed
Definition: internal.h:861
MHD_thread_handle_ pid
Definition: internal.h:1454
void * notify_completed_cls
Definition: internal.h:1366
MHD_socket listen_fd
Definition: internal.h:1470
TransmitCallback send_cls
Definition: internal.h:952
void * notify_connection_cls
Definition: internal.h:1377
void * apc_cls
Definition: internal.h:1355
MHD_ContentReaderCallback crc
Definition: internal.h:312
Types for platform-independent inter-thread communication.
void * crc_cls
Definition: internal.h:306
void MHD_unescape_plus(char *arg)
Definition: internal.c:119
bool at_limit
Definition: internal.h:1535
struct sockaddr * addr
Definition: internal.h:743
MHD_mutex_ mutex
Definition: internal.h:338
struct MHD_Connection * suspended_connections_tail
Definition: internal.h:1272
bool suspended
Definition: internal.h:996
int MHD_parse_arguments_(struct MHD_Connection *connection, enum MHD_ValueKind kind, char *args, MHD_ArgumentIterator_ cb, unsigned int *num_headers)
Definition: internal.c:186
void * per_ip_connection_count
Definition: internal.h:1429
char * data
Definition: internal.h:300
size_t read_buffer_offset
Definition: internal.h:763
void * default_handler_cls
Definition: internal.h:1252
MHD_ConnectionEventLoopInfo
Definition: internal.h:177
volatile bool shutdown
Definition: internal.h:1519
MHD_mutex_ cleanup_connection_mutex
Definition: internal.h:1465
uint64_t current_chunk_size
Definition: internal.h:918
Header for platform-independent locks abstraction.
int(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
Definition: microhttpd.h:1877
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
Definition: microhttpd.h:1970
struct MHD_HTTP_Header * headers_received
Definition: internal.h:646
struct MHD_Connection * connections_tail
Definition: internal.h:1262
MHD_FLAG
Flags for the struct MHD_Daemon.
Definition: microhttpd.h:882
struct MHD_HTTP_Header * headers_received_tail
Definition: internal.h:651
size_t pool_increment
Definition: internal.h:1439
struct MHD_Connection * suspended_connections_head
Definition: internal.h:1267