ROOT 6.16/01 Reference Guide |
#include "civetweb.h"
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <ctype.h>
#include <limits.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <arpa/inet.h>
#include <inttypes.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/utsname.h>
#include <sys/wait.h>
#include <dirent.h>
#include <grp.h>
#include <pwd.h>
#include <unistd.h>
#include <dlfcn.h>
#include <pthread.h>
#include "md5.inl"
#include "handle_form.inl"
Macros | |
#define | __STDC_FORMAT_MACROS /* <inttypes.h> wants this for C++ */ |
#define | __STDC_LIMIT_MACROS /* C++ wants that for INT64_MAX */ |
#define | _DARWIN_UNLIMITED_SELECT |
#define | _FILE_OFFSET_BITS 64 /* Use 64-bit file offsets by default */ |
#define | _GNU_SOURCE /* for setgroups(), pthread_setname_np() */ |
#define | _LARGEFILE_SOURCE /* For fseeko(), ftello() */ |
#define | ALTERNATIVE_QUEUE |
#define | ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) |
#define | ASN1_INTEGER_to_BN (*(BIGNUM * (*)(const ASN1_INTEGER *ai, BIGNUM *bn)) crypto_sw[21].ptr) |
#define | BN_bn2hex (*(char *(*)(const BIGNUM *a))crypto_sw[20].ptr) |
#define | BN_free (*(void (*)(const BIGNUM *a))crypto_sw[22].ptr) |
#define | calloc DO_NOT_USE_THIS_FUNCTION__USE_mg_calloc |
#define | CGI_ENVIRONMENT_SIZE (4096) /* in bytes */ |
#define | closesocket(a) (close(a)) |
#define | CONF_modules_unload (*(void (*)(int))crypto_sw[8].ptr) |
#define | CRYPTO_cleanup_all_ex_data (*(void (*)(void))crypto_sw[9].ptr) |
#define | CRYPTO_free (*(void (*)(void *addr))crypto_sw[23].ptr) |
#define | CRYPTO_LIB "libcrypto.so" |
#define | CRYPTO_num_locks (*(int (*)(void))crypto_sw[0].ptr) |
#define | CRYPTO_set_id_callback (*(void (*)(unsigned long (*)(void)))crypto_sw[2].ptr) |
#define | CRYPTO_set_locking_callback (*(void (*)(void (*)(int, int, const char *, int)))crypto_sw[1].ptr) |
#define | DEBUG_ASSERT(cond) |
#define | DEBUG_TRACE(fmt, ...) |
#define | ENGINE_cleanup (*(void (*)(void))crypto_sw[7].ptr) |
#define | ERR_error_string (*(char *(*)(unsigned long, char *))crypto_sw[4].ptr) |
#define | ERR_free_strings (*(void (*)(void))crypto_sw[6].ptr) |
#define | ERR_get_error (*(unsigned long (*)(void))crypto_sw[3].ptr) |
#define | ERR_remove_state (*(void (*)(unsigned long))crypto_sw[5].ptr) |
#define | ERRNO (errno) |
#define | EVP_cleanup (*(void (*)(void))crypto_sw[10].ptr) |
#define | EVP_Digest |
#define | EVP_get_digestbyname (*(const EVP_MD *(*)(const char *))crypto_sw[17].ptr) |
#define | free DO_NOT_USE_THIS_FUNCTION__USE_mg_free |
#define | FUNCTION_MAY_BE_UNUSED |
#define | HEXTOI(x) (isdigit(x) ? (x - '0') : (x - 'W')) |
#define | i2c_ASN1_INTEGER (*(int (*)(ASN1_INTEGER *, unsigned char **))crypto_sw[16].ptr) |
#define | i2d_X509 (*(int (*)(X509 *, unsigned char **))crypto_sw[19].ptr) |
#define | IGNORE_UNUSED_RESULT(a) ((void)((a) && 1)) |
#define | INITIAL_DEPTH 9 |
#define | INT64_FMT PRId64 |
#define | INT64_MAX (9223372036854775807) |
#define | INVALID_SOCKET (-1) |
#define | IP_ADDR_STR_LEN (50) /* IPv6 hex string is 46 chars */ |
#define | is_websocket_protocol(conn) (0) |
#define | malloc DO_NOT_USE_THIS_FUNCTION__USE_mg_malloc |
#define | MAX_CGI_ENVIR_VARS (256) /* in variables (count) */ |
#define | MAX_WORKER_THREADS (1024 * 64) /* in threads (count) */ |
#define | MD5_STATIC static |
#define | MG_BUF_LEN (1024 * 8) |
#define | mg_calloc_ctx(a, b, c) mg_calloc(a, b) |
#define | mg_closedir(x) (closedir(x)) |
#define | mg_cry DO_NOT_USE_THIS_FUNCTION__USE_mg_cry_internal |
#define | mg_cry_internal(conn, fmt, ...) mg_cry_internal_wrap(conn, __func__, __LINE__, fmt, __VA_ARGS__) |
#define | MG_FILE_COMPRESSION_SIZE_LIMIT (1024) /* in bytes */ |
#define | MG_FOPEN_MODE_APPEND (4) |
#define | MG_FOPEN_MODE_NONE (0) |
#define | MG_FOPEN_MODE_READ (1) |
#define | MG_FOPEN_MODE_WRITE (2) |
#define | mg_free_ctx(a, c) mg_free(a) |
#define | mg_get_option DO_NOT_USE_THIS_FUNCTION_INTERNALLY__access_directly |
#define | mg_malloc_ctx(a, c) mg_malloc(a) |
#define | mg_mkdir(conn, path, mode) (mkdir(path, mode)) |
#define | mg_opendir(conn, x) (opendir(x)) |
#define | mg_readdir(x) (readdir(x)) |
#define | mg_realloc_ctx(a, b, c) mg_realloc(a, b) |
#define | mg_remove(conn, x) (remove(x)) |
#define | mg_sleep(x) (usleep((x)*1000)) |
#define | mg_static_assert(cond, txt) extern char static_assert_replacement[(cond) ? 1 : -1] |
#define | MGSQLEN (20) /* count */ |
#define | MSG_NOSIGNAL (0) |
#define | O_BINARY (0) |
#define | OPENSSL_free(a) CRYPTO_free(a) |
#define | OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L |
#define | OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L |
#define | OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x00100000L |
#define | OPENSSL_REMOVE_THREAD_STATE() ERR_remove_state(0) |
#define | PASSWORDS_FILE_NAME ".htpasswd" |
#define | realloc DO_NOT_USE_THIS_FUNCTION__USE_mg_realloc |
#define | SHUTDOWN_BOTH (2) |
#define | SHUTDOWN_RD (0) |
#define | SHUTDOWN_WR (1) |
#define | snprintf DO_NOT_USE_THIS_FUNCTION__USE_mg_snprintf |
#define | SOCKET_TIMEOUT_QUANTUM (2000) /* in ms */ |
#define | SOMAXCONN (100) /* in pending connections (count) */ |
#define | SSL_accept (*(int (*)(SSL *))ssl_sw[1].ptr) |
#define | SSL_CB_HANDSHAKE_DONE (0x20) |
#define | SSL_CB_HANDSHAKE_START (0x10) |
#define | SSL_CIPHER_get_name (*(const char *(*)(const SSL_CIPHER *))ssl_sw[27].ptr) |
#define | SSL_connect (*(int (*)(SSL *))ssl_sw[2].ptr) |
#define | SSL_ctrl (*(long (*)(SSL *, int, long, void *))ssl_sw[38].ptr) |
#define | SSL_CTRL_CLEAR_OPTIONS (77) |
#define | SSL_CTRL_OPTIONS (32) |
#define | SSL_CTRL_SET_ECDH_AUTO (94) |
#define | SSL_CTRL_SET_TLSEXT_HOSTNAME 55 |
#define | SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54 |
#define | SSL_CTRL_SET_TLSEXT_SERVERNAME_CB 53 |
#define | SSL_CTX_callback_ctrl (*(long (*)(SSL_CTX *, int, void (*)(void)))ssl_sw[35].ptr) |
#define | SSL_CTX_check_private_key (*(int (*)(SSL_CTX *))ssl_sw[28].ptr) |
#define | SSL_CTX_clear_options(ctx, op) SSL_CTX_ctrl((ctx), SSL_CTRL_CLEAR_OPTIONS, (op), NULL) |
#define | SSL_CTX_ctrl (*(long (*)(SSL_CTX *, int, long, void *))ssl_sw[30].ptr) |
#define | SSL_CTX_free (*(void (*)(SSL_CTX *))ssl_sw[14].ptr) |
#define | SSL_CTX_load_verify_locations (*(int (*)(SSL_CTX *, const char *, const char *))ssl_sw[21].ptr) |
#define | SSL_CTX_new (*(SSL_CTX * (*)(SSL_METHOD *)) ssl_sw[8].ptr) |
#define | SSL_CTX_set_cipher_list (*(int (*)(SSL_CTX *, const char *))ssl_sw[31].ptr) |
#define | SSL_CTX_set_default_passwd_cb (*(void (*)(SSL_CTX *, mg_callback_t))ssl_sw[13].ptr) |
#define | SSL_CTX_set_default_verify_paths (*(int (*)(SSL_CTX *))ssl_sw[22].ptr) |
#define | SSL_CTX_set_ecdh_auto(ctx, onoff) SSL_CTX_ctrl(ctx, SSL_CTRL_SET_ECDH_AUTO, onoff, NULL) |
#define | SSL_CTX_set_info_callback |
#define | SSL_CTX_set_options(ctx, op) SSL_CTX_ctrl((ctx), SSL_CTRL_OPTIONS, (op), NULL) |
#define | SSL_CTX_set_session_id_context (*(int (*)(SSL_CTX *, const unsigned char *, unsigned int))ssl_sw[29].ptr) |
#define | SSL_CTX_set_tlsext_servername_arg(ctx, arg) SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG, 0, (void *)arg) |
#define | SSL_CTX_set_tlsext_servername_callback(ctx, cb) |
#define | SSL_CTX_set_verify |
#define | SSL_CTX_set_verify_depth (*(void (*)(SSL_CTX *, int))ssl_sw[23].ptr) |
#define | SSL_CTX_use_certificate_chain_file (*(int (*)(SSL_CTX *, const char *))ssl_sw[16].ptr) |
#define | SSL_CTX_use_certificate_file (*(int (*)(SSL_CTX *, const char *, int))ssl_sw[12].ptr) |
#define | SSL_CTX_use_PrivateKey_file (*(int (*)(SSL_CTX *, const char *, int))ssl_sw[11].ptr) |
#define | SSL_ERROR_NONE (0) |
#define | SSL_ERROR_SSL (1) |
#define | SSL_ERROR_SYSCALL (5) /* see errno */ |
#define | SSL_ERROR_WANT_ACCEPT (8) |
#define | SSL_ERROR_WANT_CONNECT (7) |
#define | SSL_ERROR_WANT_READ (2) |
#define | SSL_ERROR_WANT_WRITE (3) |
#define | SSL_ERROR_WANT_X509_LOOKUP (4) |
#define | SSL_ERROR_ZERO_RETURN (6) |
#define | SSL_free (*(void (*)(SSL *))ssl_sw[0].ptr) |
#define | SSL_get_app_data(s) (SSL_get_ex_data(s, 0)) |
#define | SSL_get_current_cipher (*(SSL_CIPHER * (*)(SSL *)) ssl_sw[26].ptr) |
#define | SSL_get_error (*(int (*)(SSL *, int))ssl_sw[5].ptr) |
#define | SSL_get_ex_data (*(char *(*)(const SSL *, int))ssl_sw[33].ptr) |
#define | SSL_get_peer_certificate (*(X509 * (*)(SSL *)) ssl_sw[24].ptr) |
#define | SSL_get_servername (*(const char *(*)(const SSL *, int type))ssl_sw[36].ptr) |
#define | SSL_get_version (*(const char *(*)(SSL *))ssl_sw[25].ptr) |
#define | SSL_LIB "libssl.so" |
#define | SSL_library_init (*(int (*)(void))ssl_sw[10].ptr) |
#define | SSL_load_error_strings (*(void (*)(void))ssl_sw[15].ptr) |
#define | SSL_new (*(SSL * (*)(SSL_CTX *)) ssl_sw[7].ptr) |
#define | SSL_OP_ALL ((long)(0x80000BFFUL)) |
#define | SSL_OP_CIPHER_SERVER_PREFERENCE (0x00400000L) |
#define | SSL_OP_NO_COMPRESSION (0x00020000L) |
#define | SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION (0x00010000L) |
#define | SSL_OP_NO_SSLv2 (0x01000000L) |
#define | SSL_OP_NO_SSLv3 (0x02000000L) |
#define | SSL_OP_NO_TLSv1 (0x04000000L) |
#define | SSL_OP_NO_TLSv1_1 (0x10000000L) |
#define | SSL_OP_NO_TLSv1_2 (0x08000000L) |
#define | SSL_OP_SINGLE_DH_USE (0x00100000L) |
#define | SSL_pending (*(int (*)(SSL *))ssl_sw[18].ptr) |
#define | SSL_read (*(int (*)(SSL *, void *, int))ssl_sw[3].ptr) |
#define | SSL_set_app_data(s, arg) (SSL_set_ex_data(s, 0, (char *)arg)) |
#define | SSL_set_ex_data (*(void (*)(SSL *, int, char *))ssl_sw[34].ptr) |
#define | SSL_set_fd (*(int (*)(SSL *, SOCKET))ssl_sw[6].ptr) |
#define | SSL_set_SSL_CTX (*(SSL_CTX * (*)(SSL *, SSL_CTX *)) ssl_sw[37].ptr) |
#define | SSL_set_tlsext_host_name(ctx, arg) SSL_ctrl(ctx, SSL_CTRL_SET_TLSEXT_HOSTNAME, 0, (void *)arg) |
#define | SSL_shutdown (*(int (*)(SSL *))ssl_sw[20].ptr) |
#define | SSL_TLSEXT_ERR_ALERT_FATAL (2) |
#define | SSL_TLSEXT_ERR_ALERT_WARNING (1) |
#define | SSL_TLSEXT_ERR_NOACK (3) |
#define | SSL_TLSEXT_ERR_OK (0) |
#define | SSL_VERIFY_CLIENT_ONCE (4) |
#define | SSL_VERIFY_FAIL_IF_NO_PEER_CERT (2) |
#define | SSL_VERIFY_NONE (0) |
#define | SSL_VERIFY_PEER (1) |
#define | SSL_write (*(int (*)(SSL *, const void *, int))ssl_sw[4].ptr) |
#define | SSLv23_client_method (*(SSL_METHOD * (*)(void)) ssl_sw[17].ptr) |
#define | SSLv23_server_method (*(SSL_METHOD * (*)(void)) ssl_sw[9].ptr) |
#define | strcat0(a, b) |
#define | STRUCT_FILE_INITIALIZER |
#define | TLSEXT_NAMETYPE_host_name (0) |
#define | TLSEXT_TYPE_server_name (0) |
#define | UINT64_FMT PRIu64 |
#define | va_copy(x, y) ((x) = (y)) |
#define | vsnprintf_impl vsnprintf |
#define | WIN32_LEAN_AND_MEAN |
#define | WINCDECL |
#define | X509_free (*(void (*)(X509 *))crypto_sw[11].ptr) |
#define | X509_get_issuer_name (*(X509_NAME * (*)(X509 *)) crypto_sw[13].ptr) |
#define | X509_get_notAfter(x) ((x)->cert_info->validity->notAfter) |
#define | X509_get_notBefore(x) ((x)->cert_info->validity->notBefore) |
#define | X509_get_serialNumber (*(ASN1_INTEGER * (*)(X509 *)) crypto_sw[15].ptr) |
#define | X509_get_subject_name (*(X509_NAME * (*)(X509 *)) crypto_sw[12].ptr) |
#define | X509_NAME_oneline (*(char *(*)(X509_NAME *, char *, int))crypto_sw[14].ptr) |
Typedefs | |
typedef struct asn1_integer | ASN1_INTEGER |
typedef struct bignum | BIGNUM |
typedef struct evp_md | EVP_MD |
typedef struct ossl_init_settings_st | OPENSSL_INIT_SETTINGS |
typedef const void * | SOCK_OPT_TYPE |
typedef int | SOCKET |
typedef struct ssl_st | SSL |
typedef struct ssl_ctx_st | SSL_CTX |
typedef struct ssl_method_st | SSL_METHOD |
typedef struct x509 | X509 |
typedef struct x509_name | X509_NAME |
typedef struct x509_store_ctx_st | X509_STORE_CTX |
Functions | |
static int | abort_process (void *data) |
static void | accept_new_connection (const struct socket *listener, struct mg_context *ctx) |
static void static void | addenv (struct cgi_environment *env, const char *fmt,...) |
static void | addenv (struct cgi_environment *env, PRINTF_FORMAT_STRING(const char *fmt),...) PRINTF_ARGS(2 |
static const char * | alloc_get_host (struct mg_connection *conn) |
static int | alloc_vprintf (char **out_buf, char *prealloc_buf, size_t prealloc_size, const char *fmt, va_list ap) |
static int | alloc_vprintf2 (char **buf, const char *fmt, va_list ap) |
static int | authorize (struct mg_connection *conn, struct mg_file *filep, const char *realm) |
static void | bin2str (char *to, const unsigned char *p, size_t len) |
static int | check_acl (struct mg_context *phys_ctx, uint32_t remote_ip) |
static int | check_authorization (struct mg_connection *conn, const char *path) |
static int | check_password (const char *method, const char *ha1, const char *uri, const char *nonce, const char *nc, const char *cnonce, const char *qop, const char *response) |
static void | close_all_listening_sockets (struct mg_context *ctx) |
static void | close_connection (struct mg_connection *conn) |
static void | close_socket_gracefully (struct mg_connection *conn) |
static int WINCDECL | compare_dir_entries (const void *p1, const void *p2) |
static int | connect_socket (struct mg_context *ctx, const char *host, int port, int use_ssl, char *ebuf, size_t ebuf_len, SOCKET *sock, union usa *sa) |
static void | construct_etag (char *buf, size_t buf_len, const struct mg_file_stat *filestat) |
static int | consume_socket (struct mg_context *ctx, struct socket *sp, int thread_index) |
static void | delete_file (struct mg_connection *conn, const char *path) |
static int | dir_scan_callback (struct de *de, void *data) |
static void | discard_unread_request_data (struct mg_connection *conn) |
static void | do_ssi_exec (struct mg_connection *conn, char *tag) |
static void | do_ssi_include (struct mg_connection *conn, const char *ssi, char *tag, int include_level) |
static void * | event_create (void) |
static void | event_destroy (void *eventhdl) |
static int | event_signal (void *eventhdl) |
static int | event_wait (void *eventhdl) |
static int | extention_matches_script (struct mg_connection *conn, const char *filename) |
static struct mg_connection * | fc (struct mg_context *ctx) |
static void | fclose_on_exec (struct mg_file_access *filep, struct mg_connection *conn) |
static int | forward_body_data (struct mg_connection *conn, FILE *fp, SOCKET sock, SSL *ssl) |
static void | free_context (struct mg_context *ctx) |
static int | get_first_ssl_listener_index (const struct mg_context *ctx) |
static const char * | get_header (const struct mg_header *hdr, int num_hdr, const char *name) |
static int | get_http_header_len (const char *buf, int buflen) |
static const struct mg_http_method_info * | get_http_method_info (const char *method) |
static const char * | get_http_version (const struct mg_connection *conn) |
static int | get_message (struct mg_connection *conn, char *ebuf, size_t ebuf_len, int *err) |
static void | get_mime_type (struct mg_connection *conn, const char *path, struct vec *vec) |
static int | get_month_index (const char *s) |
static int | get_option_index (const char *name) |
static const char * | get_proto_name (const struct mg_connection *conn) |
static uint64_t | get_random (void) |
static const char * | get_rel_url_at_current_server (const char *uri, const struct mg_connection *conn) |
static uint32_t | get_remote_ip (const struct mg_connection *conn) |
static int | get_request (struct mg_connection *conn, char *ebuf, size_t ebuf_len, int *err) |
static int | get_request_handler (struct mg_connection *conn, int handler_type, mg_request_handler *handler, struct mg_websocket_subprotocols **subprotocols, mg_websocket_connect_handler *connect_handler, mg_websocket_ready_handler *ready_handler, mg_websocket_data_handler *data_handler, mg_websocket_close_handler *close_handler, mg_authorization_handler *auth_handler, void **cbdata, struct mg_handler_info **handler_info) |
static int | get_response (struct mg_connection *conn, char *ebuf, size_t ebuf_len, int *err) |
static void | get_system_name (char **sysName) |
static int | get_uri_type (const char *uri) |
static void | gmt_time_string (char *buf, size_t buf_len, time_t *t) |
static void | handle_cgi_request (struct mg_connection *conn, const char *prog) |
static void | handle_directory_request (struct mg_connection *conn, const char *dir) |
static void | handle_file_based_request (struct mg_connection *conn, const char *path, struct mg_file *filep) |
static void | handle_not_modified_static_file_request (struct mg_connection *conn, struct mg_file *filep) |
static void | handle_propfind (struct mg_connection *conn, const char *path, struct mg_file_stat *filep) |
static void | handle_request (struct mg_connection *conn) |
static void | handle_ssi_file_request (struct mg_connection *conn, const char *path, struct mg_file *filep) |
static void | handle_static_file_request (struct mg_connection *conn, const char *path, struct mg_file *filep, const char *mime_type, const char *additional_headers) |
static void | handler_info_acquire (struct mg_handler_info *handler_info) |
static void | handler_info_release (struct mg_handler_info *handler_info) |
static void | handler_info_wait_unused (struct mg_handler_info *handler_info) |
static int | header_has_option (const char *header, const char *option) |
static const char * | header_val (const struct mg_connection *conn, const char *header) |
static int | hexdump2string (void *mem, int memlen, char *buf, int buflen) |
static void | init_connection (struct mg_connection *conn) |
static int | init_ssl_ctx (struct mg_context *phys_ctx, struct mg_domain_context *dom_ctx) |
static int | init_ssl_ctx_impl (struct mg_context *phys_ctx, struct mg_domain_context *dom_ctx, const char *pem, const char *chain) |
static int | initialize_ssl (char *ebuf, size_t ebuf_len) |
static void | interpret_uri (struct mg_connection *conn, char *filename, size_t filename_buf_len, struct mg_file_stat *filestat, int *is_found, int *is_script_resource, int *is_websocket_request, int *is_put_or_delete_request) |
static int | is_authorized_for_put (struct mg_connection *conn) |
static int | is_file_in_memory (const struct mg_connection *conn, const char *path) |
static int | is_file_opened (const struct mg_file_access *fileacc) |
static int | is_in_script_path (const struct mg_connection *conn, const char *path) |
static int | is_not_modified (const struct mg_connection *conn, const struct mg_file_stat *filestat) |
static int | is_put_or_delete_method (const struct mg_connection *conn) |
static int | is_ssl_port_used (const char *ports) |
static int | is_valid_http_method (const char *method) |
static int | is_valid_port (unsigned long port) |
static int | isbyte (int n) |
static void * | load_dll (char *ebuf, size_t ebuf_len, const char *dll_name, struct ssl_func *sw) |
static void | log_access (const struct mg_connection *conn) |
static int | lowercase (const char *s) |
static void * | master_thread (void *thread_func_param) |
static void | master_thread_run (void *thread_func_param) |
static ptrdiff_t | match_prefix (const char *pattern, size_t pattern_len, const char *str) |
static FUNCTION_MAY_BE_UNUSED int | mg_atomic_dec (volatile int *addr) |
static FUNCTION_MAY_BE_UNUSED int | mg_atomic_inc (volatile int *addr) |
static __inline void * | mg_calloc (size_t a, size_t b) |
int | mg_check_digest_access_authentication (struct mg_connection *conn, const char *realm, const char *filename) |
unsigned | mg_check_feature (unsigned feature) |
void | mg_close_connection (struct mg_connection *conn) |
struct mg_connection * | mg_connect_client (const char *host, int port, int use_ssl, char *error_buffer, size_t error_buffer_size) |
static struct mg_connection * | mg_connect_client_impl (const struct mg_client_options *client_options, int use_ssl, char *ebuf, size_t ebuf_len) |
CIVETWEB_API struct mg_connection * | mg_connect_client_secure (const struct mg_client_options *client_options, char *error_buffer, size_t error_buffer_size) |
struct mg_connection * | mg_connect_websocket_client (const char *host, int port, int use_ssl, char *error_buffer, size_t error_buffer_size, const char *path, const char *origin, mg_websocket_data_handler data_func, mg_websocket_close_handler close_func, void *user_data) |
void | mg_cry (const struct mg_connection *conn, const char *fmt,...) |
static void | mg_cry_internal_impl (const struct mg_connection *conn, const char *func, unsigned line, const char *fmt, va_list ap) |
static void | mg_cry_internal_wrap (const struct mg_connection *conn, const char *func, unsigned line, const char *fmt,...) PRINTF_ARGS(4 |
static FUNCTION_MAY_BE_UNUSED unsigned long | mg_current_thread_id (void) |
static double | mg_difftimespec (const struct timespec *ts_now, const struct timespec *ts_before) |
struct mg_connection * | mg_download (const char *host, int port, int use_ssl, char *ebuf, size_t ebuf_len, const char *fmt,...) |
unsigned | mg_exit_library (void) |
static int | mg_fclose (struct mg_file_access *fileacc) |
static int | mg_fgetc (struct mg_file *filep, int offset) |
static const char * | mg_fgets (char *buf, size_t size, struct mg_file *filep, char **p) |
static int | mg_fopen (const struct mg_connection *conn, const char *path, int mode, struct mg_file *filep) |
static __inline void | mg_free (void *a) |
const char * | mg_get_builtin_mime_type (const char *path) |
struct mg_context * | mg_get_context (const struct mg_connection *conn) |
int | mg_get_context_info (const struct mg_context *ctx, char *buffer, int buflen) |
int | mg_get_cookie (const char *cookie_header, const char *var_name, char *dst, size_t dst_size) |
static FUNCTION_MAY_BE_UNUSED uint64_t | mg_get_current_time_ns (void) |
const char * | mg_get_header (const struct mg_connection *conn, const char *name) |
const char * | mg_get_option (const struct mg_context *ctx, const char *name) |
const struct mg_request_info * | mg_get_request_info (const struct mg_connection *conn) |
int | mg_get_request_link (const struct mg_connection *conn, char *buf, size_t buflen) |
int | mg_get_response (struct mg_connection *conn, char *ebuf, size_t ebuf_len, int timeout) |
const char * | mg_get_response_code_text (const struct mg_connection *conn, int response_code) |
const struct mg_response_info * | mg_get_response_info (const struct mg_connection *conn) |
int | mg_get_server_ports (const struct mg_context *ctx, int size, struct mg_server_ports *ports) |
int | mg_get_system_info (char *buffer, int buflen) |
static int | mg_get_system_info_impl (char *buffer, int buflen) |
void * | mg_get_user_connection_data (const struct mg_connection *conn) |
void * | mg_get_user_data (const struct mg_context *ctx) |
const struct mg_option * | mg_get_valid_options (void) |
int | mg_get_var (const char *data, size_t data_len, const char *name, char *dst, size_t dst_len) |
int | mg_get_var2 (const char *data, size_t data_len, const char *name, char *dst, size_t dst_len, size_t occurrence) |
static char | mg_getc (struct mg_connection *conn) |
static FUNCTION_MAY_BE_UNUSED void | mg_global_lock (void) |
static FUNCTION_MAY_BE_UNUSED void | mg_global_unlock (void) |
static int | mg_inet_pton (int af, const char *src, void *dst, size_t dstlen) |
unsigned | mg_init_library (unsigned features) |
static int | mg_join_thread (pthread_t threadid) |
void | mg_lock_connection (struct mg_connection *conn) |
void | mg_lock_context (struct mg_context *ctx) |
static __inline void * | mg_malloc (size_t a) |
char * | mg_md5 (char buf[33],...) |
int | mg_modify_passwords_file (const char *fname, const char *domain, const char *user, const char *pass) |
static int | mg_poll (struct pollfd *pfd, unsigned int n, int milliseconds, volatile int *stop_server) |
int | mg_printf (struct mg_connection *conn, const char *fmt,...) |
int | mg_read (struct mg_connection *conn, void *buf, size_t len) |
static int | mg_read_inner (struct mg_connection *conn, void *buf, size_t len) |
static __inline void * | mg_realloc (void *a, size_t b) |
int | mg_send_chunk (struct mg_connection *conn, const char *chunk, unsigned int chunk_len) |
int | mg_send_digest_access_authentication_request (struct mg_connection *conn, const char *realm) |
void | mg_send_file (struct mg_connection *conn, const char *path) |
int | mg_send_file_body (struct mg_connection *conn, const char *path) |
int | mg_send_http_error (struct mg_connection *conn, int status, const char *fmt,...) |
static int | mg_send_http_error_impl (struct mg_connection *conn, int status, const char *fmt, va_list args) |
int | mg_send_http_ok (struct mg_connection *conn, const char *mime_type, long long content_length) |
int | mg_send_http_redirect (struct mg_connection *conn, const char *target_url, int redirect_code) |
void | mg_send_mime_file (struct mg_connection *conn, const char *path, const char *mime_type) |
void | mg_send_mime_file2 (struct mg_connection *conn, const char *path, const char *mime_type, const char *additional_headers) |
void | mg_set_auth_handler (struct mg_context *ctx, const char *uri, mg_request_handler handler, void *cbdata) |
static void | mg_set_handler_type (struct mg_context *phys_ctx, struct mg_domain_context *dom_ctx, const char *uri, int handler_type, int is_delete_request, mg_request_handler handler, struct mg_websocket_subprotocols *subprotocols, mg_websocket_connect_handler connect_handler, mg_websocket_ready_handler ready_handler, mg_websocket_data_handler data_handler, mg_websocket_close_handler close_handler, mg_authorization_handler auth_handler, void *cbdata) |
void | mg_set_request_handler (struct mg_context *ctx, const char *uri, mg_request_handler handler, void *cbdata) |
static void | mg_set_thread_name (const char *name) |
void | mg_set_user_connection_data (struct mg_connection *conn, void *data) |
void | mg_set_websocket_handler (struct mg_context *ctx, const char *uri, mg_websocket_connect_handler connect_handler, mg_websocket_ready_handler ready_handler, mg_websocket_data_handler data_handler, mg_websocket_close_handler close_handler, void *cbdata) |
void | mg_set_websocket_handler_with_subprotocols (struct mg_context *ctx, const char *uri, struct mg_websocket_subprotocols *subprotocols, mg_websocket_connect_handler connect_handler, mg_websocket_ready_handler ready_handler, mg_websocket_data_handler data_handler, mg_websocket_close_handler close_handler, void *cbdata) |
static void | mg_snprintf (const struct mg_connection *conn, int *truncated, char *buf, size_t buflen, const char *fmt,...) |
static void | mg_snprintf (const struct mg_connection *conn, int *truncated, char *buf, size_t buflen, PRINTF_FORMAT_STRING(const char *fmt),...) PRINTF_ARGS(5 |
struct mg_context * | mg_start (const struct mg_callbacks *callbacks, void *user_data, const char **options) |
int | mg_start_thread (mg_thread_func_t func, void *param) |
static int | mg_start_thread_with_id (mg_thread_func_t func, void *param, pthread_t *threadidptr) |
static int | mg_stat (const struct mg_connection *conn, const char *path, struct mg_file_stat *filep) |
mg_static_assert ((sizeof(config_options)/sizeof(config_options[0]))==(NUM_OPTIONS+1), "config_options and enum not sync") | |
mg_static_assert (MAX_WORKER_THREADS >=1, "worker threads must be a positive number") | |
mg_static_assert (sizeof(int)==4||sizeof(int)==8, "int data type size check") | |
mg_static_assert (sizeof(size_t)==4||sizeof(size_t)==8, "size_t data type size check") | |
mg_static_assert (sizeof(void *) >=sizeof(int), "data type size check") | |
mg_static_assert (sizeof(void *)==4||sizeof(void *)==8, "pointer data type size check") | |
void | mg_stop (struct mg_context *ctx) |
long long | mg_store_body (struct mg_connection *conn, const char *path) |
int | mg_strcasecmp (const char *s1, const char *s2) |
static const char * | mg_strcasestr (const char *big_str, const char *small_str) |
static char * | mg_strdup (const char *str) |
static char * | mg_strdup_ctx (const char *str, struct mg_context *ctx) |
static void | mg_strlcpy (register char *dst, register const char *src, size_t n) |
int | mg_strncasecmp (const char *s1, const char *s2, size_t len) |
static char * | mg_strndup_ctx (const char *ptr, size_t len, struct mg_context *ctx) |
void | mg_unlock_connection (struct mg_connection *conn) |
void | mg_unlock_context (struct mg_context *ctx) |
int | mg_url_decode (const char *src, int src_len, char *dst, int dst_len, int is_form_url_encoded) |
int | mg_url_encode (const char *src, char *dst, size_t dst_len) |
const char * | mg_version (void) |
static int | mg_vprintf (struct mg_connection *conn, const char *fmt, va_list ap) |
static void | mg_vsnprintf (const struct mg_connection *conn, int *truncated, char *buf, size_t buflen, const char *fmt, va_list ap) |
int | mg_write (struct mg_connection *conn, const void *buf, size_t len) |
static void | mkcol (struct mg_connection *conn, const char *path) |
static int | must_hide_file (struct mg_connection *conn, const char *path) |
static const char * | next_option (const char *list, struct vec *val, struct vec *eq_val) |
static void | open_auth_file (struct mg_connection *conn, const char *path, struct mg_file *filep) |
static int | open_file_in_memory (const struct mg_connection *conn, const char *path, struct mg_file *filep, int mode) |
static int | parse_auth_header (struct mg_connection *conn, char *buf, size_t buf_size, struct ah *ah) |
static time_t | parse_date_string (const char *datetime) |
static int | parse_http_headers (char **buf, struct mg_header hdr[MG_MAX_HEADERS]) |
static int | parse_http_request (char *buf, int len, struct mg_request_info *ri) |
static int | parse_http_response (char *buf, int len, struct mg_response_info *ri) |
static int | parse_net (const char *spec, uint32_t *net, uint32_t *mask) |
static int | parse_port_string (const struct vec *vec, struct socket *so, int *ip_version) |
static int | parse_range_header (const char *header, int64_t *a, int64_t *b) |
static int | prepare_cgi_environment (struct mg_connection *conn, const char *prog, struct cgi_environment *env) |
static int | print_dav_dir_entry (struct de *de, void *data) |
static int | print_dir_entry (struct de *de) |
static void | print_props (struct mg_connection *conn, const char *uri, struct mg_file_stat *filep) |
static void | process_new_connection (struct mg_connection *conn) |
static void | produce_socket (struct mg_context *ctx, const struct socket *sp) |
static int | pull_all (FILE *fp, struct mg_connection *conn, char *buf, int len) |
static int | pull_inner (FILE *fp, struct mg_connection *conn, char *buf, int len, double timeout) |
static int64_t | push_all (struct mg_context *ctx, FILE *fp, SOCKET sock, SSL *ssl, const char *buf, int64_t len) |
static int | push_inner (struct mg_context *ctx, FILE *fp, SOCKET sock, SSL *ssl, const char *buf, int len, double timeout) |
static int | put_dir (struct mg_connection *conn, const char *path) |
static void | put_file (struct mg_connection *conn, const char *path) |
static int | read_auth_file (struct mg_file *filep, struct read_auth_file_struct *workdata, int depth) |
static int | read_message (FILE *fp, struct mg_connection *conn, char *buf, int bufsiz, int *nread) |
static void * | realloc2 (void *ptr, size_t size) |
static void | redirect_to_https_port (struct mg_connection *conn, int ssl_index) |
static int | refresh_trust (struct mg_connection *conn) |
static void | remove_bad_file (const struct mg_connection *conn, const char *path) |
static int | remove_directory (struct mg_connection *conn, const char *dir) |
static void | remove_double_dots_and_double_slashes (char *s) |
static void | reset_per_request_attributes (struct mg_connection *conn) |
static int | scan_directory (struct mg_connection *conn, const char *dir, void *data, int(*cb)(struct de *, void *)) |
static int | send_additional_header (struct mg_connection *conn) |
static void | send_authorization_request (struct mg_connection *conn, const char *realm) |
static void | send_file_data (struct mg_connection *conn, struct mg_file *filep, int64_t offset, int64_t len) |
static int | send_no_cache_header (struct mg_connection *conn) |
static void | send_options (struct mg_connection *conn) |
static void | send_ssi_file (struct mg_connection *, const char *, struct mg_file *, int) |
static int | send_static_cache_header (struct mg_connection *conn) |
static int | set_acl_option (struct mg_context *phys_ctx) |
static int | set_blocking_mode (SOCKET sock) |
static void | set_close_on_exec (SOCKET fd, struct mg_connection *conn) |
static int | set_gpass_option (struct mg_context *phys_ctx, struct mg_domain_context *dom_ctx) |
static int | set_non_blocking_mode (SOCKET sock) |
static int | set_ports_option (struct mg_context *phys_ctx) |
static int | set_tcp_nodelay (SOCKET sock, int nodelay_on) |
static int | set_throttle (const char *spec, uint32_t remote_ip, const char *uri) |
static int | set_uid_option (struct mg_context *phys_ctx) |
static int | should_decode_url (const struct mg_connection *conn) |
static int | should_keep_alive (const struct mg_connection *conn) |
static char * | skip_quoted (char **buf, const char *delimiters, const char *whitespace, char quotechar) |
static int | skip_to_end_of_word_and_terminate (char **ppw, int eol) |
static void | sockaddr_to_string (char *buf, size_t len, const union usa *usa) |
static pid_t | spawn_process (struct mg_connection *conn, const char *prog, char *envblk, char *envp[], int fdin[2], int fdout[2], int fderr[2], const char *dir) |
static const char * | ssl_error (void) |
static void | ssl_get_client_cert_info (struct mg_connection *conn) |
static long | ssl_get_protocol (int version_id) |
static void | ssl_info_callback (const SSL *ssl, int what, int ret) |
static void | ssl_locking_callback (int mode, int mutex_num, const char *file, int line) |
static int | ssl_servername_callback (SSL *ssl, int *ad, void *arg) |
static int | ssl_use_pem_file (struct mg_context *phys_ctx, struct mg_domain_context *dom_ctx, const char *pem, const char *chain) |
static int | sslize (struct mg_connection *conn, SSL_CTX *s, int(*func)(SSL *), volatile int *stop_server, const struct mg_client_options *client_options) |
static int | substitute_index_file (struct mg_connection *conn, char *path, size_t path_len, struct mg_file_stat *filestat) |
static const char * | suggest_connection_header (const struct mg_connection *conn) |
static void | tls_dtor (void *key) |
static void | uninitialize_ssl (void) |
static void * | worker_thread (void *thread_func_param) |
static void * | worker_thread_run (struct worker_thread_args *thread_args) |
Variables | |
struct { | |
unsigned default_port | |
const char * proto | |
size_t proto_len | |
} | abs_uri_protocols [] |
struct { | |
size_t ext_len | |
const char * extension | |
const char * mime_type | |
} | builtin_mime_types [] |
static struct mg_context | common_client_context |
static const struct mg_option | config_options [] |
static struct ssl_func | crypto_sw [] |
static void * | cryptolib_dll_handle |
static int | cryptolib_users = 0 |
static pthread_mutex_t | global_lock_mutex |
static struct mg_http_method_info | http_methods [] |
static int | mg_init_library_called = 0 |
static int | mg_ssl_initialized = 0 |
static const char * | month_names [] |
static pthread_mutexattr_t | pthread_mutex_attr |
static pthread_mutex_t * | ssl_mutexes |
static struct ssl_func | ssl_sw [] |
static void * | ssllib_dll_handle |
char | static_assert_replacement [1] |
static pthread_key_t | sTlsKey |
static int | thread_idx_max = 0 |
#define __STDC_FORMAT_MACROS /* <inttypes.h> wants this for C++ */ |
Definition at line 69 of file civetweb.c.
Definition at line 72 of file civetweb.c.
#define _DARWIN_UNLIMITED_SELECT |
Definition at line 75 of file civetweb.c.
#define _FILE_OFFSET_BITS 64 /* Use 64-bit file offsets by default */ |
Definition at line 66 of file civetweb.c.
#define _GNU_SOURCE /* for setgroups(), pthread_setname_np() */ |
Definition at line 57 of file civetweb.c.
#define _LARGEFILE_SOURCE /* For fseeko(), ftello() */ |
Definition at line 63 of file civetweb.c.
#define ALTERNATIVE_QUEUE |
Definition at line 137 of file civetweb.c.
#define ARRAY_SIZE | ( | array | ) | (sizeof(array) / sizeof(array[0])) |
Definition at line 435 of file civetweb.c.
#define ASN1_INTEGER_to_BN (*(BIGNUM * (*)(const ASN1_INTEGER *ai, BIGNUM *bn)) crypto_sw[21].ptr) |
Definition at line 2111 of file civetweb.c.
Definition at line 2110 of file civetweb.c.
Definition at line 2113 of file civetweb.c.
#define calloc DO_NOT_USE_THIS_FUNCTION__USE_mg_calloc |
Definition at line 1537 of file civetweb.c.
#define CGI_ENVIRONMENT_SIZE (4096) /* in bytes */ |
Definition at line 412 of file civetweb.c.
Definition at line 801 of file civetweb.c.
Definition at line 2091 of file civetweb.c.
Definition at line 2092 of file civetweb.c.
Definition at line 2114 of file civetweb.c.
#define CRYPTO_LIB "libcrypto.so" |
Definition at line 795 of file civetweb.c.
Definition at line 2081 of file civetweb.c.
Definition at line 2084 of file civetweb.c.
#define CRYPTO_set_locking_callback (*(void (*)(void (*)(int, int, const char *, int)))crypto_sw[1].ptr) |
Definition at line 2082 of file civetweb.c.
#define DEBUG_ASSERT | ( | cond | ) |
Definition at line 195 of file civetweb.c.
#define DEBUG_TRACE | ( | fmt, | |
... | |||
) |
Definition at line 178 of file civetweb.c.
Definition at line 2090 of file civetweb.c.
#define ERR_error_string (*(char *(*)(unsigned long, char *))crypto_sw[4].ptr) |
Definition at line 2087 of file civetweb.c.
Definition at line 2089 of file civetweb.c.
Definition at line 2086 of file civetweb.c.
Definition at line 2088 of file civetweb.c.
#define ERRNO (errno) |
Definition at line 808 of file civetweb.c.
Definition at line 2093 of file civetweb.c.
#define EVP_Digest |
Definition at line 2104 of file civetweb.c.
Definition at line 2102 of file civetweb.c.
#define free DO_NOT_USE_THIS_FUNCTION__USE_mg_free |
Definition at line 1539 of file civetweb.c.
#define FUNCTION_MAY_BE_UNUSED |
Definition at line 251 of file civetweb.c.
#define i2c_ASN1_INTEGER (*(int (*)(ASN1_INTEGER *, unsigned char **))crypto_sw[16].ptr) |
Definition at line 2100 of file civetweb.c.
Definition at line 2109 of file civetweb.c.
Definition at line 226 of file civetweb.c.
#define INITIAL_DEPTH 9 |
Definition at line 8272 of file civetweb.c.
#define INT64_FMT PRId64 |
Definition at line 810 of file civetweb.c.
#define INT64_MAX (9223372036854775807) |
Definition at line 439 of file civetweb.c.
#define INVALID_SOCKET (-1) |
Definition at line 809 of file civetweb.c.
#define IP_ADDR_STR_LEN (50) /* IPv6 hex string is 46 chars */ |
Definition at line 1714 of file civetweb.c.
#define is_websocket_protocol | ( | conn | ) | (0) |
Definition at line 2770 of file civetweb.c.
#define malloc DO_NOT_USE_THIS_FUNCTION__USE_mg_malloc |
Definition at line 1536 of file civetweb.c.
#define MAX_CGI_ENVIR_VARS (256) /* in variables (count) */ |
Definition at line 417 of file civetweb.c.
#define MAX_WORKER_THREADS (1024 * 64) /* in threads (count) */ |
Definition at line 389 of file civetweb.c.
#define MD5_STATIC static |
Definition at line 1706 of file civetweb.c.
#define MG_BUF_LEN (1024 * 8) |
Definition at line 422 of file civetweb.c.
Definition at line 806 of file civetweb.c.
#define mg_cry DO_NOT_USE_THIS_FUNCTION__USE_mg_cry_internal |
Definition at line 3722 of file civetweb.c.
#define mg_cry_internal | ( | conn, | |
fmt, | |||
... | |||
) | mg_cry_internal_wrap(conn, __func__, __LINE__, fmt, __VA_ARGS__) |
Definition at line 2774 of file civetweb.c.
#define MG_FILE_COMPRESSION_SIZE_LIMIT (1024) /* in bytes */ |
Definition at line 402 of file civetweb.c.
#define MG_FOPEN_MODE_APPEND (4) |
Definition at line 3045 of file civetweb.c.
#define MG_FOPEN_MODE_NONE (0) |
Definition at line 3036 of file civetweb.c.
#define MG_FOPEN_MODE_READ (1) |
Definition at line 3039 of file civetweb.c.
#define MG_FOPEN_MODE_WRITE (2) |
Definition at line 3042 of file civetweb.c.
#define mg_get_option DO_NOT_USE_THIS_FUNCTION_INTERNALLY__access_directly |
Definition at line 3433 of file civetweb.c.
#define mg_mkdir | ( | conn, | |
path, | |||
mode | |||
) | (mkdir(path, mode)) |
Definition at line 802 of file civetweb.c.
Definition at line 805 of file civetweb.c.
Definition at line 807 of file civetweb.c.
Definition at line 1496 of file civetweb.c.
Definition at line 803 of file civetweb.c.
Definition at line 804 of file civetweb.c.
#define mg_static_assert | ( | cond, | |
txt | |||
) | extern char static_assert_replacement[(cond) ? 1 : -1] |
Definition at line 120 of file civetweb.c.
#define MGSQLEN (20) /* count */ |
Definition at line 428 of file civetweb.c.
#define MSG_NOSIGNAL (0) |
Definition at line 1717 of file civetweb.c.
#define O_BINARY (0) |
Definition at line 799 of file civetweb.c.
#define OPENSSL_free | ( | a | ) | CRYPTO_free(a) |
Definition at line 2116 of file civetweb.c.
#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L |
Definition at line 1778 of file civetweb.c.
#define OPENSSL_INIT_LOAD_SSL_STRINGS 0x00200000L |
Definition at line 1777 of file civetweb.c.
#define OPENSSL_INIT_NO_LOAD_SSL_STRINGS 0x00100000L |
Definition at line 1776 of file civetweb.c.
#define OPENSSL_REMOVE_THREAD_STATE | ( | ) | ERR_remove_state(0) |
Definition at line 2121 of file civetweb.c.
#define PASSWORDS_FILE_NAME ".htpasswd" |
Definition at line 406 of file civetweb.c.
#define realloc DO_NOT_USE_THIS_FUNCTION__USE_mg_realloc |
Definition at line 1538 of file civetweb.c.
#define SHUTDOWN_BOTH (2) |
Definition at line 444 of file civetweb.c.
#define SHUTDOWN_RD (0) |
Definition at line 442 of file civetweb.c.
#define SHUTDOWN_WR (1) |
Definition at line 443 of file civetweb.c.
#define snprintf DO_NOT_USE_THIS_FUNCTION__USE_mg_snprintf |
Definition at line 1540 of file civetweb.c.
#define SOCKET_TIMEOUT_QUANTUM (2000) /* in ms */ |
Definition at line 397 of file civetweb.c.
#define SOMAXCONN (100) /* in pending connections (count) */ |
Definition at line 838 of file civetweb.c.
Definition at line 2001 of file civetweb.c.
#define SSL_CB_HANDSHAKE_DONE (0x20) |
Definition at line 1796 of file civetweb.c.
#define SSL_CB_HANDSHAKE_START (0x10) |
Definition at line 1795 of file civetweb.c.
#define SSL_CIPHER_get_name (*(const char *(*)(const SSL_CIPHER *))ssl_sw[27].ptr) |
Definition at line 2036 of file civetweb.c.
Definition at line 2002 of file civetweb.c.
Definition at line 2054 of file civetweb.c.
#define SSL_CTRL_CLEAR_OPTIONS (77) |
Definition at line 1773 of file civetweb.c.
#define SSL_CTRL_OPTIONS (32) |
Definition at line 1772 of file civetweb.c.
#define SSL_CTRL_SET_ECDH_AUTO (94) |
Definition at line 1774 of file civetweb.c.
#define SSL_CTRL_SET_TLSEXT_HOSTNAME 55 |
Definition at line 2065 of file civetweb.c.
#define SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG 54 |
Definition at line 2064 of file civetweb.c.
#define SSL_CTRL_SET_TLSEXT_SERVERNAME_CB 53 |
Definition at line 2063 of file civetweb.c.
Definition at line 2049 of file civetweb.c.
Definition at line 2038 of file civetweb.c.
#define SSL_CTX_clear_options | ( | ctx, | |
op | |||
) | SSL_CTX_ctrl((ctx), SSL_CTRL_CLEAR_OPTIONS, (op), NULL) |
Definition at line 2058 of file civetweb.c.
Definition at line 2041 of file civetweb.c.
Definition at line 2017 of file civetweb.c.
#define SSL_CTX_load_verify_locations (*(int (*)(SSL_CTX *, const char *, const char *))ssl_sw[21].ptr) |
Definition at line 2029 of file civetweb.c.
#define SSL_CTX_new (*(SSL_CTX * (*)(SSL_METHOD *)) ssl_sw[8].ptr) |
Definition at line 2008 of file civetweb.c.
Definition at line 2042 of file civetweb.c.
Definition at line 2015 of file civetweb.c.
Definition at line 2031 of file civetweb.c.
#define SSL_CTX_set_ecdh_auto | ( | ctx, | |
onoff | |||
) | SSL_CTX_ctrl(ctx, SSL_CTRL_SET_ECDH_AUTO, onoff, NULL) |
Definition at line 2060 of file civetweb.c.
#define SSL_CTX_set_info_callback |
Definition at line 2044 of file civetweb.c.
#define SSL_CTX_set_options | ( | ctx, | |
op | |||
) | SSL_CTX_ctrl((ctx), SSL_CTRL_OPTIONS, (op), NULL) |
Definition at line 2056 of file civetweb.c.
#define SSL_CTX_set_session_id_context (*(int (*)(SSL_CTX *, const unsigned char *, unsigned int))ssl_sw[29].ptr) |
Definition at line 2039 of file civetweb.c.
#define SSL_CTX_set_tlsext_servername_arg | ( | ctx, | |
arg | |||
) | SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG, 0, (void *)arg) |
Definition at line 2070 of file civetweb.c.
#define SSL_CTX_set_tlsext_servername_callback | ( | ctx, | |
cb | |||
) |
Definition at line 2066 of file civetweb.c.
#define SSL_CTX_set_verify |
Definition at line 2023 of file civetweb.c.
Definition at line 2032 of file civetweb.c.
Definition at line 2019 of file civetweb.c.
Definition at line 2013 of file civetweb.c.
Definition at line 2011 of file civetweb.c.
#define SSL_ERROR_NONE (0) |
Definition at line 1798 of file civetweb.c.
#define SSL_ERROR_SSL (1) |
Definition at line 1799 of file civetweb.c.
#define SSL_ERROR_SYSCALL (5) /* see errno */ |
Definition at line 1803 of file civetweb.c.
#define SSL_ERROR_WANT_ACCEPT (8) |
Definition at line 1806 of file civetweb.c.
#define SSL_ERROR_WANT_CONNECT (7) |
Definition at line 1805 of file civetweb.c.
#define SSL_ERROR_WANT_READ (2) |
Definition at line 1800 of file civetweb.c.
#define SSL_ERROR_WANT_WRITE (3) |
Definition at line 1801 of file civetweb.c.
#define SSL_ERROR_WANT_X509_LOOKUP (4) |
Definition at line 1802 of file civetweb.c.
#define SSL_ERROR_ZERO_RETURN (6) |
Definition at line 1804 of file civetweb.c.
Definition at line 2000 of file civetweb.c.
#define SSL_get_app_data | ( | s | ) | (SSL_get_ex_data(s, 0)) |
Definition at line 2079 of file civetweb.c.
Definition at line 2035 of file civetweb.c.
Definition at line 2005 of file civetweb.c.
Definition at line 2047 of file civetweb.c.
Definition at line 2033 of file civetweb.c.
Definition at line 2051 of file civetweb.c.
Definition at line 2034 of file civetweb.c.
#define SSL_LIB "libssl.so" |
Definition at line 792 of file civetweb.c.
Definition at line 2010 of file civetweb.c.
Definition at line 2018 of file civetweb.c.
Definition at line 2007 of file civetweb.c.
#define SSL_OP_ALL ((long)(0x80000BFFUL)) |
Definition at line 1784 of file civetweb.c.
#define SSL_OP_CIPHER_SERVER_PREFERENCE (0x00400000L) |
Definition at line 1791 of file civetweb.c.
#define SSL_OP_NO_COMPRESSION (0x00020000L) |
Definition at line 1793 of file civetweb.c.
#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION (0x00010000L) |
Definition at line 1792 of file civetweb.c.
#define SSL_OP_NO_SSLv2 (0x01000000L) |
Definition at line 1785 of file civetweb.c.
#define SSL_OP_NO_SSLv3 (0x02000000L) |
Definition at line 1786 of file civetweb.c.
#define SSL_OP_NO_TLSv1 (0x04000000L) |
Definition at line 1787 of file civetweb.c.
#define SSL_OP_NO_TLSv1_1 (0x10000000L) |
Definition at line 1789 of file civetweb.c.
#define SSL_OP_NO_TLSv1_2 (0x08000000L) |
Definition at line 1788 of file civetweb.c.
#define SSL_OP_SINGLE_DH_USE (0x00100000L) |
Definition at line 1790 of file civetweb.c.
Definition at line 2022 of file civetweb.c.
Definition at line 2003 of file civetweb.c.
#define SSL_set_app_data | ( | s, | |
arg | |||
) | (SSL_set_ex_data(s, 0, (char *)arg)) |
Definition at line 2078 of file civetweb.c.
Definition at line 2048 of file civetweb.c.
Definition at line 2006 of file civetweb.c.
Definition at line 2053 of file civetweb.c.
#define SSL_set_tlsext_host_name | ( | ctx, | |
arg | |||
) | SSL_ctrl(ctx, SSL_CTRL_SET_TLSEXT_HOSTNAME, 0, (void *)arg) |
Definition at line 2072 of file civetweb.c.
Definition at line 2028 of file civetweb.c.
#define SSL_TLSEXT_ERR_ALERT_FATAL (2) |
Definition at line 1812 of file civetweb.c.
#define SSL_TLSEXT_ERR_ALERT_WARNING (1) |
Definition at line 1811 of file civetweb.c.
#define SSL_TLSEXT_ERR_NOACK (3) |
Definition at line 1813 of file civetweb.c.
#define SSL_TLSEXT_ERR_OK (0) |
Definition at line 1810 of file civetweb.c.
#define SSL_VERIFY_CLIENT_ONCE (4) |
Definition at line 1783 of file civetweb.c.
#define SSL_VERIFY_FAIL_IF_NO_PEER_CERT (2) |
Definition at line 1782 of file civetweb.c.
#define SSL_VERIFY_NONE (0) |
Definition at line 1780 of file civetweb.c.
#define SSL_VERIFY_PEER (1) |
Definition at line 1781 of file civetweb.c.
Definition at line 2004 of file civetweb.c.
#define SSLv23_client_method (*(SSL_METHOD * (*)(void)) ssl_sw[17].ptr) |
Definition at line 2021 of file civetweb.c.
#define SSLv23_server_method (*(SSL_METHOD * (*)(void)) ssl_sw[9].ptr) |
Definition at line 2009 of file civetweb.c.
Definition at line 18865 of file civetweb.c.
#define STRUCT_FILE_INITIALIZER |
Definition at line 2279 of file civetweb.c.
#define TLSEXT_NAMETYPE_host_name (0) |
Definition at line 1809 of file civetweb.c.
#define TLSEXT_TYPE_server_name (0) |
Definition at line 1808 of file civetweb.c.
#define UINT64_FMT PRIu64 |
Definition at line 811 of file civetweb.c.
#define vsnprintf_impl vsnprintf |
Definition at line 781 of file civetweb.c.
#define WIN32_LEAN_AND_MEAN |
Definition at line 143 of file civetweb.c.
#define WINCDECL |
Definition at line 813 of file civetweb.c.
Definition at line 2094 of file civetweb.c.
Definition at line 2096 of file civetweb.c.
Definition at line 2076 of file civetweb.c.
Definition at line 2075 of file civetweb.c.
#define X509_get_serialNumber (*(ASN1_INTEGER * (*)(X509 *)) crypto_sw[15].ptr) |
Definition at line 2099 of file civetweb.c.
Definition at line 2095 of file civetweb.c.
Definition at line 2097 of file civetweb.c.
typedef struct asn1_integer ASN1_INTEGER |
Definition at line 1765 of file civetweb.c.
typedef struct bignum BIGNUM |
Definition at line 1766 of file civetweb.c.
typedef struct evp_md EVP_MD |
Definition at line 1768 of file civetweb.c.
typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS |
Definition at line 1767 of file civetweb.c.
typedef const void* SOCK_OPT_TYPE |
Definition at line 771 of file civetweb.c.
typedef int SOCKET |
Definition at line 812 of file civetweb.c.
typedef struct ssl_st SSL |
Definition at line 1760 of file civetweb.c.
typedef struct ssl_ctx_st SSL_CTX |
Definition at line 1762 of file civetweb.c.
typedef struct ssl_method_st SSL_METHOD |
Definition at line 1761 of file civetweb.c.
typedef struct x509 X509 |
Definition at line 1769 of file civetweb.c.
typedef struct x509_name X509_NAME |
Definition at line 1764 of file civetweb.c.
typedef struct x509_store_ctx_st X509_STORE_CTX |
Definition at line 1763 of file civetweb.c.
anonymous enum |
Definition at line 2308 of file civetweb.c.
anonymous enum |
Enumerator | |
---|---|
REQUEST_HANDLER | |
WEBSOCKET_HANDLER | |
AUTH_HANDLER |
Definition at line 2524 of file civetweb.c.
anonymous enum |
Enumerator | |
---|---|
CONTEXT_INVALID | |
CONTEXT_SERVER | |
CONTEXT_HTTP_CLIENT | |
CONTEXT_WS_CLIENT |
Definition at line 2562 of file civetweb.c.
anonymous enum |
Enumerator | |
---|---|
CONNECTION_TYPE_INVALID | |
CONNECTION_TYPE_REQUEST | |
CONNECTION_TYPE_RESPONSE |
Definition at line 2689 of file civetweb.c.
|
static |
Definition at line 10895 of file civetweb.c.
|
static |
Definition at line 17930 of file civetweb.c.
Definition at line 10622 of file civetweb.c.
|
static |
|
static |
Definition at line 13012 of file civetweb.c.
|
static |
Definition at line 6898 of file civetweb.c.
|
static |
Definition at line 6865 of file civetweb.c.
|
static |
Definition at line 8403 of file civetweb.c.
|
static |
Definition at line 7952 of file civetweb.c.
|
static |
Definition at line 14832 of file civetweb.c.
|
static |
Definition at line 8455 of file civetweb.c.
|
static |
Definition at line 7990 of file civetweb.c.
|
static |
Definition at line 14217 of file civetweb.c.
|
static |
Definition at line 16240 of file civetweb.c.
|
static |
Definition at line 16120 of file civetweb.c.
Definition at line 9088 of file civetweb.c.
|
static |
Definition at line 8736 of file civetweb.c.
|
static |
Definition at line 9507 of file civetweb.c.
|
static |
Definition at line 17638 of file civetweb.c.
|
static |
Definition at line 11505 of file civetweb.c.
|
static |
Definition at line 9281 of file civetweb.c.
|
static |
Definition at line 6533 of file civetweb.c.
|
static |
Definition at line 11661 of file civetweb.c.
|
static |
Definition at line 11574 of file civetweb.c.
Definition at line 2905 of file civetweb.c.
Definition at line 2950 of file civetweb.c.
|
static |
Definition at line 2939 of file civetweb.c.
|
static |
Definition at line 2928 of file civetweb.c.
|
static |
Definition at line 7254 of file civetweb.c.
|
static |
Definition at line 3728 of file civetweb.c.
|
static |
Definition at line 9522 of file civetweb.c.
|
static |
Definition at line 10480 of file civetweb.c.
|
static |
Definition at line 18163 of file civetweb.c.
|
static |
Definition at line 12996 of file civetweb.c.
|
static |
Definition at line 3979 of file civetweb.c.
|
static |
Definition at line 7646 of file civetweb.c.
|
static |
Definition at line 10176 of file civetweb.c.
|
static |
Definition at line 4037 of file civetweb.c.
|
static |
Definition at line 16824 of file civetweb.c.
|
static |
Definition at line 7917 of file civetweb.c.
|
static |
Definition at line 7685 of file civetweb.c.
|
static |
Definition at line 3407 of file civetweb.c.
|
static |
Definition at line 3795 of file civetweb.c.
|
static |
Definition at line 6030 of file civetweb.c.
|
static |
Definition at line 16710 of file civetweb.c.
|
static |
Definition at line 12884 of file civetweb.c.
|
static |
Definition at line 16899 of file civetweb.c.
|
static |
Definition at line 13458 of file civetweb.c.
|
static |
Definition at line 16990 of file civetweb.c.
|
static |
Definition at line 18290 of file civetweb.c.
|
static |
Definition at line 16621 of file civetweb.c.
|
static |
Definition at line 3572 of file civetweb.c.
|
static |
Definition at line 10929 of file civetweb.c.
|
static |
Definition at line 9306 of file civetweb.c.
|
static |
Definition at line 14125 of file civetweb.c.
|
static |
Definition at line 9806 of file civetweb.c.
|
static |
Definition at line 11966 of file civetweb.c.
|
static |
Definition at line 13628 of file civetweb.c.
|
static |
Definition at line 11813 of file civetweb.c.
|
static |
Definition at line 9545 of file civetweb.c.
|
static |
Definition at line 13150 of file civetweb.c.
|
static |
Definition at line 13159 of file civetweb.c.
|
static |
Definition at line 13169 of file civetweb.c.
|
static |
Definition at line 4117 of file civetweb.c.
|
static |
Definition at line 14715 of file civetweb.c.
|
static |
Definition at line 15140 of file civetweb.c.
|
static |
Definition at line 17386 of file civetweb.c.
|
static |
Definition at line 15868 of file civetweb.c.
|
static |
Definition at line 15678 of file civetweb.c.
|
static |
Definition at line 15359 of file civetweb.c.
|
static |
Definition at line 7344 of file civetweb.c.
|
static |
Definition at line 8559 of file civetweb.c.
|
static |
Definition at line 3113 of file civetweb.c.
|
static |
Definition at line 3120 of file civetweb.c.
|
static |
Definition at line 13572 of file civetweb.c.
|
static |
Definition at line 9792 of file civetweb.c.
|
static |
Definition at line 7240 of file civetweb.c.
|
static |
Definition at line 14392 of file civetweb.c.
|
static |
Definition at line 10195 of file civetweb.c.
|
static |
Definition at line 8692 of file civetweb.c.
|
static |
Definition at line 12823 of file civetweb.c.
|
static |
Definition at line 15270 of file civetweb.c.
|
static |
Definition at line 14733 of file civetweb.c.
|
static |
Definition at line 3260 of file civetweb.c.
Definition at line 18147 of file civetweb.c.
Definition at line 18013 of file civetweb.c.
|
static |
Definition at line 4136 of file civetweb.c.
|
static |
Definition at line 1203 of file civetweb.c.
|
static |
Definition at line 1180 of file civetweb.c.
|
static |
Definition at line 1477 of file civetweb.c.
int mg_check_digest_access_authentication | ( | struct mg_connection * | conn, |
const char * | realm, | ||
const char * | filename | ||
) |
Definition at line 8431 of file civetweb.c.
unsigned mg_check_feature | ( | unsigned | feature | ) |
Definition at line 18802 of file civetweb.c.
void mg_close_connection | ( | struct mg_connection * | conn | ) |
Definition at line 16304 of file civetweb.c.
struct mg_connection * mg_connect_client | ( | const char * | host, |
int | port, | ||
int | use_ssl, | ||
char * | error_buffer, | ||
size_t | error_buffer_size | ||
) |
Definition at line 16586 of file civetweb.c.
|
static |
Definition at line 16378 of file civetweb.c.
CIVETWEB_API struct mg_connection * mg_connect_client_secure | ( | const struct mg_client_options * | client_options, |
char * | error_buffer, | ||
size_t | error_buffer_size | ||
) |
Definition at line 16574 of file civetweb.c.
struct mg_connection * mg_connect_websocket_client | ( | const char * | host, |
int | port, | ||
int | use_ssl, | ||
char * | error_buffer, | ||
size_t | error_buffer_size, | ||
const char * | path, | ||
const char * | origin, | ||
mg_websocket_data_handler | data_func, | ||
mg_websocket_close_handler | close_func, | ||
void * | user_data | ||
) |
Definition at line 17224 of file civetweb.c.
void mg_cry | ( | const struct mg_connection * | conn, |
const char * | fmt, | ||
... | |||
) |
Definition at line 3713 of file civetweb.c.
|
static |
Definition at line 3614 of file civetweb.c.
|
static |
Definition at line 3699 of file civetweb.c.
|
static |
Definition at line 1599 of file civetweb.c.
|
static |
Definition at line 3596 of file civetweb.c.
struct mg_connection * mg_download | ( | const char * | host, |
int | port, | ||
int | use_ssl, | ||
char * | ebuf, | ||
size_t | ebuf_len, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 17107 of file civetweb.c.
unsigned mg_exit_library | ( | void | ) |
Definition at line 19821 of file civetweb.c.
|
static |
Definition at line 3231 of file civetweb.c.
|
static |
Definition at line 11685 of file civetweb.c.
|
static |
Definition at line 8227 of file civetweb.c.
|
static |
Definition at line 3146 of file civetweb.c.
Definition at line 1489 of file civetweb.c.
const char * mg_get_builtin_mime_type | ( | const char * | path | ) |
Definition at line 7895 of file civetweb.c.
struct mg_context * mg_get_context | ( | const struct mg_connection * | conn | ) |
Definition at line 3436 of file civetweb.c.
int mg_get_context_info | ( | const struct mg_context * | ctx, |
char * | buffer, | ||
int | buflen | ||
) |
Definition at line 19704 of file civetweb.c.
int mg_get_cookie | ( | const char * | cookie_header, |
const char * | var_name, | ||
char * | dst, | ||
size_t | dst_size | ||
) |
Definition at line 7093 of file civetweb.c.
|
static |
Definition at line 1649 of file civetweb.c.
const char * mg_get_header | ( | const struct mg_connection * | conn, |
const char * | name | ||
) |
Definition at line 4016 of file civetweb.c.
const char * mg_get_option | ( | const struct mg_context * | ctx, |
const char * | name | ||
) |
Definition at line 3421 of file civetweb.c.
const struct mg_request_info * mg_get_request_info | ( | const struct mg_connection * | conn | ) |
Definition at line 3745 of file civetweb.c.
int mg_get_request_link | ( | const struct mg_connection * | conn, |
char * | buf, | ||
size_t | buflen | ||
) |
Definition at line 3822 of file civetweb.c.
int mg_get_response | ( | struct mg_connection * | conn, |
char * | ebuf, | ||
size_t | ebuf_len, | ||
int | timeout | ||
) |
Definition at line 17052 of file civetweb.c.
const char * mg_get_response_code_text | ( | const struct mg_connection * | conn, |
int | response_code | ||
) |
Definition at line 4312 of file civetweb.c.
const struct mg_response_info * mg_get_response_info | ( | const struct mg_connection * | conn | ) |
Definition at line 3782 of file civetweb.c.
int mg_get_server_ports | ( | const struct mg_context * | ctx, |
int | size, | ||
struct mg_server_ports * | ports | ||
) |
Definition at line 3493 of file civetweb.c.
int mg_get_system_info | ( | char * | buffer, |
int | buflen | ||
) |
Definition at line 19689 of file civetweb.c.
|
static |
Definition at line 18876 of file civetweb.c.
void * mg_get_user_connection_data | ( | const struct mg_connection * | conn | ) |
Definition at line 3459 of file civetweb.c.
void * mg_get_user_data | ( | const struct mg_context * | ctx | ) |
Definition at line 3443 of file civetweb.c.
Definition at line 3029 of file civetweb.c.
int mg_get_var | ( | const char * | data, |
size_t | data_len, | ||
const char * | name, | ||
char * | dst, | ||
size_t | dst_len | ||
) |
Definition at line 7024 of file civetweb.c.
int mg_get_var2 | ( | const char * | data, |
size_t | data_len, | ||
const char * | name, | ||
char * | dst, | ||
size_t | dst_len, | ||
size_t | occurrence | ||
) |
Definition at line 7035 of file civetweb.c.
|
static |
Definition at line 6641 of file civetweb.c.
|
static |
Definition at line 1164 of file civetweb.c.
|
static |
Definition at line 1172 of file civetweb.c.
|
static |
Definition at line 8699 of file civetweb.c.
unsigned mg_init_library | ( | unsigned | features | ) |
Definition at line 19745 of file civetweb.c.
|
static |
Definition at line 5892 of file civetweb.c.
void mg_lock_connection | ( | struct mg_connection * | conn | ) |
Definition at line 12014 of file civetweb.c.
void mg_lock_context | ( | struct mg_context * | ctx | ) |
Definition at line 12030 of file civetweb.c.
|
static |
Definition at line 1471 of file civetweb.c.
char * mg_md5 | ( | char | buf[33], |
... | |||
) |
Definition at line 7967 of file civetweb.c.
int mg_modify_passwords_file | ( | const char * | fname, |
const char * | domain, | ||
const char * | user, | ||
const char * | pass | ||
) |
Definition at line 8580 of file civetweb.c.
|
static |
Definition at line 6059 of file civetweb.c.
int mg_printf | ( | struct mg_connection * | conn, |
const char * | fmt, | ||
... | |||
) |
Definition at line 6979 of file civetweb.c.
int mg_read | ( | struct mg_connection * | conn, |
void * | buf, | ||
size_t | len | ||
) |
Definition at line 6655 of file civetweb.c.
|
static |
Definition at line 6573 of file civetweb.c.
Definition at line 1483 of file civetweb.c.
int mg_send_chunk | ( | struct mg_connection * | conn, |
const char * | chunk, | ||
unsigned int | chunk_len | ||
) |
Definition at line 6819 of file civetweb.c.
int mg_send_digest_access_authentication_request | ( | struct mg_connection * | conn, |
const char * | realm | ||
) |
Definition at line 8546 of file civetweb.c.
void mg_send_file | ( | struct mg_connection * | conn, |
const char * | path | ||
) |
Definition at line 9841 of file civetweb.c.
int mg_send_file_body | ( | struct mg_connection * | conn, |
const char * | path | ||
) |
Definition at line 9776 of file civetweb.c.
int mg_send_http_error | ( | struct mg_connection * | conn, |
int | status, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 4687 of file civetweb.c.
|
static |
Definition at line 4511 of file civetweb.c.
int mg_send_http_ok | ( | struct mg_connection * | conn, |
const char * | mime_type, | ||
long long | content_length | ||
) |
Definition at line 4701 of file civetweb.c.
int mg_send_http_redirect | ( | struct mg_connection * | conn, |
const char * | target_url, | ||
int | redirect_code | ||
) |
Definition at line 4739 of file civetweb.c.
void mg_send_mime_file | ( | struct mg_connection * | conn, |
const char * | path, | ||
const char * | mime_type | ||
) |
Definition at line 9848 of file civetweb.c.
void mg_send_mime_file2 | ( | struct mg_connection * | conn, |
const char * | path, | ||
const char * | mime_type, | ||
const char * | additional_headers | ||
) |
Definition at line 9857 of file civetweb.c.
void mg_set_auth_handler | ( | struct mg_context * | ctx, |
const char * | uri, | ||
mg_request_handler | handler, | ||
void * | cbdata | ||
) |
Definition at line 13436 of file civetweb.c.
|
static |
Definition at line 13181 of file civetweb.c.
void mg_set_request_handler | ( | struct mg_context * | ctx, |
const char * | uri, | ||
mg_request_handler | handler, | ||
void * | cbdata | ||
) |
Definition at line 13364 of file civetweb.c.
|
static |
Definition at line 2961 of file civetweb.c.
Definition at line 3450 of file civetweb.c.
void mg_set_websocket_handler | ( | struct mg_context * | ctx, |
const char * | uri, | ||
mg_websocket_connect_handler | connect_handler, | ||
mg_websocket_ready_handler | ready_handler, | ||
mg_websocket_data_handler | data_handler, | ||
mg_websocket_close_handler | close_handler, | ||
void * | cbdata | ||
) |
Definition at line 13386 of file civetweb.c.
void mg_set_websocket_handler_with_subprotocols | ( | struct mg_context * | ctx, |
const char * | uri, | ||
struct mg_websocket_subprotocols * | subprotocols, | ||
mg_websocket_connect_handler | connect_handler, | ||
mg_websocket_ready_handler | ready_handler, | ||
mg_websocket_data_handler | data_handler, | ||
mg_websocket_close_handler | close_handler, | ||
void * | cbdata | ||
) |
Definition at line 13406 of file civetweb.c.
|
static |
Definition at line 3391 of file civetweb.c.
|
static |
struct mg_context * mg_start | ( | const struct mg_callbacks * | callbacks, |
void * | user_data, | ||
const char ** | options | ||
) |
Definition at line 18342 of file civetweb.c.
int mg_start_thread | ( | mg_thread_func_t | func, |
void * | param | ||
) |
Definition at line 5841 of file civetweb.c.
|
static |
Definition at line 5865 of file civetweb.c.
|
static |
Definition at line 5791 of file civetweb.c.
mg_static_assert | ( | (sizeof(config_options)/sizeof(config_options[0])) | = =(NUM_OPTIONS+1) , |
"config_options and enum not sync" | |||
) |
mg_static_assert | ( | MAX_WORKER_THREADS >= | 1, |
"worker threads must be a positive number" | |||
) |
mg_static_assert | ( | sizeof(int) | = =4||sizeof(int)==8 , |
"int data type size check" | |||
) |
mg_static_assert | ( | sizeof(size_t) | = =4||sizeof(size_t)==8 , |
"size_t data type size check" | |||
) |
void mg_stop | ( | struct mg_context * | ctx | ) |
Definition at line 18256 of file civetweb.c.
long long mg_store_body | ( | struct mg_connection * | conn, |
const char * | path | ||
) |
Definition at line 9953 of file civetweb.c.
int mg_strcasecmp | ( | const char * | s1, |
const char * | s2 | ||
) |
Definition at line 3282 of file civetweb.c.
|
static |
Definition at line 3323 of file civetweb.c.
|
static |
Definition at line 3316 of file civetweb.c.
|
static |
Definition at line 3310 of file civetweb.c.
|
static |
Definition at line 3250 of file civetweb.c.
int mg_strncasecmp | ( | const char * | s1, |
const char * | s2, | ||
size_t | len | ||
) |
Definition at line 3267 of file civetweb.c.
|
static |
Definition at line 3295 of file civetweb.c.
void mg_unlock_connection | ( | struct mg_connection * | conn | ) |
Definition at line 12022 of file civetweb.c.
void mg_unlock_context | ( | struct mg_context * | ctx | ) |
Definition at line 12038 of file civetweb.c.
int mg_url_decode | ( | const char * | src, |
int | src_len, | ||
char * | dst, | ||
int | dst_len, | ||
int | is_form_url_encoded | ||
) |
Definition at line 6993 of file civetweb.c.
int mg_url_encode | ( | const char * | src, |
char * | dst, | ||
size_t | dst_len | ||
) |
Definition at line 8967 of file civetweb.c.
const char * mg_version | ( | void | ) |
Definition at line 3738 of file civetweb.c.
|
static |
Definition at line 6961 of file civetweb.c.
|
static |
Definition at line 3342 of file civetweb.c.
int mg_write | ( | struct mg_connection * | conn, |
const void * | buf, | ||
size_t | len | ||
) |
Definition at line 6755 of file civetweb.c.
|
static |
Definition at line 11280 of file civetweb.c.
|
static |
Definition at line 9124 of file civetweb.c.
|
static |
Definition at line 4060 of file civetweb.c.
|
static |
Definition at line 8034 of file civetweb.c.
|
static |
Definition at line 3052 of file civetweb.c.
|
static |
Definition at line 8114 of file civetweb.c.
|
static |
Definition at line 7701 of file civetweb.c.
|
static |
Definition at line 10055 of file civetweb.c.
|
static |
Definition at line 10211 of file civetweb.c.
|
static |
Definition at line 10298 of file civetweb.c.
|
static |
Definition at line 12830 of file civetweb.c.
|
static |
Definition at line 14250 of file civetweb.c.
|
static |
Definition at line 9500 of file civetweb.c.
|
static |
Definition at line 10692 of file civetweb.c.
|
static |
Definition at line 11930 of file civetweb.c.
|
static |
Definition at line 8995 of file civetweb.c.
|
static |
Definition at line 11899 of file civetweb.c.
|
static |
Definition at line 17423 of file civetweb.c.
|
static |
Definition at line 17617 of file civetweb.c.
|
static |
Definition at line 6489 of file civetweb.c.
|
static |
Definition at line 6298 of file civetweb.c.
|
static |
Definition at line 6254 of file civetweb.c.
|
static |
Definition at line 6108 of file civetweb.c.
|
static |
Definition at line 9903 of file civetweb.c.
|
static |
Definition at line 11354 of file civetweb.c.
|
static |
Definition at line 8289 of file civetweb.c.
|
static |
Definition at line 10405 of file civetweb.c.
Definition at line 9270 of file civetweb.c.
|
static |
Definition at line 13099 of file civetweb.c.
|
static |
Definition at line 14946 of file civetweb.c.
|
static |
Definition at line 9940 of file civetweb.c.
|
static |
Definition at line 9194 of file civetweb.c.
|
static |
Definition at line 7765 of file civetweb.c.
|
static |
Definition at line 16014 of file civetweb.c.
|
static |
Definition at line 9138 of file civetweb.c.
|
static |
Definition at line 4282 of file civetweb.c.
|
static |
Definition at line 8505 of file civetweb.c.
|
static |
Definition at line 9387 of file civetweb.c.
|
static |
Definition at line 4239 of file civetweb.c.
|
static |
Definition at line 11867 of file civetweb.c.
|
static |
Definition at line 11707 of file civetweb.c.
|
static |
Definition at line 4251 of file civetweb.c.
|
static |
Definition at line 16007 of file civetweb.c.
|
static |
Definition at line 6011 of file civetweb.c.
Definition at line 5827 of file civetweb.c.
|
static |
Definition at line 15984 of file civetweb.c.
|
static |
Definition at line 5997 of file civetweb.c.
|
static |
Definition at line 14449 of file civetweb.c.
|
static |
Definition at line 16103 of file civetweb.c.
|
static |
Definition at line 12849 of file civetweb.c.
|
static |
Definition at line 14867 of file civetweb.c.
|
static |
Definition at line 4221 of file civetweb.c.
|
static |
Definition at line 4182 of file civetweb.c.
|
static |
Definition at line 3915 of file civetweb.c.
|
static |
Definition at line 10010 of file civetweb.c.
|
static |
Definition at line 3538 of file civetweb.c.
|
static |
Definition at line 5903 of file civetweb.c.
|
static |
Definition at line 15131 of file civetweb.c.
|
static |
Definition at line 15166 of file civetweb.c.
|
static |
Definition at line 15569 of file civetweb.c.
Definition at line 15596 of file civetweb.c.
|
static |
Definition at line 15253 of file civetweb.c.
Definition at line 15612 of file civetweb.c.
|
static |
Definition at line 15498 of file civetweb.c.
|
static |
Definition at line 15033 of file civetweb.c.
|
static |
Definition at line 7296 of file civetweb.c.
|
static |
Definition at line 4232 of file civetweb.c.
Definition at line 14921 of file civetweb.c.
Definition at line 15943 of file civetweb.c.
Definition at line 17909 of file civetweb.c.
|
static |
Definition at line 17727 of file civetweb.c.
const struct { ... } abs_uri_protocols[] |
const struct { ... } builtin_mime_types[] |
|
static |
Definition at line 16374 of file civetweb.c.
|
static |
Definition at line 2409 of file civetweb.c.
|
static |
Definition at line 2171 of file civetweb.c.
|
static |
Definition at line 15346 of file civetweb.c.
|
static |
Definition at line 15354 of file civetweb.c.
unsigned default_port |
Definition at line 16606 of file civetweb.c.
size_t ext_len |
Definition at line 7794 of file civetweb.c.
const char* extension |
Definition at line 7793 of file civetweb.c.
|
static |
Definition at line 1149 of file civetweb.c.
|
static |
Definition at line 10119 of file civetweb.c.
|
static |
Definition at line 1549 of file civetweb.c.
|
static |
Definition at line 1552 of file civetweb.c.
const char* mime_type |
Definition at line 7795 of file civetweb.c.
|
static |
Definition at line 2202 of file civetweb.c.
const char* proto |
Definition at line 16604 of file civetweb.c.
size_t proto_len |
Definition at line 16605 of file civetweb.c.
|
static |
Definition at line 963 of file civetweb.c.
|
static |
Definition at line 15029 of file civetweb.c.
|
static |
Definition at line 2127 of file civetweb.c.
|
static |
Definition at line 15345 of file civetweb.c.
char static_assert_replacement[1] |
Definition at line 119 of file civetweb.c.
|
static |
Definition at line 1555 of file civetweb.c.
|
static |
Definition at line 1556 of file civetweb.c.