GNU libmicrohttpd  0.9.59
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 #include "mhd_assert.h"
34 
35 #ifdef HTTPS_SUPPORT
36 #include <gnutls/gnutls.h>
37 #if GNUTLS_VERSION_MAJOR >= 3
38 #include <gnutls/abstract.h>
39 #endif
40 #endif /* HTTPS_SUPPORT */
41 
42 #ifdef HAVE_STDBOOL_H
43 #include <stdbool.h>
44 #endif
45 
46 
47 #ifdef MHD_PANIC
48 /* Override any defined MHD_PANIC macro with proper one */
49 #undef MHD_PANIC
50 #endif /* MHD_PANIC */
51 
52 #ifdef HAVE_MESSAGES
53 
58 #define MHD_PANIC(msg) do { mhd_panic (mhd_panic_cls, __FILE__, __LINE__, msg); BUILTIN_NOT_REACHED; } while (0)
59 #else
60 
65 #define MHD_PANIC(msg) do { mhd_panic (mhd_panic_cls, __FILE__, __LINE__, NULL); BUILTIN_NOT_REACHED; } while (0)
66 #endif
67 
68 #include "mhd_threads.h"
69 #include "mhd_locks.h"
70 #include "mhd_sockets.h"
71 #include "mhd_itc_types.h"
72 
73 
78 #define MHD_fd_close_chk_(fd) do { \
79  if (0 == close ((fd)) && (EBADF == errno)) \
80  MHD_PANIC(_("Failed to close FD.\n")); \
81  } while(0)
82 
87 #define EXTRA_CHECKS MHD_NO
88 
89 #define MHD_MAX(a,b) (((a)<(b)) ? (b) : (a))
90 #define MHD_MIN(a,b) (((a)<(b)) ? (a) : (b))
91 
92 
100 #define MHD_BUF_INC_SIZE 1024
101 
102 
107 
111 extern void *mhd_panic_cls;
112 
113 /* If we have Clang or gcc >= 4.5, use __buildin_unreachable() */
114 #if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
115 #define BUILTIN_NOT_REACHED __builtin_unreachable()
116 #elif defined(_MSC_FULL_VER)
117 #define BUILTIN_NOT_REACHED __assume(0)
118 #else
119 #define BUILTIN_NOT_REACHED
120 #endif
121 
122 #ifndef MHD_STATICSTR_LEN_
123 
126 #define MHD_STATICSTR_LEN_(macro) (sizeof(macro)/sizeof(char) - 1)
127 #endif /* ! MHD_STATICSTR_LEN_ */
128 
129 
134 {
135 
141 
147 
153 
158 
163 
168 
173 };
174 
175 
180 {
185 
190 
195 
200 };
201 
202 
207 #define MHD_TEST_ALLOW_SUSPEND_RESUME 8192
208 
215 #define MAX_NONCE_LENGTH 129
216 
217 
223 {
224 
229  uint64_t nc;
230 
235  uint64_t nmask;
236 
241 
242 };
243 
244 #ifdef HAVE_MESSAGES
245 
249 void
250 MHD_DLOG (const struct MHD_Daemon *daemon,
251  const char *format,
252  ...);
253 #endif
254 
255 
260 {
265 
269  char *header;
270 
274  char *value;
275 
281 
282 };
283 
284 
289 {
290 
297 
302  char *data;
303 
308  void *crc_cls;
309 
315 
321 
322 #ifdef UPGRADE_SUPPORT
323 
328  MHD_UpgradeHandler upgrade_handler;
329 
333  void *upgrade_handler_cls;
334 #endif /* UPGRADE_SUPPORT */
335 
340  MHD_mutex_ mutex;
341 
345  uint64_t total_size;
346 
351  uint64_t data_start;
352 
356  uint64_t fd_off;
357 
362  size_t data_size;
363 
368 
373  unsigned int reference_count;
374 
378  int fd;
379 
384 
385 };
386 
387 
404 {
410 
415 
420 
425 
430 
435 
440 
445 
451 
457 
463 
468 
473 
479 
484 
489 
494 
499 
504 
509 
514 
515 #ifdef UPGRADE_SUPPORT
516 
520  MHD_CONNECTION_UPGRADE
521 #endif /* UPGRADE_SUPPORT */
522 
523 };
524 
525 
530 {
541 };
542 
546 #define DEBUG_STATES MHD_NO
547 
548 
549 #ifdef HAVE_MESSAGES
550 #if DEBUG_STATES
551 const char *
552 MHD_state_to_string (enum MHD_CONNECTION_STATE state);
553 #endif
554 #endif
555 
564 typedef ssize_t
566  void *write_to,
567  size_t max_bytes);
568 
569 
578 typedef ssize_t
580  const void *read_from,
581  size_t max_bytes);
582 
583 
588 {
593 
598 
603 };
604 
609 {
610 
611 #ifdef EPOLL_SUPPORT
612 
615  struct MHD_Connection *nextE;
616 
620  struct MHD_Connection *prevE;
621 #endif
622 
627 
632 
641 
646 
651 
656 
661 
666 
675  struct MemoryPool *pool;
676 
684 
693 
697  char *method;
698 
703  const char *url;
704 
709  char *version;
710 
717 
723  char *read_buffer;
724 
730 
737  char *last;
738 
746  char *colon;
747 
752  struct sockaddr *addr;
753 
758  MHD_thread_handle_ID_ pid;
759 
767 
773 
778 
783 
789 
794  size_t header_size;
795 
801 
808 
809 #if defined(_MHD_HAVE_SENDFILE)
810  enum MHD_resp_sender_
811  {
812  MHD_resp_sender_std = 0,
813  MHD_resp_sender_sendfile
814  } resp_sender;
815 #endif /* _MHD_HAVE_SENDFILE */
816 
822 
826  socklen_t addr_len;
827 
833 
839 
844 
851 
858 
863 
871 
876 
881  bool in_idle;
882 
888 
889 #ifdef EPOLL_SUPPORT
890 
893  enum MHD_EpollState epoll_state;
894 #endif
895 
900 
905 
910  unsigned int responseCode;
911 
920 
928 
934 
939 
944 
945 #ifdef UPGRADE_SUPPORT
946 
952  struct MHD_UpgradeResponseHandle *urh;
953 #endif /* UPGRADE_SUPPORT */
954 
955 #ifdef HTTPS_SUPPORT
956 
960  gnutls_session_t tls_session;
961 
965  int protocol;
966 
970  int cipher;
971 
975  enum MHD_TLS_CONN_STATE tls_state;
976 
981  bool tls_read_ready;
982 #endif /* HTTPS_SUPPORT */
983 
987  bool suspended;
988 
993 
997  bool resuming;
998 };
999 
1000 
1001 #ifdef UPGRADE_SUPPORT
1002 
1011 #define RESERVE_EBUF_SIZE 8
1012 
1019 struct UpgradeEpollHandle
1020 {
1025  struct MHD_UpgradeResponseHandle *urh;
1026 
1042  MHD_socket socket;
1043 
1047  enum MHD_EpollState celi;
1048 
1049 };
1050 
1051 
1057 struct MHD_UpgradeResponseHandle
1058 {
1064  struct MHD_Connection *connection;
1065 
1066 #ifdef HTTPS_SUPPORT
1067 
1070  struct MHD_UpgradeResponseHandle *next;
1071 
1075  struct MHD_UpgradeResponseHandle *prev;
1076 
1077 #ifdef EPOLL_SUPPORT
1078 
1081  struct MHD_UpgradeResponseHandle *nextE;
1082 
1086  struct MHD_UpgradeResponseHandle *prevE;
1087 
1091  bool in_eready_list;
1092 #endif
1093 
1099  char *in_buffer;
1100 
1106  char *out_buffer;
1107 
1113  size_t in_buffer_size;
1114 
1120  size_t out_buffer_size;
1121 
1129  size_t in_buffer_used;
1130 
1138  size_t out_buffer_used;
1139 
1143  struct UpgradeEpollHandle app;
1144 
1149  struct UpgradeEpollHandle mhd;
1150 
1155  char e_buf[RESERVE_EBUF_SIZE];
1156 
1157 #endif /* HTTPS_SUPPORT */
1158 
1169  volatile bool was_closed;
1170 
1192  bool clean_ready;
1193 };
1194 #endif /* UPGRADE_SUPPORT */
1195 
1196 
1205 typedef void *
1206 (*LogCallback)(void *cls,
1207  const char *uri,
1208  struct MHD_Connection *con);
1209 
1219 typedef size_t
1220 (*UnescapeCallback)(void *cls,
1221  struct MHD_Connection *conn,
1222  char *uri);
1223 
1224 
1233 {
1234 
1239 
1244 
1249 
1254 
1259 
1264 
1269 
1274 
1275 #ifdef EPOLL_SUPPORT
1276 
1279  struct MHD_Connection *eready_head;
1280 
1284  struct MHD_Connection *eready_tail;
1285 
1286 #ifdef UPGRADE_SUPPORT
1287 
1290  struct MHD_UpgradeResponseHandle *eready_urh_head;
1291 
1295  struct MHD_UpgradeResponseHandle *eready_urh_tail;
1296 #endif /* UPGRADE_SUPPORT */
1297 #endif /* EPOLL_SUPPORT */
1298 
1314 
1321 
1329 
1336 
1342 
1346  void *apc_cls;
1347 
1353 
1358 
1364 
1369 
1378 
1383 
1388 
1393 
1394 #ifdef HAVE_MESSAGES
1395 
1399  void (*custom_error_log) (void *cls, const char *fmt, va_list va);
1400 
1404  void *custom_error_log_cls;
1405 #endif
1406 
1411 
1416 
1421 
1425  size_t pool_size;
1426 
1431 
1436 
1440  unsigned int worker_pool_size;
1441 
1445  MHD_thread_handle_ID_ pid;
1446 
1451 
1457 
1462 
1473 
1474 #ifdef EPOLL_SUPPORT
1475 
1478  int epoll_fd;
1479 
1484  bool listen_socket_in_epoll;
1485 
1486 #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
1487 
1491  int epoll_upgrade_fd;
1492 
1497  bool upgrade_fd_in_epoll;
1498 #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */
1499 
1500 #endif
1501 
1505  struct MHD_itc_ itc;
1506 
1510  volatile bool shutdown;
1511 
1517  volatile bool was_quiesced;
1518 
1526  bool at_limit;
1527 
1528  /*
1529  * Do we need to process resuming connections?
1530  */
1531  bool resuming;
1532 
1543 
1547  unsigned int connections;
1548 
1552  unsigned int connection_limit;
1553 
1559 
1565 
1570 
1574  uint16_t port;
1575 
1580 
1581 #ifdef HTTPS_SUPPORT
1582 #ifdef UPGRADE_SUPPORT
1583 
1588  struct MHD_UpgradeResponseHandle *urh_head;
1589 
1595  struct MHD_UpgradeResponseHandle *urh_tail;
1596 #endif /* UPGRADE_SUPPORT */
1597 
1601  gnutls_priority_t priority_cache;
1602 
1607  gnutls_credentials_type_t cred_type;
1608 
1612  gnutls_certificate_credentials_t x509_cred;
1613 
1617  gnutls_dh_params_t dh_params;
1618 
1619 #if GNUTLS_VERSION_MAJOR >= 3
1620 
1624  gnutls_certificate_retrieve_function2 *cert_callback;
1625 #endif
1626 
1630  const char *https_mem_key;
1631 
1635  const char *https_mem_cert;
1636 
1640  const char *https_key_password;
1641 
1645  const char *https_mem_trust;
1646 
1650  gnutls_dh_params_t https_mem_dhparams;
1651 
1655  bool have_dhparams;
1656 
1657 #endif /* HTTPS_SUPPORT */
1658 
1659 #ifdef DAUTH_SUPPORT
1660 
1664  const char *digest_auth_random;
1665 
1669  struct MHD_NonceNc *nnc;
1670 
1674  MHD_mutex_ nnc_lock;
1675 
1679  size_t digest_auth_rand_size;
1680 
1684  unsigned int nonce_nc_size;
1685 
1686 #endif
1687 
1688 #ifdef TCP_FASTOPEN
1689 
1692  unsigned int fastopen_queue_size;
1693 #endif
1694 
1698  unsigned int listen_backlog_size;
1699 };
1700 
1701 
1710 #define DLL_insert(head,tail,element) do { \
1711  mhd_assert (NULL == (element)->next); \
1712  mhd_assert (NULL == (element)->prev); \
1713  (element)->next = (head); \
1714  (element)->prev = NULL; \
1715  if ((tail) == NULL) \
1716  (tail) = element; \
1717  else \
1718  (head)->prev = element; \
1719  (head) = (element); } while (0)
1720 
1721 
1731 #define DLL_remove(head,tail,element) do { \
1732  mhd_assert ( (NULL != (element)->next) || ((element) == (tail))); \
1733  mhd_assert ( (NULL != (element)->prev) || ((element) == (head))); \
1734  if ((element)->prev == NULL) \
1735  (head) = (element)->next; \
1736  else \
1737  (element)->prev->next = (element)->next; \
1738  if ((element)->next == NULL) \
1739  (tail) = (element)->prev; \
1740  else \
1741  (element)->next->prev = (element)->prev; \
1742  (element)->next = NULL; \
1743  (element)->prev = NULL; } while (0)
1744 
1745 
1746 
1755 #define XDLL_insert(head,tail,element) do { \
1756  mhd_assert (NULL == (element)->nextX); \
1757  mhd_assert (NULL == (element)->prevX); \
1758  (element)->nextX = (head); \
1759  (element)->prevX = NULL; \
1760  if (NULL == (tail)) \
1761  (tail) = element; \
1762  else \
1763  (head)->prevX = element; \
1764  (head) = (element); } while (0)
1765 
1766 
1776 #define XDLL_remove(head,tail,element) do { \
1777  mhd_assert ( (NULL != (element)->nextX) || ((element) == (tail))); \
1778  mhd_assert ( (NULL != (element)->prevX) || ((element) == (head))); \
1779  if (NULL == (element)->prevX) \
1780  (head) = (element)->nextX; \
1781  else \
1782  (element)->prevX->nextX = (element)->nextX; \
1783  if (NULL == (element)->nextX) \
1784  (tail) = (element)->prevX; \
1785  else \
1786  (element)->nextX->prevX = (element)->prevX; \
1787  (element)->nextX = NULL; \
1788  (element)->prevX = NULL; } while (0)
1789 
1790 
1799 #define EDLL_insert(head,tail,element) do { \
1800  (element)->nextE = (head); \
1801  (element)->prevE = NULL; \
1802  if ((tail) == NULL) \
1803  (tail) = element; \
1804  else \
1805  (head)->prevE = element; \
1806  (head) = (element); } while (0)
1807 
1808 
1818 #define EDLL_remove(head,tail,element) do { \
1819  if ((element)->prevE == NULL) \
1820  (head) = (element)->nextE; \
1821  else \
1822  (element)->prevE->nextE = (element)->nextE; \
1823  if ((element)->nextE == NULL) \
1824  (tail) = (element)->prevE; \
1825  else \
1826  (element)->nextE->prevE = (element)->prevE; \
1827  (element)->nextE = NULL; \
1828  (element)->prevE = NULL; } while (0)
1829 
1830 
1836 void
1837 MHD_unescape_plus (char *arg);
1838 
1839 
1851 typedef int
1853  const char *key,
1854  const char *value,
1855  enum MHD_ValueKind kind);
1856 
1857 
1872 int
1873 MHD_parse_arguments_ (struct MHD_Connection *connection,
1874  enum MHD_ValueKind kind,
1875  char *args,
1877  unsigned int *num_headers);
1878 
1879 
1893 bool
1895  const char *key,
1896  const char *token,
1897  size_t token_len);
1898 
1910 #define MHD_check_response_header_s_token_ci(r,k,tkn) \
1911  MHD_check_response_header_token_ci((r),(k),(tkn),MHD_STATICSTR_LEN_(tkn))
1912 
1913 
1923 void
1924 internal_suspend_connection_ (struct MHD_Connection *connection);
1925 
1926 #endif
bool thread_joined
Definition: internal.h:875
#define MAX_NONCE_LENGTH
Definition: internal.h:215
unsigned int per_ip_connection_limit
Definition: internal.h:1564
void * unescape_callback_cls
Definition: internal.h:1392
uint64_t total_size
Definition: internal.h:345
bool have_chunked_upload
Definition: internal.h:919
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:270
uint64_t fd_off
Definition: internal.h:356
uint64_t current_chunk_offset
Definition: internal.h:933
void internal_suspend_connection_(struct MHD_Connection *connection)
Definition: daemon.c:2559
bool data_already_pending
Definition: internal.h:1542
socklen_t addr_len
Definition: internal.h:826
void * socket_context
Definition: internal.h:692
size_t(* UnescapeCallback)(void *cls, struct MHD_Connection *conn, char *uri)
Definition: internal.h:1220
enum MHD_CONNECTION_STATE state
Definition: internal.h:899
uint64_t response_write_position
Definition: internal.h:807
public interface to libmicrohttpd
enum MHD_ConnKeepAlive keepalive
Definition: internal.h:716
ssize_t(* ReceiveCallback)(struct MHD_Connection *conn, void *write_to, size_t max_bytes)
Definition: internal.h:565
enum MHD_ConnectionEventLoopInfo event_loop_info
Definition: internal.h:904
MHD_ConnKeepAlive
Definition: internal.h:587
void * mhd_panic_cls
Definition: daemon.c:157
MHD_thread_handle_ID_ pid
Definition: internal.h:1445
time_t connection_timeout
Definition: internal.h:1558
MHD_ContentReaderFreeCallback crfc
Definition: internal.h:320
MHD_TLS_CONN_STATE
Definition: internal.h:529
void(* MHD_ContentReaderFreeCallback)(void *cls)
Definition: microhttpd.h:2063
char * version
Definition: internal.h:709
int suspended_dummy
Definition: internal.h:992
struct MHD_Response * response
Definition: internal.h:665
char * colon
Definition: internal.h:746
char * write_buffer
Definition: internal.h:729
struct MHD_Connection * normal_timeout_tail
Definition: internal.h:1320
volatile bool was_quiesced
Definition: internal.h:1517
size_t data_size
Definition: internal.h:362
MHD_thread_handle_ID_ pid
Definition: internal.h:758
enum MHD_ValueKind kind
Definition: internal.h:280
struct MHD_HTTP_Header * first_header
Definition: internal.h:296
MHD_AccessHandlerCallback default_handler
Definition: internal.h:1238
int MHD_socket
Definition: microhttpd.h:181
uint64_t remaining_upload_size
Definition: internal.h:800
unsigned int responseCode
Definition: internal.h:910
platform-specific includes for libmicrohttpd
MHD_CONNECTION_STATE
Definition: internal.h:403
char * value
Definition: internal.h:274
void * uri_log_callback_cls
Definition: internal.h:1382
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
Definition: microhttpd.h:1866
size_t header_size
Definition: internal.h:794
struct MHD_Daemon * daemon
Definition: internal.h:650
int listening_address_reuse
Definition: internal.h:1472
MHD_mutex_ per_ip_connection_mutex
Definition: internal.h:1450
struct MHD_Connection * manual_timeout_head
Definition: internal.h:1328
MHD_NotifyConnectionCallback notify_connection
Definition: internal.h:1363
struct MHD_Connection * cleanup_head
Definition: internal.h:1268
MHD_PanicCallback mhd_panic
Definition: daemon.c:152
bool client_aware
Definition: internal.h:850
int strict_for_client
Definition: internal.h:1579
struct MHD_Connection * cleanup_tail
Definition: internal.h:1273
struct MHD_Connection * prev
Definition: internal.h:631
uint64_t nmask
Definition: internal.h:235
size_t data_buffer_size
Definition: internal.h:367
size_t write_buffer_send_offset
Definition: internal.h:782
struct MHD_Daemon * worker_pool
Definition: internal.h:1415
size_t read_buffer_size
Definition: internal.h:766
void * client_context
Definition: internal.h:683
struct MHD_Connection * nextX
Definition: internal.h:640
struct MHD_Connection * manual_timeout_tail
Definition: internal.h:1335
const char * url
Definition: internal.h:703
size_t continue_message_write_offset
Definition: internal.h:821
MHD_socket socket_fd
Definition: internal.h:857
char * method
Definition: internal.h:697
unsigned int connection_limit
Definition: internal.h:1552
char nonce[MAX_NONCE_LENGTH]
Definition: internal.h:240
unsigned int worker_pool_size
Definition: internal.h:1440
enum MHD_FLAG options
Definition: internal.h:1569
LogCallback uri_log_callback
Definition: internal.h:1377
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
Definition: microhttpd.h:2047
bool in_cleanup
Definition: internal.h:887
unsigned int reference_count
Definition: internal.h:373
time_t connection_timeout
Definition: internal.h:838
MHD_EpollState
Definition: internal.h:133
uint16_t port
Definition: internal.h:1574
char * last
Definition: internal.h:737
unsigned int connections
Definition: internal.h:1547
struct MHD_Connection * normal_timeout_head
Definition: internal.h:1313
MHD_ValueKind
Definition: microhttpd.h:1517
char * read_buffer
Definition: internal.h:723
macros for mhd_assert()
ReceiveCallback recv_cls
Definition: internal.h:938
size_t thread_stack_size
Definition: internal.h:1435
size_t write_buffer_size
Definition: internal.h:777
Header for platform-independent threads abstraction.
uint64_t data_start
Definition: internal.h:351
UnescapeCallback unescape_callback
Definition: internal.h:1387
ssize_t(* TransmitCallback)(struct MHD_Connection *conn, const void *read_from, size_t max_bytes)
Definition: internal.h:579
unsigned int listen_backlog_size
Definition: internal.h:1698
unsigned int connection_timeout_dummy
Definition: internal.h:843
struct MHD_Connection * connections_head
Definition: internal.h:1248
struct MHD_Daemon * master
Definition: internal.h:1410
size_t pool_size
Definition: internal.h:1425
char * header
Definition: internal.h:269
struct MHD_Connection * next
Definition: internal.h:626
struct MHD_itc_ itc
Definition: internal.h:1505
MHD_AcceptPolicyCallback apc
Definition: internal.h:1341
time_t last_activity
Definition: internal.h:832
void *(* LogCallback)(void *cls, const char *uri, struct MHD_Connection *con)
Definition: internal.h:1206
int(* MHD_ArgumentIterator_)(struct MHD_Connection *connection, const char *key, const char *value, enum MHD_ValueKind kind)
Definition: internal.h:1852
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:1925
bool sk_nonblck
Definition: internal.h:862
enum MHD_ResponseFlags flags
Definition: internal.h:383
struct MemoryPool * pool
Definition: internal.h:675
uint64_t nc
Definition: internal.h:229
void(* MHD_RequestCompletedCallback)(void *cls, struct MHD_Connection *connection, void **con_cls, enum MHD_RequestTerminationCode toe)
Definition: microhttpd.h:1948
size_t write_buffer_append_offset
Definition: internal.h:788
struct MHD_HTTP_Header * next
Definition: internal.h:264
MHD_RequestCompletedCallback notify_completed
Definition: internal.h:1352
struct MHD_Connection * prevX
Definition: internal.h:645
void(* MHD_UpgradeHandler)(void *cls, struct MHD_Connection *connection, void *con_cls, const char *extra_in, size_t extra_in_size, MHD_socket sock, struct MHD_UpgradeResponseHandle *urh)
Definition: microhttpd.h:2898
bool resuming
Definition: internal.h:1531
bool read_closed
Definition: internal.h:870
void * notify_completed_cls
Definition: internal.h:1357
MHD_socket listen_fd
Definition: internal.h:1461
TransmitCallback send_cls
Definition: internal.h:943
void * notify_connection_cls
Definition: internal.h:1368
void * apc_cls
Definition: internal.h:1346
MHD_ContentReaderCallback crc
Definition: internal.h:314
Types for platform-independent inter-thread communication.
void * crc_cls
Definition: internal.h:308
void MHD_unescape_plus(char *arg)
Definition: internal.c:117
bool at_limit
Definition: internal.h:1526
struct sockaddr * addr
Definition: internal.h:752
MHD_mutex_ mutex
Definition: internal.h:340
struct MHD_Connection * suspended_connections_tail
Definition: internal.h:1263
bool suspended
Definition: internal.h:987
int MHD_parse_arguments_(struct MHD_Connection *connection, enum MHD_ValueKind kind, char *args, MHD_ArgumentIterator_ cb, unsigned int *num_headers)
Definition: internal.c:184
void * per_ip_connection_count
Definition: internal.h:1420
char * data
Definition: internal.h:302
size_t read_buffer_offset
Definition: internal.h:772
void * default_handler_cls
Definition: internal.h:1243
MHD_ConnectionEventLoopInfo
Definition: internal.h:179
volatile bool shutdown
Definition: internal.h:1510
MHD_ResponseFlags
Definition: microhttpd.h:2578
MHD_mutex_ cleanup_connection_mutex
Definition: internal.h:1456
uint64_t current_chunk_size
Definition: internal.h:927
Header for platform-independent locks abstraction.
int(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
Definition: microhttpd.h:1880
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
Definition: microhttpd.h:1974
struct MHD_HTTP_Header * headers_received
Definition: internal.h:655
struct MHD_Connection * connections_tail
Definition: internal.h:1253
MHD_FLAG
Flags for the struct MHD_Daemon.
Definition: microhttpd.h:882
struct MHD_HTTP_Header * headers_received_tail
Definition: internal.h:660
size_t pool_increment
Definition: internal.h:1430
struct MHD_Connection * suspended_connections_head
Definition: internal.h:1258