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 
123 #define MHD_STATICSTR_LEN_(macro) (sizeof(macro)/sizeof(char) - 1)
124 
129 {
130 
136 
142 
148 
153 
158 
163 
168 };
169 
170 
175 {
180 
185 
190 
195 };
196 
197 
202 #define MHD_TEST_ALLOW_SUSPEND_RESUME 8192
203 
210 #define MAX_NONCE_LENGTH 129
211 
212 
218 {
219 
224  uint64_t nc;
225 
230  uint64_t nmask;
231 
236 
237 };
238 
239 #ifdef HAVE_MESSAGES
240 
244 void
245 MHD_DLOG (const struct MHD_Daemon *daemon,
246  const char *format,
247  ...);
248 #endif
249 
250 
255 {
260 
264  char *header;
265 
269  char *value;
270 
276 
277 };
278 
279 
284 {
285 
292 
297  char *data;
298 
303  void *crc_cls;
304 
310 
316 
317 #ifdef UPGRADE_SUPPORT
318 
323  MHD_UpgradeHandler upgrade_handler;
324 
328  void *upgrade_handler_cls;
329 #endif /* UPGRADE_SUPPORT */
330 
335  MHD_mutex_ mutex;
336 
340  uint64_t total_size;
341 
346  uint64_t data_start;
347 
351  uint64_t fd_off;
352 
357  size_t data_size;
358 
363 
368  unsigned int reference_count;
369 
373  int fd;
374 
378  enum MHD_ResponseFlags flags;
379 
380 };
381 
382 
399 {
405 
410 
415 
420 
425 
430 
435 
440 
446 
452 
458 
463 
468 
474 
479 
484 
489 
494 
499 
504 
509 
510  /*
511  * SSL/TLS connection states
512  */
513 
520 
521 #ifdef UPGRADE_SUPPORT
522 
526  MHD_CONNECTION_UPGRADE = MHD_TLS_CONNECTION_INIT + 1,
527 #endif /* UPGRADE_SUPPORT */
528 
529 };
530 
534 #define DEBUG_STATES MHD_NO
535 
536 
537 #ifdef HAVE_MESSAGES
538 #if DEBUG_STATES
539 const char *
540 MHD_state_to_string (enum MHD_CONNECTION_STATE state);
541 #endif
542 #endif
543 
552 typedef ssize_t
554  void *write_to,
555  size_t max_bytes);
556 
557 
566 typedef ssize_t
568  const void *write_to,
569  size_t max_bytes);
570 
571 
576 {
577 
578 #ifdef EPOLL_SUPPORT
579 
582  struct MHD_Connection *nextE;
583 
587  struct MHD_Connection *prevE;
588 #endif
589 
594 
599 
608 
613 
618 
623 
628 
633 
642  struct MemoryPool *pool;
643 
651 
660 
664  char *method;
665 
670  const char *url;
671 
676  char *version;
677 
683  char *read_buffer;
684 
690 
697  char *last;
698 
706  char *colon;
707 
712  struct sockaddr *addr;
713 
718  MHD_thread_handle_ pid;
719 
727 
733 
738 
743 
749 
754  size_t header_size;
755 
761 
768 
769 #if LINUX
770  enum MHD_resp_sender_
771  {
772  MHD_resp_sender_std = 0,
773  MHD_resp_sender_sendfile
774  } resp_sender;
775 #endif /* LINUX */
776 
782 
786  socklen_t addr_len;
787 
793 
799 
804 
811 
818 
823 
831 
836 
841  bool in_idle;
842 
848 
849 #ifdef EPOLL_SUPPORT
850 
853  enum MHD_EpollState epoll_state;
854 #endif
855 
860 
864  enum MHD_ConnectionEventLoopInfo event_loop_info;
865 
870  unsigned int responseCode;
871 
880 
888 
894 
899  int (*read_handler) (struct MHD_Connection *connection);
900 
905  int (*write_handler) (struct MHD_Connection *connection);
906 
911  int (*idle_handler) (struct MHD_Connection *connection);
912 
917 
922 
923 #ifdef UPGRADE_SUPPORT
924 
930  struct MHD_UpgradeResponseHandle *urh;
931 #endif /* UPGRADE_SUPPORT */
932 
933 #ifdef HTTPS_SUPPORT
934 
938  gnutls_session_t tls_session;
939 
943  int protocol;
944 
948  int cipher;
949 
954  bool tls_read_ready;
955 
959  bool tls_closed;
960 #endif /* HTTPS_SUPPORT */
961 
965  bool suspended;
966 
970  bool resuming;
971 };
972 
973 
974 #ifdef UPGRADE_SUPPORT
975 
984 #define RESERVE_EBUF_SIZE 8
985 
992 struct UpgradeEpollHandle
993 {
998  struct MHD_UpgradeResponseHandle *urh;
999 
1015  MHD_socket socket;
1016 
1020  enum MHD_EpollState celi;
1021 
1022 };
1023 
1024 
1030 struct MHD_UpgradeResponseHandle
1031 {
1037  struct MHD_Connection *connection;
1038 
1039 #ifdef HTTPS_SUPPORT
1040 
1043  struct MHD_UpgradeResponseHandle *next;
1044 
1048  struct MHD_UpgradeResponseHandle *prev;
1049 
1050 #ifdef EPOLL_SUPPORT
1051 
1054  struct MHD_UpgradeResponseHandle *nextE;
1055 
1059  struct MHD_UpgradeResponseHandle *prevE;
1060 
1064  bool in_eready_list;
1065 #endif
1066 
1072  char *in_buffer;
1073 
1079  char *out_buffer;
1080 
1086  size_t in_buffer_size;
1087 
1093  size_t out_buffer_size;
1094 
1102  size_t in_buffer_used;
1103 
1111  size_t out_buffer_used;
1112 
1116  struct UpgradeEpollHandle app;
1117 
1122  struct UpgradeEpollHandle mhd;
1123 
1128  char e_buf[RESERVE_EBUF_SIZE];
1129 
1130 #endif /* HTTPS_SUPPORT */
1131 
1142  volatile bool was_closed;
1143 
1165  bool clean_ready;
1166 };
1167 #endif /* UPGRADE_SUPPORT */
1168 
1169 
1178 typedef void *
1179 (*LogCallback)(void *cls,
1180  const char *uri,
1181  struct MHD_Connection *con);
1182 
1192 typedef size_t
1193 (*UnescapeCallback)(void *cls,
1194  struct MHD_Connection *conn,
1195  char *uri);
1196 
1197 
1206 {
1207 
1212 
1217 
1222 
1227 
1232 
1237 
1242 
1247 
1248 #ifdef EPOLL_SUPPORT
1249 
1252  struct MHD_Connection *eready_head;
1253 
1257  struct MHD_Connection *eready_tail;
1258 
1259 #ifdef UPGRADE_SUPPORT
1260 
1263  struct MHD_UpgradeResponseHandle *eready_urh_head;
1264 
1268  struct MHD_UpgradeResponseHandle *eready_urh_tail;
1269 #endif /* UPGRADE_SUPPORT */
1270 #endif /* EPOLL_SUPPORT */
1271 
1287 
1294 
1302 
1309 
1315 
1319  void *apc_cls;
1320 
1326 
1331 
1337 
1342 
1351 
1356 
1361 
1366 
1367 #ifdef HAVE_MESSAGES
1368 
1372  void (*custom_error_log) (void *cls, const char *fmt, va_list va);
1373 
1377  void *custom_error_log_cls;
1378 #endif
1379 
1384 
1389 
1394 
1398  size_t pool_size;
1399 
1404 
1409 
1413  unsigned int worker_pool_size;
1414 
1418  MHD_thread_handle_ pid;
1419 
1424 
1430 
1435 
1446 
1447 #ifdef EPOLL_SUPPORT
1448 
1451  int epoll_fd;
1452 
1457  bool listen_socket_in_epoll;
1458 
1459 #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
1460 
1464  int epoll_upgrade_fd;
1465 
1470  bool upgrade_fd_in_epoll;
1471 #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */
1472 
1473 #endif
1474 
1478  struct MHD_itc_ itc;
1479 
1483  volatile bool shutdown;
1484 
1490  volatile bool was_quiesced;
1491 
1499  bool at_limit;
1500 
1501  /*
1502  * Do we need to process resuming connections?
1503  */
1504  bool resuming;
1505 
1516 
1520  unsigned int connections;
1521 
1525  unsigned int connection_limit;
1526 
1532 
1538 
1542  enum MHD_FLAG options;
1543 
1547  uint16_t port;
1548 
1553 
1554 #ifdef HTTPS_SUPPORT
1555 #ifdef UPGRADE_SUPPORT
1556 
1561  struct MHD_UpgradeResponseHandle *urh_head;
1562 
1568  struct MHD_UpgradeResponseHandle *urh_tail;
1569 #endif /* UPGRADE_SUPPORT */
1570 
1574  gnutls_priority_t priority_cache;
1575 
1580  gnutls_credentials_type_t cred_type;
1581 
1585  gnutls_certificate_credentials_t x509_cred;
1586 
1590  gnutls_dh_params_t dh_params;
1591 
1592 #if GNUTLS_VERSION_MAJOR >= 3
1593 
1597  gnutls_certificate_retrieve_function2 *cert_callback;
1598 #endif
1599 
1603  const char *https_mem_key;
1604 
1608  const char *https_mem_cert;
1609 
1613  const char *https_key_password;
1614 
1618  const char *https_mem_trust;
1619 
1623  gnutls_dh_params_t https_mem_dhparams;
1624 
1628  bool have_dhparams;
1629 
1630 #endif /* HTTPS_SUPPORT */
1631 
1632 #ifdef DAUTH_SUPPORT
1633 
1637  const char *digest_auth_random;
1638 
1642  struct MHD_NonceNc *nnc;
1643 
1647  MHD_mutex_ nnc_lock;
1648 
1652  size_t digest_auth_rand_size;
1653 
1657  unsigned int nonce_nc_size;
1658 
1659 #endif
1660 
1661 #ifdef TCP_FASTOPEN
1662 
1665  unsigned int fastopen_queue_size;
1666 #endif
1667 
1671  unsigned int listen_backlog_size;
1672 };
1673 
1674 
1675 #if EXTRA_CHECKS
1676 #define EXTRA_CHECK(a) do { if (!(a)) abort(); } while (0)
1677 #else
1678 #define EXTRA_CHECK(a)
1679 #endif
1680 
1681 
1690 #define DLL_insert(head,tail,element) do { \
1691  EXTRA_CHECK (NULL == (element)->next); \
1692  EXTRA_CHECK (NULL == (element)->prev); \
1693  (element)->next = (head); \
1694  (element)->prev = NULL; \
1695  if ((tail) == NULL) \
1696  (tail) = element; \
1697  else \
1698  (head)->prev = element; \
1699  (head) = (element); } while (0)
1700 
1701 
1711 #define DLL_remove(head,tail,element) do { \
1712  EXTRA_CHECK ( (NULL != (element)->next) || ((element) == (tail))); \
1713  EXTRA_CHECK ( (NULL != (element)->prev) || ((element) == (head))); \
1714  if ((element)->prev == NULL) \
1715  (head) = (element)->next; \
1716  else \
1717  (element)->prev->next = (element)->next; \
1718  if ((element)->next == NULL) \
1719  (tail) = (element)->prev; \
1720  else \
1721  (element)->next->prev = (element)->prev; \
1722  (element)->next = NULL; \
1723  (element)->prev = NULL; } while (0)
1724 
1725 
1726 
1735 #define XDLL_insert(head,tail,element) do { \
1736  EXTRA_CHECK (NULL == (element)->nextX); \
1737  EXTRA_CHECK (NULL == (element)->prevX); \
1738  (element)->nextX = (head); \
1739  (element)->prevX = NULL; \
1740  if (NULL == (tail)) \
1741  (tail) = element; \
1742  else \
1743  (head)->prevX = element; \
1744  (head) = (element); } while (0)
1745 
1746 
1756 #define XDLL_remove(head,tail,element) do { \
1757  EXTRA_CHECK ( (NULL != (element)->nextX) || ((element) == (tail))); \
1758  EXTRA_CHECK ( (NULL != (element)->prevX) || ((element) == (head))); \
1759  if (NULL == (element)->prevX) \
1760  (head) = (element)->nextX; \
1761  else \
1762  (element)->prevX->nextX = (element)->nextX; \
1763  if (NULL == (element)->nextX) \
1764  (tail) = (element)->prevX; \
1765  else \
1766  (element)->nextX->prevX = (element)->prevX; \
1767  (element)->nextX = NULL; \
1768  (element)->prevX = NULL; } while (0)
1769 
1770 
1779 #define EDLL_insert(head,tail,element) do { \
1780  (element)->nextE = (head); \
1781  (element)->prevE = NULL; \
1782  if ((tail) == NULL) \
1783  (tail) = element; \
1784  else \
1785  (head)->prevE = element; \
1786  (head) = (element); } while (0)
1787 
1788 
1798 #define EDLL_remove(head,tail,element) do { \
1799  if ((element)->prevE == NULL) \
1800  (head) = (element)->nextE; \
1801  else \
1802  (element)->prevE->nextE = (element)->nextE; \
1803  if ((element)->nextE == NULL) \
1804  (tail) = (element)->prevE; \
1805  else \
1806  (element)->nextE->prevE = (element)->prevE; \
1807  (element)->nextE = NULL; \
1808  (element)->prevE = NULL; } while (0)
1809 
1810 
1816 void
1817 MHD_unescape_plus (char *arg);
1818 
1819 
1831 typedef int
1833  const char *key,
1834  const char *value,
1835  enum MHD_ValueKind kind);
1836 
1837 
1852 int
1853 MHD_parse_arguments_ (struct MHD_Connection *connection,
1854  enum MHD_ValueKind kind,
1855  char *args,
1857  unsigned int *num_headers);
1858 
1859 
1860 #endif
bool thread_joined
Definition: internal.h:835
#define MAX_NONCE_LENGTH
Definition: internal.h:210
unsigned int per_ip_connection_limit
Definition: internal.h:1537
void * unescape_callback_cls
Definition: internal.h:1365
uint64_t total_size
Definition: internal.h:340
bool have_chunked_upload
Definition: internal.h:879
additional automatic macros for MHD_config.h
uint64_t fd_off
Definition: internal.h:351
uint64_t current_chunk_offset
Definition: internal.h:893
bool data_already_pending
Definition: internal.h:1515
socklen_t addr_len
Definition: internal.h:786
void * socket_context
Definition: internal.h:659
size_t(* UnescapeCallback)(void *cls, struct MHD_Connection *conn, char *uri)
Definition: internal.h:1193
uint64_t response_write_position
Definition: internal.h:767
public interface to libmicrohttpd
ssize_t(* ReceiveCallback)(struct MHD_Connection *conn, void *write_to, size_t max_bytes)
Definition: internal.h:553
void * mhd_panic_cls
Definition: daemon.c:154
time_t connection_timeout
Definition: internal.h:1531
MHD_ContentReaderFreeCallback crfc
Definition: internal.h:315
void(* MHD_ContentReaderFreeCallback)(void *cls)
Definition: microhttpd.h:2055
char * version
Definition: internal.h:676
struct MHD_Response * response
Definition: internal.h:632
char * colon
Definition: internal.h:706
char * write_buffer
Definition: internal.h:689
struct MHD_Connection * normal_timeout_tail
Definition: internal.h:1293
ssize_t(* TransmitCallback)(struct MHD_Connection *conn, const void *write_to, size_t max_bytes)
Definition: internal.h:567
volatile bool was_quiesced
Definition: internal.h:1490
size_t data_size
Definition: internal.h:357
enum MHD_ValueKind kind
Definition: internal.h:275
struct MHD_HTTP_Header * first_header
Definition: internal.h:291
MHD_AccessHandlerCallback default_handler
Definition: internal.h:1211
int MHD_socket
Definition: microhttpd.h:181
uint64_t remaining_upload_size
Definition: internal.h:760
unsigned int responseCode
Definition: internal.h:870
platform-specific includes for libmicrohttpd
MHD_CONNECTION_STATE
Definition: internal.h:398
char * value
Definition: internal.h:269
void * uri_log_callback_cls
Definition: internal.h:1355
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
Definition: microhttpd.h:1859
size_t header_size
Definition: internal.h:754
struct MHD_Daemon * daemon
Definition: internal.h:617
int(* idle_handler)(struct MHD_Connection *connection)
Definition: internal.h:911
int listening_address_reuse
Definition: internal.h:1445
MHD_mutex_ per_ip_connection_mutex
Definition: internal.h:1423
struct MHD_Connection * manual_timeout_head
Definition: internal.h:1301
MHD_NotifyConnectionCallback notify_connection
Definition: internal.h:1336
struct MHD_Connection * cleanup_head
Definition: internal.h:1241
MHD_PanicCallback mhd_panic
Definition: daemon.c:149
bool client_aware
Definition: internal.h:810
int strict_for_client
Definition: internal.h:1552
struct MHD_Connection * cleanup_tail
Definition: internal.h:1246
struct MHD_Connection * prev
Definition: internal.h:598
uint64_t nmask
Definition: internal.h:230
size_t data_buffer_size
Definition: internal.h:362
size_t write_buffer_send_offset
Definition: internal.h:742
struct MHD_Daemon * worker_pool
Definition: internal.h:1388
size_t read_buffer_size
Definition: internal.h:726
void * client_context
Definition: internal.h:650
struct MHD_Connection * nextX
Definition: internal.h:607
struct MHD_Connection * manual_timeout_tail
Definition: internal.h:1308
const char * url
Definition: internal.h:670
size_t continue_message_write_offset
Definition: internal.h:781
MHD_socket socket_fd
Definition: internal.h:817
char * method
Definition: internal.h:664
MHD_thread_handle_ pid
Definition: internal.h:718
unsigned int connection_limit
Definition: internal.h:1525
char nonce[MAX_NONCE_LENGTH]
Definition: internal.h:235
unsigned int worker_pool_size
Definition: internal.h:1413
LogCallback uri_log_callback
Definition: internal.h:1350
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
Definition: microhttpd.h:2039
bool in_cleanup
Definition: internal.h:847
unsigned int reference_count
Definition: internal.h:368
time_t connection_timeout
Definition: internal.h:798
MHD_EpollState
Definition: internal.h:128
uint16_t port
Definition: internal.h:1547
char * last
Definition: internal.h:697
unsigned int connections
Definition: internal.h:1520
struct MHD_Connection * normal_timeout_head
Definition: internal.h:1286
MHD_ValueKind
Definition: microhttpd.h:1524
char * read_buffer
Definition: internal.h:683
ReceiveCallback recv_cls
Definition: internal.h:916
size_t thread_stack_size
Definition: internal.h:1408
size_t write_buffer_size
Definition: internal.h:737
Header for platform-independent threads abstraction.
uint64_t data_start
Definition: internal.h:346
UnescapeCallback unescape_callback
Definition: internal.h:1360
int(* write_handler)(struct MHD_Connection *connection)
Definition: internal.h:905
unsigned int listen_backlog_size
Definition: internal.h:1671
unsigned int connection_timeout_dummy
Definition: internal.h:803
struct MHD_Connection * connections_head
Definition: internal.h:1221
struct MHD_Daemon * master
Definition: internal.h:1383
size_t pool_size
Definition: internal.h:1398
char * header
Definition: internal.h:264
struct MHD_Connection * next
Definition: internal.h:593
MHD_AcceptPolicyCallback apc
Definition: internal.h:1314
time_t last_activity
Definition: internal.h:792
void *(* LogCallback)(void *cls, const char *uri, struct MHD_Connection *con)
Definition: internal.h:1179
int(* MHD_ArgumentIterator_)(struct MHD_Connection *connection, const char *key, const char *value, enum MHD_ValueKind kind)
Definition: internal.h:1832
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:1918
bool sk_nonblck
Definition: internal.h:822
struct MemoryPool * pool
Definition: internal.h:642
uint64_t nc
Definition: internal.h:224
void(* MHD_RequestCompletedCallback)(void *cls, struct MHD_Connection *connection, void **con_cls, enum MHD_RequestTerminationCode toe)
Definition: microhttpd.h:1941
size_t write_buffer_append_offset
Definition: internal.h:748
struct MHD_HTTP_Header * next
Definition: internal.h:259
MHD_RequestCompletedCallback notify_completed
Definition: internal.h:1325
struct MHD_Connection * prevX
Definition: internal.h:612
bool resuming
Definition: internal.h:1504
bool read_closed
Definition: internal.h:830
MHD_thread_handle_ pid
Definition: internal.h:1418
void * notify_completed_cls
Definition: internal.h:1330
MHD_socket listen_fd
Definition: internal.h:1434
TransmitCallback send_cls
Definition: internal.h:921
void * notify_connection_cls
Definition: internal.h:1341
void * apc_cls
Definition: internal.h:1319
MHD_ContentReaderCallback crc
Definition: internal.h:309
Types for platform-independent inter-thread communication.
void * crc_cls
Definition: internal.h:303
void MHD_unescape_plus(char *arg)
Definition: internal.c:119
bool at_limit
Definition: internal.h:1499
struct sockaddr * addr
Definition: internal.h:712
MHD_mutex_ mutex
Definition: internal.h:335
struct MHD_Connection * suspended_connections_tail
Definition: internal.h:1236
bool suspended
Definition: internal.h:965
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:1393
char * data
Definition: internal.h:297
size_t read_buffer_offset
Definition: internal.h:732
void * default_handler_cls
Definition: internal.h:1216
MHD_ConnectionEventLoopInfo
Definition: internal.h:174
volatile bool shutdown
Definition: internal.h:1483
MHD_mutex_ cleanup_connection_mutex
Definition: internal.h:1429
uint64_t current_chunk_size
Definition: internal.h:887
Header for platform-independent locks abstraction.
int(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
Definition: microhttpd.h:1873
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
Definition: microhttpd.h:1966
struct MHD_HTTP_Header * headers_received
Definition: internal.h:622
struct MHD_Connection * connections_tail
Definition: internal.h:1226
MHD_FLAG
Flags for the struct MHD_Daemon.
Definition: microhttpd.h:882
struct MHD_HTTP_Header * headers_received_tail
Definition: internal.h:627
size_t pool_increment
Definition: internal.h:1403
struct MHD_Connection * suspended_connections_head
Definition: internal.h:1231