GNU libmicrohttpd  0.9.65
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 "microhttpd2.h"
33 #include "microhttpd_tls.h"
34 #include "mhd_assert.h"
35 #include "mhd_compat.h"
36 #include "mhd_itc.h"
37 #include "mhd_mono_clock.h"
38 #include "memorypool.h"
39 
40 #ifdef HTTPS_SUPPORT
41 #include <gnutls/gnutls.h>
42 #if GNUTLS_VERSION_MAJOR >= 3
43 #include <gnutls/abstract.h>
44 #endif
45 #endif /* HTTPS_SUPPORT */
46 
47 #ifdef HAVE_STDBOOL_H
48 #include <stdbool.h>
49 #endif
50 #ifdef MHD_PANIC
51 /* Override any defined MHD_PANIC macro with proper one */
52 #undef MHD_PANIC
53 #endif /* MHD_PANIC */
54 
55 #ifdef HAVE_MESSAGES
56 
61 #define MHD_PANIC(msg) do { mhd_panic (mhd_panic_cls, __FILE__, __LINE__, msg); BUILTIN_NOT_REACHED; } while (0)
62 #else
63 
68 #define MHD_PANIC(msg) do { mhd_panic (mhd_panic_cls, __FILE__, __LINE__, NULL); BUILTIN_NOT_REACHED; } while (0)
69 #endif
70 
71 #include "mhd_threads.h"
72 #include "mhd_locks.h"
73 #include "mhd_sockets.h"
74 #include "mhd_str.h"
75 #include "mhd_itc_types.h"
76 
77 
78 #ifdef HAVE_MESSAGES
79 
83 void
84 MHD_DLOG (const struct MHD_Daemon *daemon,
85  enum MHD_StatusCode sc,
86  const char *format,
87  ...);
88 #endif
89 
90 
95 #define MHD_fd_close_chk_(fd) do { \
96  if ( (0 != close ((fd)) && (EBADF == errno)) ) \
97  MHD_PANIC(_("Failed to close FD.\n")); \
98  } while(0)
99 
104 #define EXTRA_CHECKS MHD_NO
105 
106 #define MHD_MAX(a,b) (((a)<(b)) ? (b) : (a))
107 #define MHD_MIN(a,b) (((a)<(b)) ? (a) : (b))
108 
109 
117 #define MHD_BUF_INC_SIZE 1024
118 
119 
124 
128 extern void *mhd_panic_cls;
129 
130 /* If we have Clang or gcc >= 4.5, use __buildin_unreachable() */
131 #if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
132 #define BUILTIN_NOT_REACHED __builtin_unreachable()
133 #elif defined(_MSC_FULL_VER)
134 #define BUILTIN_NOT_REACHED __assume(0)
135 #else
136 #define BUILTIN_NOT_REACHED
137 #endif
138 
139 #ifndef MHD_STATICSTR_LEN_
140 
143 #define MHD_STATICSTR_LEN_(macro) (sizeof(macro)/sizeof(char) - 1)
144 #endif /* ! MHD_STATICSTR_LEN_ */
145 
146 
147 
152 {
157 
162 
167 };
168 
169 
178 typedef ssize_t
180  void *write_to,
181  size_t max_bytes);
182 
183 
192 typedef ssize_t
194  const void *read_from,
195  size_t max_bytes);
196 
197 
213 enum MHD_REQUEST_STATE // FIXME: fix capitalization!
214 {
220 
225 
230 
235 
240 
245 
250 
255 
261 
267 
273 
278 
283 
289 
294 
299 
304 
309 
314 
319 
320 #ifdef UPGRADE_SUPPORT
321 
325  MHD_REQUEST_UPGRADE
326 #endif /* UPGRADE_SUPPORT */
327 
328 };
329 
330 
335 {
340 
344  char *header;
345 
349  char *value;
350 
356 
357 };
358 
359 
364 {
365 
370 
375 
381 
386 
391 
399 
404  char *method_s;
405 
410  const char *url;
411 
416  char *version_s;
417 
424 
430  char *read_buffer;
431 
437 
444  char *last;
445 
453  char *colon;
454 
455 #ifdef UPGRADE_SUPPORT
456 
462  struct MHD_UpgradeResponseHandle *urh;
463 #endif /* UPGRADE_SUPPORT */
464 
472 
478 
483 
488 
494 
499  size_t header_size;
500 
506 
514 
520 
527 
528  #if defined(_MHD_HAVE_SENDFILE)
529  // FIXME: document, fix capitalization!
530  enum MHD_resp_sender_
531  {
532  MHD_resp_sender_std = 0,
533  MHD_resp_sender_sendfile
534  } resp_sender;
535 #endif /* _MHD_HAVE_SENDFILE */
536 
542 
547 
551  enum MHD_Method method;
552 
556  enum MHD_RequestEventLoopInfo event_loop_info;
557 
562  bool in_idle;
563 
569 
578 };
579 
580 
585 {
586 
592 
598 
604 
609 
614 
619 
624 };
625 
626 
631 {
632 
633 #ifdef EPOLL_SUPPORT
634 
637  struct MHD_Connection *nextE;
638 
642  struct MHD_Connection *prevE;
643 #endif
644 
649 
654 
663 
668 
673 
682  struct MemoryPool *pool;
683 
692 
693 #ifdef HTTPS_SUPPORT
694 
697  struct MHD_TLS_ConnectionState *tls_cs;
698 #endif
699 
704 
709 
715 
720  MHD_thread_handle_ID_ pid;
721 
725  struct sockaddr_storage addr;
726 
730  socklen_t addr_len;
731 
737 
743 
750 
751 #ifdef EPOLL_SUPPORT
752 
755  enum MHD_EpollState epoll_state;
756 #endif
757 
761  bool suspended;
762 
767 
771  bool resuming;
772 
777 
782 
790 
791 };
792 
793 
794 #ifdef UPGRADE_SUPPORT
795 
804 #define RESERVE_EBUF_SIZE 8
805 
812 struct UpgradeEpollHandle
813 {
818  struct MHD_UpgradeResponseHandle *urh;
819 
835  MHD_socket socket;
836 
840  enum MHD_EpollState celi;
841 
842 };
843 
844 
850 struct MHD_UpgradeResponseHandle
851 {
857  struct MHD_Connection *connection;
858 
859 #ifdef HTTPS_SUPPORT
860 
863  struct MHD_UpgradeResponseHandle *next;
864 
868  struct MHD_UpgradeResponseHandle *prev;
869 
870 #ifdef EPOLL_SUPPORT
871 
874  struct MHD_UpgradeResponseHandle *nextE;
875 
879  struct MHD_UpgradeResponseHandle *prevE;
880 
884  bool in_eready_list;
885 #endif
886 
892  char *in_buffer;
893 
899  char *out_buffer;
900 
906  size_t in_buffer_size;
907 
913  size_t out_buffer_size;
914 
922  size_t in_buffer_used;
923 
931  size_t out_buffer_used;
932 
936  struct UpgradeEpollHandle app;
937 
942  struct UpgradeEpollHandle mhd;
943 
948  char e_buf[RESERVE_EBUF_SIZE];
949 
950 #endif /* HTTPS_SUPPORT */
951 
962  volatile bool was_closed;
963 
985  bool clean_ready;
986 };
987 #endif /* UPGRADE_SUPPORT */
988 
989 
998 {
1002  MHD_RequestCallback rc;
1003 
1007  void *rc_cls;
1008 
1012  MHD_LoggingCallback logger;
1013 
1017  void *logger_cls;
1018 
1024 
1029 
1033  MHD_EarlyUriLogCallback early_uri_logger_cb;
1034 
1039 
1045 
1050 
1055  MHD_UnescapeCallback unescape_cb;
1056 
1061 
1066 
1071 
1072 
1073 #if HTTPS_SUPPORT
1074 #ifdef UPGRADE_SUPPORT
1075 
1080  struct MHD_UpgradeResponseHandle *urh_head;
1081 
1087  struct MHD_UpgradeResponseHandle *urh_tail;
1088 #endif /* UPGRADE_SUPPORT */
1089 
1095  void *tls_backend_lib;
1096 
1100  struct MHD_TLS_Plugin *tls_api;
1101 #endif
1102 #if ENABLE_DAUTH
1103 
1108  const void *digest_auth_random_buf;
1109 #endif
1110 
1126 
1133 
1141 
1148 
1153 
1158 
1164 
1170 
1175 
1180 
1185 
1186 #ifdef EPOLL_SUPPORT
1187 
1190  struct MHD_Connection *eready_head;
1191 
1195  struct MHD_Connection *eready_tail;
1196 
1200  const char *epoll_itc_marker;
1201 #ifdef UPGRADE_SUPPORT
1202 
1205  struct MHD_UpgradeResponseHandle *eready_urh_head;
1206 
1210  struct MHD_UpgradeResponseHandle *eready_urh_tail;
1211 #endif /* UPGRADE_SUPPORT */
1212 #endif /* EPOLL_SUPPORT */
1213 
1214 #ifdef DAUTH_SUPPORT
1215 
1219  const char *digest_auth_random;
1220 
1224  struct MHD_NonceNc *nnc;
1225 
1229  MHD_mutex_ nnc_lock;
1230 
1234  size_t digest_auth_rand_size;
1235 
1239  unsigned int nonce_nc_size;
1240 
1241 #endif
1242 
1246  MHD_thread_handle_ID_ pid;
1247 
1251  struct sockaddr_storage listen_sa;
1252 
1257 
1263 
1269 
1273 #define POOL_SIZE_DEFAULT (32 * 1024)
1274 
1279 
1287 #define BUF_INC_SIZE_DEFAULT 1024
1288 
1294 
1300 
1301 #if ENABLE_DAUTH
1302 
1306  size_t digest_auth_random_buf_size;
1307 
1311 #define DIGEST_NC_LENGTH_DEFAULT 4
1312 
1317  size_t digest_nc_length;
1318 #endif
1319 
1323 #ifdef SOMAXCONN
1324 #define LISTEN_BACKLOG_DEFAULT SOMAXCONN
1325 #else /* !SOMAXCONN */
1326 #define LISTEN_BACKLOG_DEFAULT 511
1327 #endif
1328 
1334 
1338 #define FO_QUEUE_LENGTH_DEFAULT 50
1339 
1343  unsigned int fo_queue_length;
1344 
1349 
1353  unsigned int ip_connection_limit;
1354 
1358  unsigned int connections;
1359 
1363  unsigned int worker_pool_size;
1364 
1369 
1375 
1376 #ifdef EPOLL_SUPPORT
1377 
1380  int epoll_fd;
1381 
1386  bool listen_socket_in_epoll;
1387 
1388 #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
1389 
1393  int epoll_upgrade_fd;
1394 
1399  bool upgrade_fd_in_epoll;
1400 #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */
1401 
1402 #endif
1403 
1407  struct MHD_itc_ itc;
1408 
1414  enum MHD_ThreadingMode threading_mode;
1415 
1420  enum MHD_FastOpenMethod fast_open_method;
1421 
1426  enum MHD_AddressFamily listen_af;
1427 
1433  enum MHD_EventLoopSyscall event_loop_syscall;
1434 
1439  enum MHD_ProtocolStrictLevel protocol_strict_level;
1440 
1446  uint16_t listen_port;
1447 
1454 
1460 
1466 
1472 
1480  bool at_limit;
1481 
1488 
1498 
1503 
1507  bool resuming;
1508 
1514 
1519 
1523  volatile bool shutdown;
1524 
1525 };
1526 
1527 
1536 typedef enum MHD_StatusCode
1537 (*ActionCallback) (void *cls,
1538  struct MHD_Request *request);
1539 
1540 
1546 {
1547 
1552 
1556  void *action_cls;
1557 
1558 };
1559 
1560 
1565 {
1566 
1573 
1580 
1585  char *data;
1586 
1591  void *crc_cls;
1592 
1598 
1604 
1609  MHD_RequestTerminationCallback termination_cb;
1610 
1615 
1616 #ifdef UPGRADE_SUPPORT
1617 
1622  MHD_UpgradeHandler upgrade_handler;
1623 
1627  void *upgrade_handler_cls;
1628 #endif /* UPGRADE_SUPPORT */
1629 
1634  MHD_mutex_ mutex;
1635 
1639  uint64_t total_size;
1640 
1645  uint64_t data_start;
1646 
1650  uint64_t fd_off;
1651 
1656  size_t data_size;
1657 
1662 
1666  enum MHD_HTTP_StatusCode status_code;
1667 
1672  unsigned int reference_count;
1673 
1677  int fd;
1678 
1682  bool v10_only;
1683 
1687  bool icy;
1688 
1689 };
1690 
1691 
1692 
1704 typedef bool
1706  const char *key,
1707  const char *value,
1708  enum MHD_ValueKind kind);
1709 
1710 
1725 bool
1726 MHD_parse_arguments_ (struct MHD_Request *request,
1727  enum MHD_ValueKind kind,
1728  char *args,
1730  unsigned int *num_headers);
1731 
1732 
1733 
1742 #define DLL_insert(head,tail,element) do { \
1743  mhd_assert (NULL == (element)->next); \
1744  mhd_assert (NULL == (element)->prev); \
1745  (element)->next = (head); \
1746  (element)->prev = NULL; \
1747  if ((tail) == NULL) \
1748  (tail) = element; \
1749  else \
1750  (head)->prev = element; \
1751  (head) = (element); } while (0)
1752 
1753 
1762 #define DLL_remove(head,tail,element) do { \
1763  mhd_assert ( (NULL != (element)->next) || ((element) == (tail))); \
1764  mhd_assert ( (NULL != (element)->prev) || ((element) == (head))); \
1765  if ((element)->prev == NULL) \
1766  (head) = (element)->next; \
1767  else \
1768  (element)->prev->next = (element)->next; \
1769  if ((element)->next == NULL) \
1770  (tail) = (element)->prev; \
1771  else \
1772  (element)->next->prev = (element)->prev; \
1773  (element)->next = NULL; \
1774  (element)->prev = NULL; } while (0)
1775 
1776 
1777 
1786 #define XDLL_insert(head,tail,element) do { \
1787  mhd_assert (NULL == (element)->nextX); \
1788  mhd_assert (NULL == (element)->prevX); \
1789  (element)->nextX = (head); \
1790  (element)->prevX = NULL; \
1791  if (NULL == (tail)) \
1792  (tail) = element; \
1793  else \
1794  (head)->prevX = element; \
1795  (head) = (element); } while (0)
1796 
1797 
1806 #define XDLL_remove(head,tail,element) do { \
1807  mhd_assert ( (NULL != (element)->nextX) || ((element) == (tail))); \
1808  mhd_assert ( (NULL != (element)->prevX) || ((element) == (head))); \
1809  if (NULL == (element)->prevX) \
1810  (head) = (element)->nextX; \
1811  else \
1812  (element)->prevX->nextX = (element)->nextX; \
1813  if (NULL == (element)->nextX) \
1814  (tail) = (element)->prevX; \
1815  else \
1816  (element)->nextX->prevX = (element)->prevX; \
1817  (element)->nextX = NULL; \
1818  (element)->prevX = NULL; } while (0)
1819 
1820 
1829 #define EDLL_insert(head,tail,element) do { \
1830  (element)->nextE = (head); \
1831  (element)->prevE = NULL; \
1832  if ((tail) == NULL) \
1833  (tail) = element; \
1834  else \
1835  (head)->prevE = element; \
1836  (head) = (element); } while (0)
1837 
1838 
1847 #define EDLL_remove(head,tail,element) do { \
1848  if ((element)->prevE == NULL) \
1849  (head) = (element)->nextE; \
1850  else \
1851  (element)->prevE->nextE = (element)->nextE; \
1852  if ((element)->nextE == NULL) \
1853  (tail) = (element)->prevE; \
1854  else \
1855  (element)->nextE->prevE = (element)->prevE; \
1856  (element)->nextE = NULL; \
1857  (element)->prevE = NULL; } while (0)
1858 
1859 
1860 
1864 #define MHD_ERR_AGAIN_ (-3073)
1865 
1869 #define MHD_ERR_CONNRESET_ (-3074)
1870 
1875 #define MHD_ERR_NOTCONN_ (-3075)
1876 
1880 #define MHD_ERR_NOMEM_ (-3076)
1881 
1885 #define MHD_ERR_BADF_ (-3077)
1886 
1890 #define MHD_ERR_INVAL_ (-3078)
1891 
1892 
1893 
1894 
1895 #endif
bool thread_joined
Definition: internal.h:776
size_t continue_message_write_offset
Definition: internal.h:541
struct MHD_Request request
Definition: internal.h:714
enum MHD_EventLoopSyscall event_loop_syscall
Definition: internal.h:1433
uint64_t total_size
Definition: internal.h:1639
int listen_backlog
Definition: internal.h:1333
additional automatic macros for MHD_config.h
uint64_t fd_off
Definition: internal.h:1650
bool data_already_pending
Definition: internal.h:1497
size_t connection_memory_limit_b
Definition: internal.h:1278
unsigned int ip_connection_limit
Definition: internal.h:1353
socklen_t addr_len
Definition: internal.h:730
bool enable_shoutcast
Definition: internal.h:1518
MHD_EarlyUriLogCallback early_uri_logger_cb
Definition: internal.h:1033
void * logger_cls
Definition: internal.h:1017
bool in_cleanup
Definition: internal.h:568
struct sockaddr_storage addr
Definition: internal.h:725
struct MHD_Connection * cleanup_head
Definition: internal.h:1174
void * mhd_panic_cls
Definition: panic.c:36
ssize_t(* ReceiveCallback)(struct MHD_Connection *conn, void *write_to, size_t max_bytes)
Definition: internal.h:179
size_t header_size
Definition: internal.h:499
struct MHD_Connection * prevX
Definition: internal.h:667
MHD_thread_handle_ID_ pid
Definition: internal.h:1246
size_t read_buffer_offset
Definition: internal.h:477
unsigned int global_connection_limit
Definition: internal.h:1348
MHD_ContentReaderFreeCallback crfc
Definition: internal.h:1603
MHD_PanicCallback mhd_panic
Definition: panic.c:31
MHD_AcceptPolicyCallback accept_policy_cb
Definition: internal.h:1023
void * termination_cb_cls
Definition: internal.h:1614
void(* MHD_ContentReaderFreeCallback)(void *cls)
Definition: microhttpd.h:2257
size_t thread_stack_limit_b
Definition: internal.h:1299
uint64_t current_chunk_size
Definition: internal.h:513
enum MHD_ProtocolStrictLevel protocol_strict_level
Definition: internal.h:1439
char * data
Definition: internal.h:1585
MHD_RequestTerminationCallback termination_cb
Definition: internal.h:1609
char * read_buffer
Definition: internal.h:430
char * colon
Definition: internal.h:453
struct MHD_HTTP_Header * headers_received_tail
Definition: internal.h:390
struct MHD_Connection * manual_timeout_head
Definition: internal.h:1140
MHD_REQUEST_STATE
Definition: internal.h:213
size_t data_size
Definition: internal.h:1656
MHD_thread_handle_ID_ pid
Definition: internal.h:720
char * value
Definition: internal.h:349
enum MHD_ValueKind kind
Definition: internal.h:355
bool in_idle
Definition: internal.h:562
int MHD_socket
Definition: microhttpd.h:187
size_t write_buffer_size
Definition: internal.h:482
uint64_t current_chunk_offset
Definition: internal.h:519
platform-specific includes for libmicrohttpd
MHD_socket listen_socket
Definition: internal.h:1374
char * header
Definition: internal.h:344
struct MHD_Daemon * daemon
Definition: internal.h:672
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
Definition: microhttpd.h:2033
MHD_NotifyConnectionCallback notify_connection_cb
Definition: internal.h:1044
MHD_mutex_ per_ip_connection_mutex
Definition: internal.h:1256
time_t connection_default_timeout
Definition: internal.h:1368
enum MHD_REQUEST_STATE state
Definition: internal.h:546
enum MHD_ConnKeepAlive keepalive
Definition: internal.h:423
struct MHD_Daemon * daemon
Definition: internal.h:369
bool v10_only
Definition: internal.h:1682
struct MHD_Connection * next
Definition: internal.h:648
void * socket_context
Definition: internal.h:691
struct MHD_HTTP_Header * first_header
Definition: internal.h:1579
bool was_quiesced
Definition: internal.h:1502
size_t data_buffer_size
Definition: internal.h:1661
void * unescape_cb_cls
Definition: internal.h:1060
void * crc_cls
Definition: internal.h:1591
struct MHD_Connection * connections_tail
Definition: internal.h:1157
struct MHD_Daemon * worker_pool
Definition: internal.h:1070
char * write_buffer
Definition: internal.h:436
ActionCallback action
Definition: internal.h:1551
size_t read_buffer_size
Definition: internal.h:471
MHD_UnescapeCallback unescape_cb
Definition: internal.h:1055
enum MHD_FastOpenMethod fast_open_method
Definition: internal.h:1420
MHD_socket socket_fd
Definition: internal.h:749
bool MHD_parse_arguments_(struct MHD_Request *request, enum MHD_ValueKind kind, char *args, MHD_ArgumentIterator_ cb, unsigned int *num_headers)
Definition: internal.c:186
enum MHD_HTTP_StatusCode status_code
Definition: internal.h:1666
size_t connection_memory_increment_b
Definition: internal.h:1293
unsigned int worker_pool_size
Definition: internal.h:1363
struct MHD_Connection * connections_head
Definition: internal.h:1152
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
Definition: microhttpd.h:2241
bool enable_turbo
Definition: internal.h:1487
unsigned int reference_count
Definition: internal.h:1672
uint64_t remaining_upload_size
Definition: internal.h:505
time_t connection_timeout
Definition: internal.h:742
struct MHD_Action action
Definition: internal.h:1572
ssize_t(* TransmitCallback)(struct MHD_Connection *conn, const void *read_from, size_t max_bytes)
Definition: internal.h:193
enum MHD_RequestEventLoopInfo event_loop_info
Definition: internal.h:556
struct MHD_Daemon * master
Definition: internal.h:1065
struct MHD_Connection * manual_timeout_tail
Definition: internal.h:1147
unsigned int connections
Definition: internal.h:1358
MHD_RequestCallback rc
Definition: internal.h:1002
bool disallow_upgrade
Definition: internal.h:1471
struct MHD_Connection * prev
Definition: internal.h:653
MHD_ValueKind
Definition: microhttpd.h:1684
char * version_s
Definition: internal.h:416
bool disable_itc
Definition: internal.h:1459
MHD_EpollState
Definition: internal.h:584
void * accept_policy_cb_cls
Definition: internal.h:1028
ReceiveCallback recv_cls
Definition: internal.h:703
enum MHD_Method method
Definition: internal.h:551
uint64_t data_start
Definition: internal.h:1645
bool have_chunked_upload
Definition: internal.h:577
struct MHD_Connection * normal_timeout_head
Definition: internal.h:1125
struct MHD_Connection * nextX
Definition: internal.h:662
MHD_LoggingCallback logger
Definition: internal.h:1012
bool allow_address_reuse
Definition: internal.h:1513
struct MHD_Connection * suspended_connections_tail
Definition: internal.h:1169
bool tls_read_ready
Definition: internal.h:766
struct MHD_itc_ itc
Definition: internal.h:1407
time_t last_activity
Definition: internal.h:736
struct MHD_Connection * cleanup_tail
Definition: internal.h:1179
struct MHD_HTTP_Header * headers_received
Definition: internal.h:385
interface for TLS plugins of libmicrohttpd
char * method_s
Definition: internal.h:404
bool sk_nonblck
Definition: internal.h:781
size_t write_buffer_send_offset
Definition: internal.h:487
struct MHD_HTTP_Header * next
Definition: internal.h:339
MHD_ConnKeepAlive
Definition: internal.h:151
struct MHD_Connection * normal_timeout_tail
Definition: internal.h:1132
struct MHD_Response * response
Definition: internal.h:380
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:3203
void * early_uri_logger_cb_cls
Definition: internal.h:1038
bool resuming
Definition: internal.h:1507
bool read_closed
Definition: internal.h:789
enum MHD_StatusCode(* ActionCallback)(void *cls, struct MHD_Request *request)
Definition: internal.h:1537
void * action_cls
Definition: internal.h:1556
bool suppress_date
Definition: internal.h:1453
struct MemoryPool * pool
Definition: internal.h:682
TransmitCallback send_cls
Definition: internal.h:708
enum MHD_AddressFamily listen_af
Definition: internal.h:1426
bool(* MHD_ArgumentIterator_)(struct MHD_Request *request, const char *key, const char *value, enum MHD_ValueKind kind)
Definition: internal.h:1705
void * rc_cls
Definition: internal.h:1007
uint64_t response_write_position
Definition: internal.h:526
MHD_ContentReaderCallback crc
Definition: internal.h:1597
bool at_limit
Definition: internal.h:1480
size_t listen_sa_len
Definition: internal.h:1268
MHD_mutex_ mutex
Definition: internal.h:1634
size_t write_buffer_append_offset
Definition: internal.h:493
struct MHD_Connection * connection
Definition: internal.h:374
bool suspended
Definition: internal.h:761
const char * url
Definition: internal.h:410
bool disallow_suspend_resume
Definition: internal.h:1465
struct MHD_Connection * suspended_connections_head
Definition: internal.h:1163
void * per_ip_connection_count
Definition: internal.h:1184
void * notify_connection_cb_cls
Definition: internal.h:1049
enum MHD_ThreadingMode threading_mode
Definition: internal.h:1414
void * client_context
Definition: internal.h:398
volatile bool shutdown
Definition: internal.h:1523
char * last
Definition: internal.h:444
struct sockaddr_storage listen_sa
Definition: internal.h:1251
MHD_mutex_ cleanup_connection_mutex
Definition: internal.h:1262
int(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
Definition: microhttpd.h:2047
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
Definition: microhttpd.h:2141
unsigned int fo_queue_length
Definition: internal.h:1343
uint16_t listen_port
Definition: internal.h:1446