rtl433
UNKNOWN
RTL-433 utility
|
Data Structures | |
struct | ctl_msg |
struct | DIR |
struct | dirent |
struct | win32_dir |
union | char64long16 |
struct | socksdata |
struct | mg_ssl_if_ctx |
struct | mg_ssl_if_ctx |
struct | altbuf |
struct | mg_http_proto_data_file |
struct | mg_http_proto_data_cgi |
struct | mg_http_proto_data_chuncked |
struct | mg_http_endpoint |
struct | mg_http_multipart_stream |
struct | mg_reverse_proxy_data |
struct | mg_ws_proto_data |
struct | mg_http_proto_data |
Typedefs | |
typedef int | cs_dirent_dummy |
Enumerations | |
enum | cs_log_level { LL_NONE = -1, LL_WARN = 1, LL_INFO = 2, LL_DEBUG = 3, LL_VERBOSE_DEBUG = 4, _LL_MIN = -2, _LL_MAX = 5 } |
enum | mg_http_proto_data_type { DATA_NONE, DATA_FILE, DATA_PUT } |
enum | mg_http_multipart_stream_state { MPS_BEGIN, MPS_WAITING_FOR_BOUNDARY, MPS_WAITING_FOR_CHUNK, MPS_GOT_BOUNDARY, MPS_FINALIZE, MPS_FINISHED } |
Functions | |
MG_INTERNAL struct mg_connection * | mg_do_connect (struct mg_connection *nc, int proto, union socket_address *sa) |
MG_INTERNAL int | mg_parse_address (const char *str, union socket_address *sa, int *proto, char *host, size_t host_len) |
MG_INTERNAL void | mg_call (struct mg_connection *nc, mg_event_handler_t ev_handler, void *user_data, int ev, void *ev_data) |
void | mg_forward (struct mg_connection *from, struct mg_connection *to) |
MG_INTERNAL void | mg_add_conn (struct mg_mgr *mgr, struct mg_connection *c) |
MG_INTERNAL void | mg_remove_conn (struct mg_connection *c) |
MG_INTERNAL struct mg_connection * | mg_create_connection (struct mg_mgr *mgr, mg_event_handler_t callback, struct mg_add_sock_opts opts) |
int | to_wchar (const char *path, wchar_t *wbuf, size_t wbuf_len) |
MG_INTERNAL int | parse_mqtt (struct mbuf *io, struct mg_mqtt_message *mm) |
MG_INTERNAL size_t | mg_handle_chunked (struct mg_connection *nc, struct http_message *hm, char *buf, size_t blen) |
MG_INTERNAL int | mg_uri_to_local_path (struct http_message *hm, const struct mg_serve_http_opts *opts, char **local_path, struct mg_str *remainder) |
MG_INTERNAL time_t | mg_parse_date_string (const char *datetime) |
MG_INTERNAL int | mg_is_not_modified (struct http_message *hm, cs_stat_t *st) |
MG_INTERNAL void | mg_handle_cgi (struct mg_connection *nc, const char *prog, const struct mg_str *path_info, const struct http_message *hm, const struct mg_serve_http_opts *opts) |
MG_INTERNAL void | mg_http_free_proto_data_cgi (struct mg_http_proto_data_cgi *d) |
MG_INTERNAL void | mg_handle_ssi_request (struct mg_connection *nc, struct http_message *hm, const char *path, const struct mg_serve_http_opts *opts) |
MG_INTERNAL int | mg_is_dav_request (const struct mg_str *s) |
MG_INTERNAL void | mg_handle_propfind (struct mg_connection *nc, const char *path, cs_stat_t *stp, struct http_message *hm, struct mg_serve_http_opts *opts) |
MG_INTERNAL void | mg_handle_lock (struct mg_connection *nc, const char *path) |
MG_INTERNAL void | mg_handle_mkcol (struct mg_connection *nc, const char *path, struct http_message *hm) |
MG_INTERNAL void | mg_handle_move (struct mg_connection *c, const struct mg_serve_http_opts *opts, const char *path, struct http_message *hm) |
MG_INTERNAL void | mg_handle_delete (struct mg_connection *nc, const struct mg_serve_http_opts *opts, const char *path) |
MG_INTERNAL void | mg_handle_put (struct mg_connection *nc, const char *path, struct http_message *hm) |
MG_INTERNAL void | mg_ws_handler (struct mg_connection *nc, int ev, void *ev_data MG_UD_ARG(void *user_data)) |
MG_INTERNAL void | mg_ws_handshake (struct mg_connection *nc, const struct mg_str *key, struct http_message *) |
MG_INTERNAL int | mg_get_errno (void) |
MG_INTERNAL void | mg_close_conn (struct mg_connection *conn) |
MG_INTERNAL int | mg_sntp_parse_reply (const char *buf, int len, struct mg_sntp_message *msg) |
static void | cs_base64_emit_code (struct cs_base64_ctx *ctx, int v) |
static void | cs_base64_emit_chunk (struct cs_base64_ctx *ctx) |
void | cs_base64_init (struct cs_base64_ctx *ctx, cs_base64_putc_t b64_putc, void *user_data) |
void | cs_base64_update (struct cs_base64_ctx *ctx, const char *str, size_t len) |
void | cs_base64_finish (struct cs_base64_ctx *ctx) |
void | cs_base64_encode (const unsigned char *src, int src_len, char *dst) |
void | cs_fprint_base64 (FILE *f, const unsigned char *src, int src_len) |
static unsigned char | from_b64 (unsigned char ch) |
int | cs_base64_decode (const unsigned char *s, int len, char *dst, int *dec_len) |
void | cs_log_set_level (enum cs_log_level level) |
void | cs_log_set_filter (const char *pattern) |
int | cs_log_print_prefix (enum cs_log_level level, const char *func, const char *filename) |
void | cs_log_set_file (FILE *file) |
void | cs_log_printf (const char *fmt,...) PRINTF_LIKE(1 |
DIR * | opendir (const char *dir_name) |
int | closedir (DIR *dir) |
struct dirent * | readdir (DIR *dir) |
double | cs_time (void) |
double | cs_timegm (const struct tm *tm) |
static void | byteReverse (unsigned char *buf, unsigned longs) |
void | cs_md5_init (cs_md5_ctx *ctx) |
static void | cs_md5_transform (uint32_t buf[4], uint32_t const in[16]) |
void | cs_md5_update (cs_md5_ctx *ctx, const unsigned char *buf, size_t len) |
void | cs_md5_final (unsigned char digest[16], cs_md5_ctx *ctx) |
static uint32_t | blk0 (union char64long16 *block, int i) |
void | cs_sha1_transform (uint32_t state[5], const unsigned char buffer[64]) |
void | cs_sha1_init (cs_sha1_ctx *context) |
void | cs_sha1_update (cs_sha1_ctx *context, const unsigned char *data, uint32_t len) |
void | cs_sha1_final (unsigned char digest[20], cs_sha1_ctx *context) |
void | cs_hmac_sha1 (const unsigned char *key, size_t keylen, const unsigned char *data, size_t datalen, unsigned char out[20]) |
void | mbuf_init (struct mbuf *mbuf, size_t initial_size) WEAK |
void | mbuf_free (struct mbuf *mbuf) WEAK |
void | mbuf_resize (struct mbuf *a, size_t new_size) WEAK |
void | mbuf_trim (struct mbuf *mbuf) WEAK |
size_t | mbuf_insert (struct mbuf *a, size_t off, const void *buf, size_t) WEAK |
size_t | mbuf_append (struct mbuf *a, const void *buf, size_t len) WEAK |
void | mbuf_remove (struct mbuf *mb, size_t n) WEAK |
int | mg_ncasecmp (const char *s1, const char *s2, size_t len) WEAK |
struct mg_str | mg_mk_str (const char *s) WEAK |
struct mg_str | mg_mk_str_n (const char *s, size_t len) WEAK |
int | mg_vcmp (const struct mg_str *str1, const char *str2) WEAK |
int | mg_vcasecmp (const struct mg_str *str1, const char *str2) WEAK |
static struct mg_str | mg_strdup_common (const struct mg_str s, int nul_terminate) |
struct mg_str | mg_strdup (const struct mg_str s) WEAK |
struct mg_str | mg_strdup_nul (const struct mg_str s) WEAK |
const char * | mg_strchr (const struct mg_str s, int c) WEAK |
int | mg_strcmp (const struct mg_str str1, const struct mg_str str2) WEAK |
int | mg_strncmp (const struct mg_str, const struct mg_str, size_t n) WEAK |
const char * | mg_strstr (const struct mg_str haystack, const struct mg_str needle) WEAK |
struct mg_str | mg_strstrip (struct mg_str s) WEAK |
size_t | c_strnlen (const char *s, size_t maxlen) WEAK |
int | c_vsnprintf (char *buf, size_t buf_size, const char *fmt, va_list ap) WEAK |
static int | c_itoa (char *buf, size_t buf_size, int64_t num, int base, int flags, int field_width) |
int | c_snprintf (char *buf, size_t buf_size, const char *fmt,...) WEAK |
const char * | c_strnstr (const char *s, const char *find, size_t slen) WEAK |
char * | strdup (const char *src) WEAK |
void | cs_to_hex (char *to, const unsigned char *p, size_t len) WEAK |
static int | fourbit (int ch) |
void | cs_from_hex (char *to, const char *p, size_t len) WEAK |
int64_t | cs_to64 (const char *s) WEAK |
static int | str_util_lowercase (const char *s) |
int | mg_casecmp (const char *s1, const char *s2) WEAK |
int | mg_asprintf (char **buf, size_t size, const char *fmt,...) WEAK |
int | mg_avprintf (char **buf, size_t size, const char *fmt, va_list ap) WEAK |
const char * | mg_next_comma_list_entry (const char *, struct mg_str *, struct mg_str *) |
struct mg_str | mg_next_comma_list_entry_n (struct mg_str list, struct mg_str *val, struct mg_str *eq_val) WEAK |
size_t | mg_match_prefix_n (const struct mg_str, const struct mg_str) |
size_t | mg_match_prefix (const char *, int, const char *) |
MG_INTERNAL void | mg_timer (struct mg_connection *c, double now) |
MG_INTERNAL size_t | recv_avail_size (struct mg_connection *conn, size_t max) |
static int | mg_do_recv (struct mg_connection *nc) |
int | mg_if_poll (struct mg_connection *nc, double now) |
void | mg_destroy_conn (struct mg_connection *conn, int destroy_if) |
void | mg_mgr_init (struct mg_mgr *m, void *user_data) |
void | mg_mgr_init_opt (struct mg_mgr *m, void *user_data, struct mg_mgr_init_opts opts) |
void | mg_mgr_free (struct mg_mgr *m) |
int | mg_mgr_poll (struct mg_mgr *m, int timeout_ms) |
int | mg_vprintf (struct mg_connection *nc, const char *fmt, va_list ap) |
int | mg_printf (struct mg_connection *conn, const char *fmt,...) |
static int | mg_resolve2 (const char *host, struct in_addr *ina) |
int | mg_resolve (const char *host, char *buf, size_t n) |
MG_INTERNAL struct mg_connection * | mg_create_connection_base (struct mg_mgr *mgr, mg_event_handler_t callback, struct mg_add_sock_opts opts) |
MG_INTERNAL void | mg_ssl_handshake (struct mg_connection *nc) |
struct mg_connection * | mg_if_accept_new_conn (struct mg_connection *lc) |
void | mg_if_accept_tcp_cb (struct mg_connection *nc, union socket_address *sa, size_t sa_len) |
void | mg_send (struct mg_connection *nc, const void *buf, int len) |
static int | mg_recv_tcp (struct mg_connection *nc, char *buf, size_t len) |
static int | mg_recv_udp (struct mg_connection *nc, char *buf, size_t len) |
void | mg_if_can_recv_cb (struct mg_connection *nc) |
void | mg_if_can_send_cb (struct mg_connection *nc) |
void | mg_if_connect_cb (struct mg_connection *nc, int err) |
static void | resolve_cb (struct mg_dns_message *msg, void *data, enum mg_resolve_err e) |
struct mg_connection * | mg_connect (struct mg_mgr *mgr, const char *address, MG_CB(mg_event_handler_t callback, void *user_data)) |
struct mg_connection * | mg_connect_opt (struct mg_mgr *mgr, const char *address, MG_CB(mg_event_handler_t callback, void *user_data), struct mg_connect_opts opts) |
struct mg_connection * | mg_bind (struct mg_mgr *srv, const char *address, MG_CB(mg_event_handler_t event_handler, void *user_data)) |
struct mg_connection * | mg_bind_opt (struct mg_mgr *mgr, const char *address, MG_CB(mg_event_handler_t callback, void *user_data), struct mg_bind_opts opts) |
struct mg_connection * | mg_next (struct mg_mgr *s, struct mg_connection *conn) |
void | mg_broadcast (struct mg_mgr *mgr, mg_event_handler_t cb, void *data, size_t len) |
static int | isbyte (int n) |
static int | parse_net (const char *spec, uint32_t *net, uint32_t *mask) |
int | mg_check_ip_acl (const char *acl, uint32_t remote_ip) |
double | mg_set_timer (struct mg_connection *c, double timestamp) |
void | mg_sock_set (struct mg_connection *nc, sock_t sock) |
void | mg_if_get_conn_addr (struct mg_connection *nc, int remote, union socket_address *sa) |
struct mg_connection * | mg_add_sock_opt (struct mg_mgr *s, sock_t sock, MG_CB(mg_event_handler_t callback, void *user_data), struct mg_add_sock_opts opts) |
struct mg_connection * | mg_add_sock (struct mg_mgr *s, sock_t sock, MG_CB(mg_event_handler_t callback, void *user_data)) |
double | mg_time (void) |
struct mg_iface * | mg_if_create_iface (const struct mg_iface_vtable *vtable, struct mg_mgr *mgr) |
struct mg_iface * | mg_find_iface (struct mg_mgr *mgr, const struct mg_iface_vtable *vtable, struct mg_iface *from) |
double | mg_mgr_min_timer (const struct mg_mgr *mgr) |
static void | mg_null_if_connect_tcp (struct mg_connection *c, const union socket_address *sa) |
static void | mg_null_if_connect_udp (struct mg_connection *c) |
static int | mg_null_if_listen_tcp (struct mg_connection *c, union socket_address *sa) |
static int | mg_null_if_listen_udp (struct mg_connection *c, union socket_address *sa) |
static int | mg_null_if_tcp_send (struct mg_connection *c, const void *buf, size_t len) |
static int | mg_null_if_udp_send (struct mg_connection *c, const void *buf, size_t len) |
int | mg_null_if_tcp_recv (struct mg_connection *c, void *buf, size_t len) |
int | mg_null_if_udp_recv (struct mg_connection *c, void *buf, size_t len, union socket_address *sa, size_t *sa_len) |
static int | mg_null_if_create_conn (struct mg_connection *c) |
static void | mg_null_if_destroy_conn (struct mg_connection *c) |
static void | mg_null_if_sock_set (struct mg_connection *c, sock_t sock) |
static void | mg_null_if_init (struct mg_iface *iface) |
static void | mg_null_if_free (struct mg_iface *iface) |
static void | mg_null_if_add_conn (struct mg_connection *c) |
static void | mg_null_if_remove_conn (struct mg_connection *c) |
static time_t | mg_null_if_poll (struct mg_iface *iface, int timeout_ms) |
static void | mg_null_if_get_conn_addr (struct mg_connection *c, int remote, union socket_address *sa) |
static sock_t | mg_open_listening_socket (union socket_address *sa, int type, int proto) |
void | mg_set_non_blocking_mode (sock_t sock) |
static int | mg_is_error (void) |
void | mg_socket_if_connect_tcp (struct mg_connection *nc, const union socket_address *sa) |
void | mg_socket_if_connect_udp (struct mg_connection *nc) |
int | mg_socket_if_listen_tcp (struct mg_connection *nc, union socket_address *sa) |
static int | mg_socket_if_listen_udp (struct mg_connection *nc, union socket_address *sa) |
static int | mg_socket_if_tcp_send (struct mg_connection *nc, const void *buf, size_t len) |
static int | mg_socket_if_udp_send (struct mg_connection *nc, const void *buf, size_t len) |
static int | mg_socket_if_tcp_recv (struct mg_connection *nc, void *buf, size_t len) |
static int | mg_socket_if_udp_recv (struct mg_connection *nc, void *buf, size_t len, union socket_address *sa, size_t *sa_len) |
int | mg_socket_if_create_conn (struct mg_connection *nc) |
void | mg_socket_if_destroy_conn (struct mg_connection *nc) |
static int | mg_accept_conn (struct mg_connection *lc) |
void | mg_mgr_handle_conn (struct mg_connection *nc, int fd_flags, double now) |
static void | mg_mgr_handle_ctl_sock (struct mg_mgr *mgr) |
void | mg_socket_if_sock_set (struct mg_connection *nc, sock_t sock) |
void | mg_socket_if_init (struct mg_iface *iface) |
void | mg_socket_if_free (struct mg_iface *iface) |
void | mg_socket_if_add_conn (struct mg_connection *nc) |
void | mg_socket_if_remove_conn (struct mg_connection *nc) |
void | mg_add_to_set (sock_t sock, fd_set *set, sock_t *max_fd) |
time_t | mg_socket_if_poll (struct mg_iface *iface, int timeout_ms) |
MG_INTERNAL void | mg_socketpair_close (sock_t *sock) |
MG_INTERNAL sock_t | mg_socketpair_accept (sock_t sock, union socket_address *sa, socklen_t sa_len) |
int | mg_socketpair (sock_t sp[2], int sock_type) |
static void | mg_sock_get_addr (sock_t sock, int remote, union socket_address *sa) |
void | mg_sock_to_str (sock_t sock, char *buf, size_t len, int flags) |
void | mg_socket_if_get_conn_addr (struct mg_connection *nc, int remote, union socket_address *sa) |
static void | socks_if_disband (struct socksdata *d) |
static void | socks_if_relay (struct mg_connection *s) |
static void | socks_if_handler (struct mg_connection *c, int ev, void *ev_data) |
static void | mg_socks_if_connect_tcp (struct mg_connection *c, const union socket_address *sa) |
static void | mg_socks_if_connect_udp (struct mg_connection *c) |
static int | mg_socks_if_listen_tcp (struct mg_connection *c, union socket_address *sa) |
static int | mg_socks_if_listen_udp (struct mg_connection *c, union socket_address *sa) |
static int | mg_socks_if_tcp_send (struct mg_connection *c, const void *buf, size_t len) |
static int | mg_socks_if_udp_send (struct mg_connection *c, const void *buf, size_t len) |
int | mg_socks_if_tcp_recv (struct mg_connection *c, void *buf, size_t len) |
int | mg_socks_if_udp_recv (struct mg_connection *c, void *buf, size_t len, union socket_address *sa, size_t *sa_len) |
static int | mg_socks_if_create_conn (struct mg_connection *c) |
static void | mg_socks_if_destroy_conn (struct mg_connection *c) |
static void | mg_socks_if_sock_set (struct mg_connection *c, sock_t sock) |
static void | mg_socks_if_init (struct mg_iface *iface) |
static void | mg_socks_if_free (struct mg_iface *iface) |
static void | mg_socks_if_add_conn (struct mg_connection *c) |
static void | mg_socks_if_remove_conn (struct mg_connection *c) |
static time_t | mg_socks_if_poll (struct mg_iface *iface, int timeout_ms) |
static void | mg_socks_if_get_conn_addr (struct mg_connection *c, int remote, union socket_address *sa) |
struct mg_iface * | mg_socks_mk_iface (struct mg_mgr *mgr, const char *proxy_addr) |
void | mg_ssl_if_init () |
enum mg_ssl_if_result | mg_ssl_if_conn_accept (struct mg_connection *nc, struct mg_connection *lc) |
static enum mg_ssl_if_result | mg_use_cert (SSL_CTX *ctx, const char *cert, const char *key, const char **err_msg) |
static enum mg_ssl_if_result | mg_use_ca_cert (SSL_CTX *ctx, const char *cert) |
static enum mg_ssl_if_result | mg_set_cipher_list (SSL_CTX *ctx, const char *cl) |
static enum mg_ssl_if_result | mg_ssl_if_ossl_set_psk (struct mg_ssl_if_ctx *ctx, const char *identity, const char *key_str) |
enum mg_ssl_if_result | mg_ssl_if_conn_init (struct mg_connection *nc, const struct mg_ssl_if_conn_params *params, const char **err_msg) |
static enum mg_ssl_if_result | mg_ssl_if_ssl_err (struct mg_connection *nc, int res) |
enum mg_ssl_if_result | mg_ssl_if_handshake (struct mg_connection *nc) |
int | mg_ssl_if_read (struct mg_connection *nc, void *buf, size_t buf_size) |
int | mg_ssl_if_write (struct mg_connection *nc, const void *data, size_t len) |
void | mg_ssl_if_conn_close_notify (struct mg_connection *nc) |
void | mg_ssl_if_conn_free (struct mg_connection *nc) |
static unsigned int | mg_ssl_if_ossl_psk_cb (SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len) |
const char * | mg_set_ssl (struct mg_connection *nc, const char *cert, const char *ca_cert) |
static void | mg_ssl_mbed_log (void *ctx, int level, const char *file, int line, const char *str) |
int | mg_ssl_if_mbed_random (void *ctx, unsigned char *buf, size_t len) |
static enum mg_ssl_if_result | mg_use_cert (struct mg_ssl_if_ctx *ctx, const char *cert, const char *key, const char **err_msg) |
static enum mg_ssl_if_result | mg_use_ca_cert (struct mg_ssl_if_ctx *ctx, const char *cert) |
static enum mg_ssl_if_result | mg_set_cipher_list (struct mg_ssl_if_ctx *ctx, const char *ciphers) |
static enum mg_ssl_if_result | mg_ssl_if_mbed_set_psk (struct mg_ssl_if_ctx *ctx, const char *identity, const char *key) |
static int | mg_ssl_if_mbed_send (void *ctx, const unsigned char *buf, size_t len) |
static int | mg_ssl_if_mbed_recv (void *ctx, unsigned char *buf, size_t len) |
static enum mg_ssl_if_result | mg_ssl_if_mbed_err (struct mg_connection *nc, int ret) |
static void | mg_ssl_if_mbed_free_certs_and_keys (struct mg_ssl_if_ctx *ctx) |
static void | parse_uri_component (const char **p, const char *end, const char *seps, struct mg_str *res) |
int | mg_parse_uri (const struct mg_str uri, struct mg_str *scheme, struct mg_str *user_info, struct mg_str *host, unsigned int *port, struct mg_str *path, struct mg_str *query, struct mg_str *fragment) |
int | mg_normalize_uri_path (const struct mg_str *in, struct mg_str *out) |
int | mg_assemble_uri (const struct mg_str *scheme, const struct mg_str *user_info, const struct mg_str *host, unsigned int port, const struct mg_str *path, const struct mg_str *query, const struct mg_str *fragment, int normalize_path, struct mg_str *uri) |
MG_INTERNAL void | altbuf_init (struct altbuf *ab, char *buf, size_t buf_size) |
MG_INTERNAL void | altbuf_append (struct altbuf *ab, char c) |
MG_INTERNAL void | altbuf_reset (struct altbuf *ab) |
MG_INTERNAL int | altbuf_reallocated (struct altbuf *ab) |
MG_INTERNAL char * | altbuf_get_buf (struct altbuf *ab, int trim) |
static void | mg_http_conn_destructor (void *proto_data) |
struct mg_connection * | mg_connect_http_base (struct mg_mgr *mgr, MG_CB(mg_event_handler_t ev_handler, void *user_data), struct mg_connect_opts opts, const char *scheme1, const char *scheme2, const char *scheme_ssl1, const char *scheme_ssl2, const char *url, struct mg_str *path, struct mg_str *user_info, struct mg_str *host) |
static struct mg_http_proto_data * | mg_http_get_proto_data (struct mg_connection *c) |
static void | mg_http_free_proto_data_mp_stream (struct mg_http_multipart_stream *mp) |
static void | mg_http_free_proto_data_file (struct mg_http_proto_data_file *d) |
static void | mg_http_free_proto_data_endpoints (struct mg_http_endpoint **ep) |
static void | mg_http_free_reverse_proxy_data (struct mg_reverse_proxy_data *rpd) |
static struct mg_str | mg_get_mime_type (const char *path, const char *dflt, const struct mg_serve_http_opts *opts) |
static int | mg_http_get_request_len (const char *s, int buf_len) |
static const char * | mg_http_parse_headers (const char *s, const char *end, int len, struct http_message *req) |
int | mg_parse_http (const char *s, int n, struct http_message *hm, int is_req) |
struct mg_str * | mg_get_http_header (struct http_message *hm, const char *name) |
static void | mg_http_transfer_file_data (struct mg_connection *nc) |
static size_t | mg_http_parse_chunk (char *buf, size_t len, char **chunk_data, size_t *chunk_len) |
struct mg_http_endpoint * | mg_http_get_endpoint_handler (struct mg_connection *nc, struct mg_str *uri_path) |
static void | mg_http_multipart_continue (struct mg_connection *nc) |
static void | mg_http_multipart_begin (struct mg_connection *nc, struct http_message *hm, int req_len) |
static void | mg_http_call_endpoint_handler (struct mg_connection *nc, int ev, struct http_message *hm) |
static void | deliver_chunk (struct mg_connection *c, struct http_message *hm, int req_len) |
static void | mg_http_handler2 (struct mg_connection *nc, int ev, void *ev_data MG_UD_ARG(void *user_data), struct http_message *hm) __attribute__((noinline)) |
void | mg_http_handler (struct mg_connection *nc, int ev, void *ev_data MG_UD_ARG(void *user_data)) |
Variables | |
void *(* | test_malloc )(size_t size) |
void *(* | test_calloc )(size_t count, size_t size) |
enum cs_log_level | cs_log_threshold |
enum cs_log_level cs_log_threshold | WEAK |
LL_ERROR = 0 | |
static char * | s_filter_pattern = NULL |
static size_t | s_filter_pattern_len |
const struct mg_iface_vtable | mg_socket_iface_vtable = MG_SOCKET_IFACE_VTABLE |
const struct mg_iface_vtable | mg_socks_iface_vtable |
const struct mg_iface_vtable | mg_default_iface_vtable = MG_NULL_IFACE_VTABLE |
const struct mg_iface_vtable * | mg_ifaces [] |
int | mg_num_ifaces = (int) (sizeof(mg_ifaces) / sizeof(mg_ifaces[0])) |
const struct mg_iface_vtable | mg_null_iface_vtable = MG_NULL_IFACE_VTABLE |
static const char | mg_s_cipher_list [] |
static const char | mg_s_default_dh_params [] |
static const char * | mg_version_header = "Mongoose/" MG_VERSION |
struct { | |
const char * extension | |
size_t ext_len | |
const char * mime_type | |
} | mg_static_builtin_mime_types [] |
typedef int cs_dirent_dummy |
enum cs_log_level |
MG_INTERNAL void altbuf_append | ( | struct altbuf * | ab, |
char | c | ||
) |
References mbuf::len, altbuf::len, altbuf::m, mbuf_append(), altbuf::user_buf, and altbuf::user_buf_size.
Referenced by mg_http_handler2().
MG_INTERNAL char* altbuf_get_buf | ( | struct altbuf * | ab, |
int | trim | ||
) |
References altbuf_reallocated(), mbuf::buf, altbuf::m, mbuf_trim(), and altbuf::user_buf.
Referenced by mg_http_handler2().
MG_INTERNAL void altbuf_init | ( | struct altbuf * | ab, |
char * | buf, | ||
size_t | buf_size | ||
) |
References mbuf::buf, altbuf::len, altbuf::m, mbuf_init(), altbuf::user_buf, and altbuf::user_buf_size.
Referenced by mg_http_handler2().
MG_INTERNAL int altbuf_reallocated | ( | struct altbuf * | ab | ) |
References altbuf::len, and altbuf::user_buf_size.
Referenced by altbuf_get_buf().
MG_INTERNAL void altbuf_reset | ( | struct altbuf * | ab | ) |
References altbuf::len, altbuf::m, and mbuf_free().
Referenced by mg_http_handler2().
|
static |
References char64long16::l.
|
static |
Referenced by cs_md5_final(), and cs_md5_update().
|
static |
References c_snprintf(), c_strnlen(), c_vsnprintf(), and WEAK.
int c_snprintf | ( | char * | buf, |
size_t | buf_size, | ||
const char * | fmt, | ||
... | |||
) |
References c_vsnprintf().
Referenced by c_itoa().
size_t c_strnlen | ( | const char * | s, |
size_t | maxlen | ||
) |
References c_vsnprintf(), and WEAK.
Referenced by c_itoa(), and mg_strstrip().
const char* c_strnstr | ( | const char * | s, |
const char * | find, | ||
size_t | slen | ||
) |
References strdup(), strlen(), and WEAK.
Referenced by mg_http_handler2(), and to_wchar().
int c_vsnprintf | ( | char * | buf, |
size_t | buf_size, | ||
const char * | fmt, | ||
va_list | ap | ||
) |
Referenced by c_itoa(), c_snprintf(), and c_strnlen().
int closedir | ( | DIR * | dir | ) |
References win32_dir::handle, and win32_dir::result.
Referenced by mg_http_handler2().
int cs_base64_decode | ( | const unsigned char * | s, |
int | len, | ||
char * | dst, | ||
int * | dec_len | ||
) |
References from_b64().
Referenced by mg_http_handler2().
|
static |
References cs_base64_ctx::chunk, cs_base64_ctx::chunk_size, and cs_base64_emit_code().
Referenced by cs_base64_finish(), and cs_base64_update().
|
static |
References cs_base64_ctx::b64_putc, and cs_base64_ctx::user_data.
Referenced by cs_base64_emit_chunk().
void cs_base64_encode | ( | const unsigned char * | src, |
int | src_len, | ||
char * | dst | ||
) |
Referenced by mg_http_handler2().
void cs_base64_finish | ( | struct cs_base64_ctx * | ctx | ) |
References cs_base64_ctx::b64_putc, cs_base64_ctx::chunk, cs_base64_ctx::chunk_size, cs_base64_emit_chunk(), and cs_base64_ctx::user_data.
Referenced by mg_http_handler2().
void cs_base64_init | ( | struct cs_base64_ctx * | ctx, |
cs_base64_putc_t | b64_putc, | ||
void * | user_data | ||
) |
References cs_base64_ctx::b64_putc, cs_base64_ctx::chunk_size, and cs_base64_ctx::user_data.
Referenced by mg_http_handler2().
void cs_base64_update | ( | struct cs_base64_ctx * | ctx, |
const char * | str, | ||
size_t | len | ||
) |
References cs_base64_ctx::chunk, cs_base64_ctx::chunk_size, and cs_base64_emit_chunk().
Referenced by mg_http_handler2().
void cs_fprint_base64 | ( | FILE * | f, |
const unsigned char * | src, | ||
int | src_len | ||
) |
void cs_from_hex | ( | char * | to, |
const char * | p, | ||
size_t | len | ||
) |
void cs_hmac_sha1 | ( | const unsigned char * | key, |
size_t | keylen, | ||
const unsigned char * | data, | ||
size_t | datalen, | ||
unsigned char | out[20] | ||
) |
References cs_sha1_final(), cs_sha1_init(), cs_sha1_update(), mbuf_init(), and WEAK.
int cs_log_print_prefix | ( | enum cs_log_level | level, |
const char * | func, | ||
const char * | filename | ||
) |
References cs_log_printf(), cs_time(), fmt, mg_match_prefix(), and WEAK.
Referenced by cs_log_set_filter().
void cs_log_printf | ( | const char * | fmt, |
... | |||
) |
References cs_log_set_file(), LL_NONE, and WEAK.
Referenced by cs_log_print_prefix().
void cs_log_set_file | ( | FILE * | file | ) |
References cs_log_set_filter(), cs_log_set_level(), and WEAK.
Referenced by cs_log_printf().
void cs_log_set_filter | ( | const char * | pattern | ) |
References cs_log_print_prefix(), strdup(), strlen(), and WEAK.
Referenced by cs_log_set_file().
void cs_log_set_level | ( | enum cs_log_level | level | ) |
References cs_time().
Referenced by cs_log_set_file().
void cs_md5_final | ( | unsigned char | digest[16], |
cs_md5_ctx * | ctx | ||
) |
References cs_md5_ctx::bits, cs_md5_ctx::buf, byteReverse(), cs_md5_transform(), and cs_md5_ctx::in.
Referenced by mg_http_handler2().
void cs_md5_init | ( | cs_md5_ctx * | ctx | ) |
References cs_md5_ctx::bits, and cs_md5_ctx::buf.
Referenced by mg_http_handler2().
Referenced by cs_md5_final(), and cs_md5_update().
void cs_md5_update | ( | cs_md5_ctx * | ctx, |
const unsigned char * | buf, | ||
size_t | len | ||
) |
References cs_md5_ctx::bits, cs_md5_ctx::buf, byteReverse(), cs_md5_transform(), and cs_md5_ctx::in.
Referenced by mg_http_handler2().
void cs_sha1_final | ( | unsigned char | digest[20], |
cs_sha1_ctx * | context | ||
) |
References char64long16::c, cs_sha1_ctx::count, cs_sha1_update(), and cs_sha1_ctx::state.
Referenced by cs_hmac_sha1(), and mg_http_handler2().
void cs_sha1_init | ( | cs_sha1_ctx * | context | ) |
References cs_sha1_ctx::count, and cs_sha1_ctx::state.
Referenced by cs_hmac_sha1(), and mg_http_handler2().
void cs_sha1_transform | ( | uint32_t | state[5], |
const unsigned char | buffer[64] | ||
) |
References char64long16::c.
Referenced by cs_sha1_update().
void cs_sha1_update | ( | cs_sha1_ctx * | context, |
const unsigned char * | data, | ||
uint32_t | len | ||
) |
References cs_sha1_ctx::buffer, cs_sha1_ctx::count, cs_sha1_transform(), and cs_sha1_ctx::state.
Referenced by cs_hmac_sha1(), cs_sha1_final(), and mg_http_handler2().
double cs_time | ( | void | ) |
References gettimeofday(), timeval::tv_sec, and timeval::tv_usec.
Referenced by cs_log_print_prefix(), cs_log_set_level(), mg_socks_if_poll(), and mg_time().
double cs_timegm | ( | const struct tm * | tm | ) |
int64_t cs_to64 | ( | const char * | s | ) |
Referenced by cs_from_hex().
void cs_to_hex | ( | char * | to, |
const unsigned char * | p, | ||
size_t | len | ||
) |
Referenced by mg_http_handler2(), and strdup().
|
static |
|
static |
References cs_from_hex(), and WEAK.
Referenced by cs_from_hex().
|
static |
Referenced by cs_base64_decode().
|
static |
Referenced by parse_net().
size_t mbuf_append | ( | struct mbuf * | a, |
const void * | buf, | ||
size_t | len | ||
) |
References mbuf::len, mbuf_insert(), mbuf_remove(), and WEAK.
Referenced by altbuf_append(), mbuf_insert(), mg_assemble_uri(), mg_http_handler2(), mg_recv_udp(), mg_send(), mg_set_cipher_list(), mg_socks_if_tcp_send(), and mg_ssl_if_ossl_set_psk().
void mbuf_free | ( | struct mbuf * | mbuf | ) |
References mbuf::buf, mbuf_init(), mbuf_resize(), and WEAK.
Referenced by altbuf_reset(), mbuf_init(), mg_assemble_uri(), mg_destroy_conn(), mg_http_handler2(), mg_recv_udp(), and mg_ssl_if_conn_free().
void mbuf_init | ( | struct mbuf * | mbuf, |
size_t | initial_size | ||
) |
References mbuf::buf, mbuf::len, mbuf_free(), mbuf_resize(), mbuf::size, and WEAK.
Referenced by altbuf_init(), cs_hmac_sha1(), mbuf_free(), mg_assemble_uri(), mg_http_handler2(), and mg_ssl_if_conn_init().
size_t mbuf_insert | ( | struct mbuf * | a, |
size_t | off, | ||
const void * | buf, | ||
size_t | len | ||
) |
References mbuf::buf, mbuf::len, mbuf_append(), mbuf::size, and WEAK.
Referenced by mbuf_append(), mbuf_trim(), and mg_http_handler2().
void mbuf_remove | ( | struct mbuf * | mb, |
size_t | n | ||
) |
References mbuf::buf, mbuf::len, mg_ncasecmp(), and WEAK.
Referenced by mbuf_append(), mg_forward(), mg_http_handler2(), mg_http_transfer_file_data(), mg_if_can_send_cb(), mg_socks_if_tcp_recv(), and socks_if_handler().
void mbuf_resize | ( | struct mbuf * | a, |
size_t | new_size | ||
) |
References mbuf::buf, mbuf::len, mbuf_trim(), mbuf::size, and WEAK.
Referenced by mbuf_free(), mbuf_init(), mbuf_trim(), and mg_do_recv().
void mbuf_trim | ( | struct mbuf * | mbuf | ) |
References mbuf::len, mbuf_insert(), mbuf_resize(), and WEAK.
Referenced by altbuf_get_buf(), mbuf_resize(), mg_http_handler2(), mg_if_can_send_cb(), mg_recv_tcp(), mg_recv_udp(), and mg_set_cipher_list().
|
static |
References inet_ntoa(), mg_get_errno(), mg_if_accept_new_conn(), mg_if_accept_tcp_cb(), mg_is_error(), mg_sock_set(), socket_address::sa, socket_address::sin, and mg_connection::sock.
Referenced by mg_http_handler2(), and mg_mgr_handle_conn().
MG_INTERNAL void mg_add_conn | ( | struct mg_mgr * | mgr, |
struct mg_connection * | c | ||
) |
References mg_mgr::active_connections, mg_iface_vtable::add_conn, mg_connection::iface, mg_connection::mgr, mg_connection::next, mg_connection::prev, mg_connection::sock, and mg_iface::vtable.
Referenced by mg_add_sock_opt(), mg_bind_opt(), mg_do_connect(), mg_if_accept_new_conn(), and mg_recv_udp().
struct mg_connection* mg_add_sock | ( | struct mg_mgr * | s, |
sock_t | sock, | ||
MG_CB(mg_event_handler_t callback, void *user_data) | |||
) |
References mg_add_sock_opt().
Referenced by mg_http_handler2().
struct mg_connection* mg_add_sock_opt | ( | struct mg_mgr * | s, |
sock_t | sock, | ||
MG_CB(mg_event_handler_t callback, void *user_data) | , | ||
struct mg_add_sock_opts | opts | ||
) |
References mg_add_conn(), mg_create_connection_base(), mg_sock_set(), mg_connection::mgr, mg_connection::user_data, and mg_add_sock_opts::user_data.
Referenced by mg_add_sock().
References mg_connection::sock.
Referenced by mg_socket_if_poll().
int mg_asprintf | ( | char ** | buf, |
size_t | size, | ||
const char * | fmt, | ||
... | |||
) |
References mg_avprintf(), and WEAK.
Referenced by mg_casecmp(), and mg_http_handler2().
int mg_assemble_uri | ( | const struct mg_str * | scheme, |
const struct mg_str * | user_info, | ||
const struct mg_str * | host, | ||
unsigned int | port, | ||
const struct mg_str * | path, | ||
const struct mg_str * | query, | ||
const struct mg_str * | fragment, | ||
int | normalize_path, | ||
struct mg_str * | uri | ||
) |
References mbuf::buf, mg_str::len, mbuf::len, mbuf_append(), mbuf_free(), mbuf_init(), mg_normalize_uri_path(), mg_strdup(), and mg_str::p.
int mg_avprintf | ( | char ** | buf, |
size_t | size, | ||
const char * | fmt, | ||
va_list | ap | ||
) |
Referenced by mg_asprintf(), mg_http_handler2(), and mg_vprintf().
struct mg_connection* mg_bind | ( | struct mg_mgr * | srv, |
const char * | address, | ||
MG_CB(mg_event_handler_t event_handler, void *user_data) | |||
) |
References mg_bind_opt().
struct mg_connection* mg_bind_opt | ( | struct mg_mgr * | mgr, |
const char * | address, | ||
MG_CB(mg_event_handler_t callback, void *user_data) | , | ||
struct mg_bind_opts | opts | ||
) |
References mg_ssl_if_conn_params::ca_cert, mg_ssl_if_conn_params::cert, mg_ssl_if_conn_params::cipher_suites, mg_bind_opts::error_string, mg_connection::flags, mg_connection::iface, mg_ssl_if_conn_params::key, mg_iface_vtable::listen_tcp, mg_iface_vtable::listen_udp, mg_add_conn(), mg_create_connection(), mg_destroy_conn(), mg_parse_address(), mg_ssl_if_conn_init(), MG_SSL_OK, mg_connection::mgr, mg_connection::sa, mg_bind_opts::ssl_ca_cert, mg_bind_opts::ssl_cert, mg_bind_opts::ssl_cipher_suites, mg_bind_opts::ssl_key, mg_add_sock_opts::user_data, mg_bind_opts::user_data, and mg_iface::vtable.
Referenced by mg_bind().
void mg_broadcast | ( | struct mg_mgr * | mgr, |
mg_event_handler_t | cb, | ||
void * | data, | ||
size_t | len | ||
) |
References ctl_msg::callback, mg_mgr::ctl, and ctl_msg::message.
MG_INTERNAL void mg_call | ( | struct mg_connection * | nc, |
mg_event_handler_t | ev_handler, | ||
void * | user_data, | ||
int | ev, | ||
void * | ev_data | ||
) |
References mg_connection::flags, mg_connection::handler, mg_mgr::hexdump_file, mbuf::len, mg_hexdump_connection(), mg_connection::mgr, mg_mgr::num_calls, mg_connection::proto_handler, mg_connection::recv_mbuf, and mg_connection::send_mbuf.
Referenced by deliver_chunk(), mg_close_conn(), mg_handle_chunked(), mg_http_handler2(), mg_if_accept_tcp_cb(), mg_if_can_send_cb(), mg_if_connect_cb(), mg_if_poll(), mg_recv_tcp(), mg_recv_udp(), mg_ssl_handshake(), mg_timer(), and resolve_cb().
int mg_casecmp | ( | const char * | s1, |
const char * | s2 | ||
) |
References mg_asprintf(), mg_ncasecmp(), and WEAK.
Referenced by mg_get_mime_type(), and mg_ncasecmp().
int mg_check_ip_acl | ( | const char * | acl, |
uint32_t | remote_ip | ||
) |
References mg_next_comma_list_entry(), mg_str::p, and parse_net().
Referenced by mg_http_handler2().
void mg_close_conn | ( | struct mg_connection * | conn | ) |
References mg_iface_vtable::destroy_conn, mg_connection::flags, mg_connection::iface, mg_call(), mg_destroy_conn(), mg_remove_conn(), mg_ssl_if_conn_close_notify(), mg_connection::user_data, and mg_iface::vtable.
Referenced by mg_http_handler2(), mg_if_accept_tcp_cb(), mg_if_poll(), and mg_mgr_free().
struct mg_connection* mg_connect | ( | struct mg_mgr * | mgr, |
const char * | address, | ||
MG_CB(mg_event_handler_t callback, void *user_data) | |||
) |
References mg_connect_opt().
Referenced by mg_http_handler2(), and mg_socks_if_connect_tcp().
struct mg_connection* mg_connect_http_base | ( | struct mg_mgr * | mgr, |
MG_CB(mg_event_handler_t ev_handler, void *user_data) | , | ||
struct mg_connect_opts | opts, | ||
const char * | scheme1, | ||
const char * | scheme2, | ||
const char * | scheme_ssl1, | ||
const char * | scheme_ssl2, | ||
const char * | url, | ||
struct mg_str * | path, | ||
struct mg_str * | user_info, | ||
struct mg_str * | host | ||
) |
Referenced by mg_http_handler2().
struct mg_connection* mg_connect_opt | ( | struct mg_mgr * | mgr, |
const char * | address, | ||
MG_CB(mg_event_handler_t callback, void *user_data) | , | ||
struct mg_connect_opts | opts | ||
) |
References mg_ssl_if_conn_params::ca_cert, mg_ssl_if_conn_params::cert, mg_ssl_if_conn_params::cipher_suites, mg_resolve_async_opts::dns_conn, mg_connect_opts::error_string, mg_connection::flags, mg_connect_opts::flags, mg_ssl_if_conn_params::key, LL_DEBUG, mg_create_connection(), mg_destroy_conn(), mg_do_connect(), mg_parse_address(), mg_resolve_async_opt(), mg_ssl_if_conn_init(), MG_SSL_OK, mg_connection::mgr, mg_connect_opts::nameserver, mg_resolve_async_opts::nameserver, mg_connection::priv_2, mg_ssl_if_conn_params::psk_identity, mg_ssl_if_conn_params::psk_key, resolve_cb(), mg_connection::sa, mg_ssl_if_conn_params::server_name, mg_connect_opts::ssl_ca_cert, mg_connect_opts::ssl_cert, mg_connect_opts::ssl_cipher_suites, mg_connect_opts::ssl_key, mg_connect_opts::ssl_psk_identity, mg_connect_opts::ssl_psk_key, mg_connect_opts::ssl_server_name, mg_connection::user_data, mg_add_sock_opts::user_data, and mg_connect_opts::user_data.
Referenced by mg_connect(), and mg_http_handler2().
MG_INTERNAL struct mg_connection * mg_create_connection | ( | struct mg_mgr * | mgr, |
mg_event_handler_t | callback, | ||
struct mg_add_sock_opts | opts | ||
) |
References mg_iface_vtable::create_conn, mg_add_sock_opts::error_string, mg_connection::iface, mg_create_connection_base(), and mg_iface::vtable.
Referenced by mg_bind_opt(), mg_connect_opt(), and mg_if_accept_new_conn().
MG_INTERNAL struct mg_connection* mg_create_connection_base | ( | struct mg_mgr * | mgr, |
mg_event_handler_t | callback, | ||
struct mg_add_sock_opts | opts | ||
) |
References ctl_msg::callback, mg_add_sock_opts::error_string, mg_connection::flags, mg_add_sock_opts::flags, mg_connection::handler, mg_connection::iface, mg_add_sock_opts::iface, mg_mgr::ifaces, mg_connection::last_io_time, mg_time(), mg_connection::mgr, mg_connection::recv_mbuf_limit, mg_connection::sock, mg_connection::user_data, and mg_add_sock_opts::user_data.
Referenced by mg_add_sock_opt(), mg_create_connection(), and mg_recv_udp().
void mg_destroy_conn | ( | struct mg_connection * | conn, |
int | destroy_if | ||
) |
References mg_iface_vtable::destroy_conn, mg_connection::flags, mg_connection::iface, LL_DEBUG, mbuf_free(), mg_ssl_if_conn_free(), mg_connection::proto_data, mg_connection::proto_data_destructor, mg_connection::recv_mbuf, mg_connection::send_mbuf, mg_connection::sock, and mg_iface::vtable.
Referenced by mg_bind_opt(), mg_close_conn(), mg_connect_opt(), and resolve_cb().
MG_INTERNAL struct mg_connection * mg_do_connect | ( | struct mg_connection * | nc, |
int | proto, | ||
union socket_address * | sa | ||
) |
References mg_iface_vtable::connect_tcp, mg_iface_vtable::connect_udp, mg_connection::flags, mg_connection::iface, inet_ntoa(), LL_DEBUG, mg_add_conn(), mg_connection::mgr, socket_address::sin, and mg_iface::vtable.
Referenced by mg_connect_opt(), and resolve_cb().
|
static |
References mbuf::buf, mg_connection::flags, mbuf::len, mbuf_resize(), mg_recv_tcp(), mg_recv_udp(), recv_avail_size(), mg_connection::recv_mbuf, and mbuf::size.
Referenced by mg_if_can_recv_cb(), mg_if_poll(), and recv_avail_size().
struct mg_iface* mg_find_iface | ( | struct mg_mgr * | mgr, |
const struct mg_iface_vtable * | vtable, | ||
struct mg_iface * | from | ||
) |
References mg_mgr::ifaces, mg_mgr::num_ifaces, and mg_iface::vtable.
void mg_forward | ( | struct mg_connection * | from, |
struct mg_connection * | to | ||
) |
References mbuf::buf, mbuf::len, mbuf_remove(), mg_send(), and mg_connection::recv_mbuf.
Referenced by mg_http_handler2(), and mg_http_transfer_file_data().
MG_INTERNAL int mg_get_errno | ( | void | ) |
struct mg_str* mg_get_http_header | ( | struct http_message * | hm, |
const char * | name | ||
) |
References http_message::header_names, http_message::header_values, mg_str::len, mg_ncasecmp(), mg_str::p, and strlen().
Referenced by mg_http_handler2().
|
static |
References ext_len, extension, mg_str::len, mg_casecmp(), mg_next_comma_list_entry(), mg_static_builtin_mime_types, mg_vcasecmp(), mg_str::p, and strlen().
Referenced by mg_http_handler2().
MG_INTERNAL void mg_handle_cgi | ( | struct mg_connection * | nc, |
const char * | prog, | ||
const struct mg_str * | path_info, | ||
const struct http_message * | hm, | ||
const struct mg_serve_http_opts * | opts | ||
) |
Referenced by mg_http_handler2().
MG_INTERNAL size_t mg_handle_chunked | ( | struct mg_connection * | nc, |
struct http_message * | hm, | ||
char * | buf, | ||
size_t | blen | ||
) |
References http_message::body, mg_http_proto_data_chuncked::body_len, mg_http_proto_data::chunk, mg_connection::flags, mg_connection::handler, mg_str::len, mbuf::len, http_message::message, mg_call(), mg_http_get_proto_data(), mg_http_parse_chunk(), mg_str::p, mg_connection::recv_mbuf, and mg_connection::user_data.
Referenced by mg_http_handler2().
MG_INTERNAL void mg_handle_delete | ( | struct mg_connection * | nc, |
const struct mg_serve_http_opts * | opts, | ||
const char * | path | ||
) |
Referenced by mg_http_handler2().
MG_INTERNAL void mg_handle_lock | ( | struct mg_connection * | nc, |
const char * | path | ||
) |
Referenced by mg_http_handler2().
MG_INTERNAL void mg_handle_mkcol | ( | struct mg_connection * | nc, |
const char * | path, | ||
struct http_message * | hm | ||
) |
Referenced by mg_http_handler2().
MG_INTERNAL void mg_handle_move | ( | struct mg_connection * | c, |
const struct mg_serve_http_opts * | opts, | ||
const char * | path, | ||
struct http_message * | hm | ||
) |
Referenced by mg_http_handler2().
MG_INTERNAL void mg_handle_propfind | ( | struct mg_connection * | nc, |
const char * | path, | ||
cs_stat_t * | stp, | ||
struct http_message * | hm, | ||
struct mg_serve_http_opts * | opts | ||
) |
Referenced by mg_http_handler2().
MG_INTERNAL void mg_handle_put | ( | struct mg_connection * | nc, |
const char * | path, | ||
struct http_message * | hm | ||
) |
Referenced by mg_http_handler2().
MG_INTERNAL void mg_handle_ssi_request | ( | struct mg_connection * | nc, |
struct http_message * | hm, | ||
const char * | path, | ||
const struct mg_serve_http_opts * | opts | ||
) |
Referenced by mg_http_handler2().
|
static |
Referenced by mg_http_get_endpoint_handler(), and mg_http_handler2().
|
static |
References mg_http_proto_data::cgi, mg_http_proto_data::endpoints, mg_http_proto_data::file, mg_http_free_proto_data_cgi(), mg_http_free_proto_data_endpoints(), mg_http_free_proto_data_file(), mg_http_free_proto_data_mp_stream(), mg_http_free_reverse_proxy_data(), mg_http_proto_data::mp_stream, and mg_http_proto_data::reverse_proxy_data.
Referenced by mg_http_get_proto_data(), and mg_http_handler2().
MG_INTERNAL void mg_http_free_proto_data_cgi | ( | struct mg_http_proto_data_cgi * | d | ) |
Referenced by mg_http_conn_destructor(), and mg_http_handler2().
|
static |
References mg_http_endpoint::auth_domain, mg_http_endpoint::auth_file, mg_http_endpoint::next, mg_str::p, and mg_http_endpoint::uri_pattern.
Referenced by mg_http_conn_destructor().
|
static |
References mg_http_proto_data_file::fp.
Referenced by mg_http_conn_destructor(), mg_http_handler2(), and mg_http_transfer_file_data().
|
static |
References mg_http_multipart_stream::boundary, mg_http_multipart_stream::file_name, and mg_http_multipart_stream::var_name.
Referenced by mg_http_conn_destructor(), and mg_http_handler2().
|
static |
References mg_connection::flags, mg_reverse_proxy_data::linked_conn, mg_http_get_proto_data(), and mg_http_proto_data::reverse_proxy_data.
Referenced by mg_http_conn_destructor().
struct mg_http_endpoint* mg_http_get_endpoint_handler | ( | struct mg_connection * | nc, |
struct mg_str * | uri_path | ||
) |
|
static |
|
static |
Referenced by mg_http_handler2(), and mg_parse_http().
void mg_http_handler | ( | struct mg_connection * | nc, |
int | ev, | ||
void *ev_data | MG_UD_ARGvoid *user_data | ||
) |
References mg_http_handler2().
Referenced by mg_http_handler2().
|
static |
References _stat(), _wstati64(), mg_mgr::active_connections, altbuf_append(), altbuf_get_buf(), altbuf_init(), altbuf_reset(), mg_dns_message::answers, mg_ssi_call_ctx::arg, asprintf(), mg_serve_http_opts::auth_domain, mg_http_endpoint_opts::auth_domain, mg_http_endpoint::auth_domain, mg_http_endpoint_opts::auth_file, mg_http_endpoint::auth_file, http_message::body, mg_http_multipart_stream::boundary, mg_http_multipart_stream::boundary_len, mg_mqtt_session::brk, mbuf::buf, c_strnstr(), mg_ssl_if_conn_params::ca_cert, ctl_msg::callback, mg_ssl_if_conn_params::cert, mg_http_proto_data::cgi, mg_serve_http_opts::cgi_file_pattern, mg_serve_http_opts::cgi_interpreter, mg_http_proto_data_cgi::cgi_nc, mg_http_proto_data_file::cl, mg_mqtt_message::client_id, closedir(), mg_mqtt_message::cmd, mg_coap_message::code_class, mg_coap_message::code_detail, mg_mqtt_message::connack_ret_code, mg_mqtt_message::connect_flags, cs_base64_decode(), cs_base64_encode(), cs_base64_finish(), cs_base64_init(), cs_base64_update(), cs_md5_final(), cs_md5_init(), cs_md5_update(), cs_sha1_final(), cs_sha1_init(), cs_sha1_update(), cs_to_hex(), dirent::d_name, mg_iface::data, websocket_message::data, mg_http_multipart_part::data, DATA_FILE, DATA_PUT, mg_serve_http_opts::dav_auth_file, mg_serve_http_opts::dav_document_root, deliver_chunk(), mg_resolve_async_opts::dns_conn, mg_serve_http_opts::document_root, mg_serve_http_opts::enable_directory_listing, mg_http_proto_data::endpoint_handler, mg_http_proto_data::endpoints, mg_connection::err, mg_connect_opts::error_string, mg_connection::ev_timer_time, mg_serve_http_opts::extra_headers, mg_ssi_call_ctx::file, mg_http_proto_data::file, mg_http_multipart_part::file_name, mg_http_multipart_stream::file_name, mg_connection::flags, websocket_message::flags, mg_send_mqtt_handshake_opts::flags, mg_dns_message::flags, mg_coap_message::flags, mg_http_proto_data_file::fp, fsize(), getenv(), gettimeofday(), mg_serve_http_opts::global_auth_file, mg_connection::handler, mg_http_endpoint::handler, http_message::header_names, http_message::header_values, mg_serve_http_opts::hidden_file_pattern, mg_connection::iface, mg_mgr::ifaces, mg_serve_http_opts::index_files, inet_ntoa(), inet_ntop(), inet_pton(), mg_dns_reply::io, mg_serve_http_opts::ip_acl, mg_send_mqtt_handshake_opts::keep_alive, mg_mqtt_proto_data::keep_alive, mg_mqtt_message::keep_alive_timer, mg_http_proto_data_file::keepalive, mg_ssl_if_conn_params::key, mg_dns_resource_record::kind, mg_sntp_message::kiss_of_death, mg_mqtt_proto_data::last_control_time, mg_connection::last_io_time, mg_str::len, mbuf::len, mg_mqtt_message::len, altbuf::len, mg_reverse_proxy_data::linked_conn, mg_connection::listener, LL_DEBUG, LL_ERROR, LL_INFO, mg_resolve_async_opts::max_retries, mbuf_append(), mbuf_free(), mbuf_init(), mbuf_insert(), mbuf_remove(), mbuf_trim(), http_message::message, mg_mqtt_message::message_id, http_message::method, mg_accept_conn(), mg_add_sock(), mg_asprintf(), mg_avprintf(), mg_base64_decode(), mg_base64_encode(), mg_basic_auth_header(), mg_call(), mg_check_digest_auth(), mg_check_ip_acl(), mg_close_conn(), mg_coap_add_option(), mg_coap_compose(), mg_coap_free_options(), mg_coap_parse(), mg_coap_send_ack(), mg_coap_send_message(), mg_conn_addr_to_str(), mg_connect(), mg_connect_http(), mg_connect_http_base(), mg_connect_http_opt(), mg_connect_opt(), mg_connect_ws(), mg_connect_ws_opt(), MG_DNS_ANSWER, mg_dns_copy_questions(), mg_dns_encode_name(), mg_dns_encode_record(), mg_dns_insert_header(), MG_DNS_INVALID_RECORD, mg_dns_next_record(), mg_dns_parse_record_data(), MG_DNS_QUESTION, mg_dns_reply_record(), mg_dns_send_reply(), mg_dns_uncompress_name(), mg_file_upload_handler(), mg_fopen(), mg_forward(), mg_fread(), mg_fwrite(), mg_get_errno(), mg_get_http_basic_auth(), mg_get_http_header(), mg_get_http_var(), mg_get_mime_type(), mg_handle_cgi(), mg_handle_chunked(), mg_handle_delete(), mg_handle_lock(), mg_handle_mkcol(), mg_handle_move(), mg_handle_propfind(), mg_handle_put(), mg_handle_ssi_request(), mg_hash_md5_v(), mg_hash_sha1_v(), mg_hexdump(), mg_hexdump_connection(), mg_hexdumpf(), mg_http_call_endpoint_handler(), mg_http_check_digest_auth(), mg_http_conn_destructor(), mg_http_create_digest_auth_header(), mg_http_free_proto_data_cgi(), mg_http_free_proto_data_file(), mg_http_free_proto_data_mp_stream(), mg_http_get_endpoint_handler(), mg_http_get_proto_data(), mg_http_get_request_len(), mg_http_handler(), mg_http_is_authorized(), mg_http_multipart_begin(), mg_http_multipart_continue(), mg_http_parse_header(), mg_http_parse_header2(), mg_http_parse_headers(), mg_http_reverse_proxy(), mg_http_send_digest_auth_request(), mg_http_send_error(), mg_http_send_redirect(), mg_http_serve_file(), mg_http_transfer_file_data(), mg_if_accept_new_conn(), mg_if_accept_tcp_cb(), mg_if_can_recv_cb(), mg_if_can_send_cb(), mg_if_connect_cb(), mg_if_get_conn_addr(), mg_if_poll(), mg_is_big_endian(), mg_is_dav_request(), mg_is_error(), mg_is_not_modified(), mg_lwip_set_keepalive_params(), mg_match_prefix(), mg_match_prefix_n(), mg_mbuf_append_base64(), mg_mbuf_append_base64_putc(), mg_mgr_handle_conn(), mg_mgr_init(), mg_mgr_poll(), mg_mk_str(), mg_mk_str_n(), mg_mqtt_broker(), mg_mqtt_broker_init(), mg_mqtt_connack(), mg_mqtt_disconnect(), mg_mqtt_match_topic_expression(), mg_mqtt_next(), mg_mqtt_next_subscribe_topic(), mg_mqtt_ping(), mg_mqtt_pong(), mg_mqtt_puback(), mg_mqtt_pubcomp(), mg_mqtt_publish(), mg_mqtt_pubrec(), mg_mqtt_pubrel(), mg_mqtt_suback(), mg_mqtt_subscribe(), mg_mqtt_unsuback(), mg_mqtt_unsubscribe(), mg_mqtt_vmatch_topic_expression(), mg_ncasecmp(), mg_next(), mg_next_comma_list_entry(), mg_normalize_uri_path(), mg_open(), mg_open_listening_socket(), mg_parse_date_string(), mg_parse_dns(), mg_parse_http(), mg_parse_http_basic_auth(), mg_parse_multipart(), mg_parse_uri(), mg_printf(), mg_printf_html_escape(), mg_printf_http_chunk(), mg_printf_websocket_frame(), mg_register_http_endpoint(), mg_register_http_endpoint_opt(), mg_resolve_async(), mg_resolve_async_opt(), MG_RESOLVE_EXCEEDED_RETRY_COUNT, mg_resolve_from_hosts_file(), MG_RESOLVE_NO_ANSWERS, MG_RESOLVE_OK, MG_RESOLVE_TIMEOUT, mg_run_in_task(), mg_send(), mg_send_dns_query(), mg_send_head(), mg_send_http_chunk(), mg_send_mqtt_handshake(), mg_send_mqtt_handshake_opt(), mg_send_response_line(), mg_send_websocket_frame(), mg_send_websocket_framev(), mg_send_websocket_handshake(), mg_send_websocket_handshake2(), mg_send_websocket_handshake3(), mg_send_websocket_handshake3v(), mg_serve_http(), mg_set_close_on_exec(), mg_set_nameserver(), mg_set_non_blocking_mode(), mg_set_protocol_coap(), mg_set_protocol_dns(), mg_set_protocol_http_websocket(), mg_set_protocol_mqtt(), mg_set_protocol_socks(), mg_set_timer(), mg_skip(), mg_sntp_connect(), mg_sntp_get_time(), mg_sntp_parse_reply(), mg_sntp_send_request(), mg_sock_addr_to_str(), mg_sock_set(), mg_sock_to_str(), mg_socketpair(), MG_SOCKS_ADDR_DOMAIN, MG_SOCKS_ADDR_IPV4, MG_SOCKS_ADDR_IPV6, MG_SOCKS_ADDR_NOT_SUPPORTED, MG_SOCKS_CMD_CONNECT, MG_SOCKS_CMD_NOT_SUPPORTED, MG_SOCKS_HANDSHAKE_FAILURE, MG_SOCKS_HANDSHAKE_NOAUTH, MG_SOCKS_SUCCESS, MG_SSL_ERROR, mg_ssl_if_conn_accept(), mg_ssl_if_conn_close_notify(), mg_ssl_if_conn_free(), mg_ssl_if_conn_init(), mg_ssl_if_handshake(), mg_ssl_if_init(), mg_ssl_if_read(), mg_ssl_if_write(), MG_SSL_OK, mg_start_task(), mg_start_thread(), mg_stat(), mg_strchr(), mg_strdup(), mg_strncmp(), mg_time(), mg_uri_to_local_path(), mg_url_decode(), mg_url_encode(), mg_url_encode_opt(), mg_vcasecmp(), mg_vcmp(), mg_ws_handler(), mg_ws_handshake(), mg_iface::mgr, mg_connection::mgr, mime_type, mg_http_proto_data::mp_stream, MPS_BEGIN, MPS_FINALIZE, MPS_FINISHED, MPS_GOT_BOUNDARY, MPS_WAITING_FOR_BOUNDARY, MPS_WAITING_FOR_CHUNK, mg_dns_reply::msg, mg_coap_message::msg_id, mg_coap_message::msg_type, mg_dns_resource_record::name, mg_mgr::nameserver, mg_resolve_async_opts::nameserver, mg_mqtt_session::nc, mg_connection::next, mg_http_endpoint::next, mg_coap_option::next, mg_dns_message::num_answers, mg_dns_message::num_questions, mg_mqtt_session::num_subscriptions, mg_coap_option::number, open(), opendir(), mg_coap_message::optiomg_tail, mg_coap_message::options, mg_str::p, parse_mqtt(), parse_uri_component(), mg_mqtt_message::password, mg_send_mqtt_handshake_opts::password, mg_mqtt_message::payload, mg_coap_message::payload, mg_serve_http_opts::per_directory_auth_file, mg_dns_message::pkt, mg_connection::priv_2, mg_http_multipart_stream::processing_part, http_message::proto, mg_connection::proto_data, mg_connection::proto_data_destructor, mg_connection::proto_handler, mg_mqtt_message::protocol_name, mg_mqtt_message::protocol_version, mg_mqtt_message::qos, mg_mqtt_topic_expression::qos, http_message::query_string, mg_dns_message::questions, mg_dns_resource_record::rclass, mg_http_proto_data::rcvd, mg_dns_resource_record::rdata, readdir(), mg_ws_proto_data::reass_len, mg_connection::recv_mbuf, mg_connection::recv_mbuf_limit, mg_ssi_call_ctx::req, mg_http_proto_data::reverse_proxy_data, mg_dns_resource_record::rtype, socket_address::sa, mg_connection::sa, mg_connection::send_mbuf, mg_ssl_if_conn_params::server_name, socket_address::sin, socket_address::sin6, websocket_message::size, sl_fs_init(), sl_restart_cb(), sl_set_ssl_opts(), slfs_open(), mg_connection::sock, mg_serve_http_opts::ssi_pattern, mg_connect_opts::ssl_ca_cert, mg_connection::ssl_if_data, stat::st_ino, stat::st_mode, _stati64::st_mode, _stati64::st_mtime, stat::st_nlink, stat::st_size, _stati64::st_size, mg_dns_reply::start, stat(), mg_http_multipart_stream::state, mg_http_multipart_part::status, strdup(), strerror(), strlen(), mg_mqtt_session::subscriptions, mg_iface_vtable::tcp_recv, mg_iface_vtable::tcp_send, mg_sntp_message::time, mg_resolve_async_opts::timeout, to_wchar(), mg_coap_message::token, mg_mqtt_message::topic, mg_mqtt_topic_expression::topic, mg_dns_message::transaction_id, mg_dns_resource_record::ttl, timeval::tv_sec, timeval::tv_usec, mg_http_proto_data_file::type, http_message::uri, mg_http_endpoint::uri_pattern, mg_serve_http_opts::url_rewrites, mg_connection::user_data, mg_http_multipart_part::user_data, mg_http_endpoint_opts::user_data, mg_http_endpoint::user_data, mg_http_multipart_stream::user_data, mg_mqtt_broker::user_data, mg_mqtt_message::user_name, mg_send_mqtt_handshake_opts::user_name, mg_coap_option::value, mg_http_multipart_part::var_name, mg_http_multipart_stream::var_name, mg_iface::vtable, mg_mqtt_message::will_message, mg_send_mqtt_handshake_opts::will_message, mg_mqtt_message::will_topic, mg_send_mqtt_handshake_opts::will_topic, and mg_http_proto_data::ws_data.
Referenced by deliver_chunk(), and mg_http_handler().
|
static |
Referenced by mg_http_get_endpoint_handler(), and mg_http_handler2().
|
static |
Referenced by mg_http_get_endpoint_handler(), and mg_http_handler2().
|
static |
Referenced by mg_handle_chunked().
|
static |
References http_message::body, http_message::header_names, http_message::header_values, mg_str::len, http_message::message, mg_ncasecmp(), mg_skip(), and mg_str::p.
Referenced by mg_http_handler2(), and mg_parse_http().
|
static |
References mbuf::buf, mg_http_proto_data::cgi, mg_http_proto_data_cgi::cgi_nc, mg_http_proto_data_file::cl, DATA_FILE, mg_http_proto_data::file, mg_connection::flags, mg_http_proto_data_file::fp, mg_http_proto_data_file::keepalive, mbuf::len, LL_DEBUG, mbuf_remove(), mg_forward(), mg_fread(), mg_fwrite(), mg_http_free_proto_data_file(), mg_http_get_proto_data(), mg_send(), mg_connection::recv_mbuf, mg_connection::send_mbuf, mg_http_proto_data_file::sent, and mg_http_proto_data_file::type.
Referenced by mg_http_handler2().
struct mg_connection* mg_if_accept_new_conn | ( | struct mg_connection * | lc | ) |
References mg_connection::flags, mg_connection::handler, mg_connection::iface, mg_connection::listener, LL_DEBUG, mg_add_conn(), mg_create_connection(), mg_connection::mgr, mg_connection::proto_handler, mg_connection::recv_mbuf_limit, mg_connection::sock, and mg_connection::user_data.
Referenced by mg_accept_conn(), and mg_http_handler2().
void mg_if_accept_tcp_cb | ( | struct mg_connection * | nc, |
union socket_address * | sa, | ||
size_t | sa_len | ||
) |
References mg_connection::flags, inet_ntoa(), mg_connection::listener, LL_DEBUG, mg_call(), mg_close_conn(), mg_ssl_handshake(), mg_ssl_if_conn_accept(), MG_SSL_OK, mg_connection::sa, socket_address::sin, and mg_connection::user_data.
Referenced by mg_accept_conn(), and mg_http_handler2().
void mg_if_can_recv_cb | ( | struct mg_connection * | nc | ) |
References mg_do_recv().
Referenced by mg_http_handler2(), mg_mgr_handle_conn(), and socks_if_relay().
void mg_if_can_send_cb | ( | struct mg_connection * | nc | ) |
References mbuf::buf, mg_connection::flags, mg_mgr::hexdump_file, mg_connection::iface, mg_connection::last_io_time, mbuf::len, mbuf_remove(), mbuf_trim(), mg_call(), mg_hexdump_connection(), mg_ssl_handshake(), mg_ssl_if_write(), MG_SSL_WANT_WRITE, mg_time(), mg_connection::mgr, mg_connection::send_mbuf, mg_iface_vtable::tcp_send, mg_iface_vtable::udp_send, mg_connection::user_data, and mg_iface::vtable.
Referenced by mg_http_handler2(), mg_mgr_handle_conn(), and socks_if_relay().
void mg_if_connect_cb | ( | struct mg_connection * | nc, |
int | err | ||
) |
References mg_connection::flags, inet_ntoa(), LL_DEBUG, mg_call(), mg_ssl_handshake(), mg_connection::sa, socket_address::sin, and mg_connection::user_data.
Referenced by mg_http_handler2(), mg_mgr_handle_conn(), and socks_if_handler().
struct mg_iface* mg_if_create_iface | ( | const struct mg_iface_vtable * | vtable, |
struct mg_mgr * | mgr | ||
) |
References mg_iface::data, mg_iface::mgr, and mg_iface::vtable.
Referenced by mg_mgr_init_opt(), and mg_socks_mk_iface().
void mg_if_get_conn_addr | ( | struct mg_connection * | nc, |
int | remote, | ||
union socket_address * | sa | ||
) |
References mg_iface_vtable::get_conn_addr, mg_connection::iface, and mg_iface::vtable.
Referenced by mg_http_handler2().
int mg_if_poll | ( | struct mg_connection * | nc, |
double | now | ||
) |
References mg_connection::flags, mbuf::len, mg_call(), mg_close_conn(), mg_do_recv(), mg_timer(), recv_avail_size(), mg_connection::send_mbuf, and mg_connection::user_data.
Referenced by mg_http_handler2(), mg_mgr_handle_conn(), and mg_null_if_poll().
MG_INTERNAL int mg_is_dav_request | ( | const struct mg_str * | s | ) |
Referenced by mg_http_handler2().
|
static |
References mg_get_errno().
Referenced by mg_accept_conn(), mg_http_handler2(), mg_socket_if_connect_tcp(), mg_socket_if_tcp_recv(), mg_socket_if_tcp_send(), mg_socket_if_udp_recv(), and mg_socket_if_udp_send().
MG_INTERNAL int mg_is_not_modified | ( | struct http_message * | hm, |
cs_stat_t * | st | ||
) |
Referenced by mg_http_handler2().
size_t mg_match_prefix | ( | const char * | , |
int | , | ||
const char * | |||
) |
References mg_str::len, mg_match_prefix_n(), and strlen().
Referenced by cs_log_print_prefix(), and mg_http_handler2().
References mg_str::len, mg_str::p, and str_util_lowercase().
Referenced by mg_http_get_endpoint_handler(), mg_http_handler2(), and mg_match_prefix().
void mg_mgr_free | ( | struct mg_mgr * | m | ) |
References mg_mgr::active_connections, mg_mgr::ctl, mg_iface_vtable::free, mg_mgr::ifaces, mg_close_conn(), mg_mgr_poll(), mg_mgr::nameserver, mg_connection::next, mg_mgr::num_ifaces, and mg_iface::vtable.
Referenced by mqtt_client_free().
void mg_mgr_handle_conn | ( | struct mg_connection * | nc, |
int | fd_flags, | ||
double | now | ||
) |
|
static |
References ctl_msg::callback, mg_mgr::ctl, ctl_msg::message, mg_next(), and mg_connection::user_data.
Referenced by mg_socket_if_poll().
void mg_mgr_init | ( | struct mg_mgr * | m, |
void * | user_data | ||
) |
References mg_mgr_init_opt().
Referenced by mg_http_handler2(), and mqtt_client_init().
void mg_mgr_init_opt | ( | struct mg_mgr * | m, |
void * | user_data, | ||
struct mg_mgr_init_opts | opts | ||
) |
References mg_mgr::ctl, mg_mgr::ifaces, mg_mgr_init_opts::ifaces, mg_iface_vtable::init, mg_mgr_init_opts::main_iface, mg_if_create_iface(), mg_ifaces, mg_num_ifaces, mg_ssl_if_init(), mg_mgr::nameserver, mg_mgr_init_opts::nameserver, mg_mgr::num_ifaces, mg_mgr_init_opts::num_ifaces, strdup(), mg_mgr::user_data, and mg_iface::vtable.
Referenced by mg_mgr_init().
double mg_mgr_min_timer | ( | const struct mg_mgr * | mgr | ) |
References mg_mgr::active_connections, mg_connection::ev_timer_time, and mg_connection::next.
int mg_mgr_poll | ( | struct mg_mgr * | m, |
int | timeout_ms | ||
) |
References mg_mgr::ifaces, mg_mgr::num_calls, mg_mgr::num_ifaces, mg_iface_vtable::poll, and mg_iface::vtable.
Referenced by mg_http_handler2(), mg_mgr_free(), and mqtt_client_poll().
struct mg_str mg_mk_str | ( | const char * | s | ) |
References mg_str::len, and strlen().
Referenced by mg_http_handler2(), mg_next_comma_list_entry(), and mg_next_comma_list_entry_n().
struct mg_str mg_mk_str_n | ( | const char * | s, |
size_t | len | ||
) |
References mg_vcmp(), and WEAK.
Referenced by mg_http_handler2(), and mg_next_comma_list_entry_n().
int mg_ncasecmp | ( | const char * | s1, |
const char * | s2, | ||
size_t | len | ||
) |
References mg_casecmp(), str_util_lowercase(), and WEAK.
Referenced by mbuf_remove(), mg_casecmp(), mg_get_http_header(), mg_http_handler2(), mg_http_parse_headers(), mg_parse_address(), mg_vcasecmp(), and str_util_lowercase().
struct mg_connection* mg_next | ( | struct mg_mgr * | s, |
struct mg_connection * | conn | ||
) |
References mg_mgr::active_connections, and mg_connection::next.
Referenced by mg_http_handler2(), mg_mgr_handle_ctl_sock(), mg_recv_udp(), and mqtt_client_publish().
References mg_mk_str(), mg_next_comma_list_entry_n(), and mg_str::p.
Referenced by mg_check_ip_acl(), mg_get_mime_type(), and mg_http_handler2().
struct mg_str mg_next_comma_list_entry_n | ( | struct mg_str | list, |
struct mg_str * | val, | ||
struct mg_str * | eq_val | ||
) |
References mg_str::len, mg_mk_str(), mg_mk_str_n(), mg_strchr(), and mg_str::p.
Referenced by mg_next_comma_list_entry().
References mg_str::len, mg_vcmp(), mg_str::p, and parse_uri_component().
Referenced by mg_assemble_uri(), and mg_http_handler2().
|
static |
References mg_connection::flags, and mg_connection::sock.
|
static |
References mg_connection::flags.
|
static |
References mg_connection::flags.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
References mg_mgr::active_connections, mg_if_poll(), mg_time(), mg_iface::mgr, and mg_connection::next.
|
static |
|
static |
int mg_null_if_tcp_recv | ( | struct mg_connection * | c, |
void * | buf, | ||
size_t | len | ||
) |
|
static |
int mg_null_if_udp_recv | ( | struct mg_connection * | c, |
void * | buf, | ||
size_t | len, | ||
union socket_address * | sa, | ||
size_t * | sa_len | ||
) |
|
static |
|
static |
References mg_set_non_blocking_mode(), socket_address::sa, socket_address::sin, and socket_address::sin6.
Referenced by mg_http_handler2(), mg_socket_if_listen_tcp(), and mg_socket_if_listen_udp().
MG_INTERNAL int mg_parse_address | ( | const char * | str, |
union socket_address * | sa, | ||
int * | proto, | ||
char * | host, | ||
size_t | host_len | ||
) |
References inet_pton(), mg_ncasecmp(), mg_resolve2(), mg_resolve_from_hosts_file(), socket_address::sin, socket_address::sin6, and strlen().
Referenced by mg_bind_opt(), and mg_connect_opt().
MG_INTERNAL time_t mg_parse_date_string | ( | const char * | datetime | ) |
Referenced by mg_http_handler2().
int mg_parse_http | ( | const char * | s, |
int | n, | ||
struct http_message * | hm, | ||
int | is_req | ||
) |
References http_message::body, mg_str::len, http_message::message, http_message::method, mg_http_get_request_len(), mg_http_parse_headers(), mg_skip(), mg_vcasecmp(), mg_str::p, http_message::proto, http_message::query_string, http_message::resp_code, http_message::resp_status_msg, and http_message::uri.
Referenced by mg_http_handler2().
int mg_parse_uri | ( | const struct mg_str | uri, |
struct mg_str * | scheme, | ||
struct mg_str * | user_info, | ||
struct mg_str * | host, | ||
unsigned int * | port, | ||
struct mg_str * | path, | ||
struct mg_str * | query, | ||
struct mg_str * | fragment | ||
) |
References mg_str::len, mg_str::p, and parse_uri_component().
Referenced by mg_http_handler2().
int mg_printf | ( | struct mg_connection * | conn, |
const char * | fmt, | ||
... | |||
) |
References mg_vprintf().
Referenced by mg_http_handler2().
|
static |
References mg_connection::flags, mg_mgr::hexdump_file, mg_connection::iface, mg_connection::last_io_time, mbuf::len, mbuf_trim(), mg_call(), mg_hexdump_connection(), mg_ssl_handshake(), mg_ssl_if_read(), MG_SSL_WANT_READ, mg_time(), mg_connection::mgr, mg_connection::recv_mbuf, mg_iface_vtable::tcp_recv, mg_connection::user_data, and mg_iface::vtable.
Referenced by mg_do_recv(), and mg_send().
|
static |
References mg_connection::flags, mg_connection::handler, mg_mgr::hexdump_file, mg_connection::iface, inet_ntoa(), mg_connection::last_io_time, mbuf::len, mg_connection::listener, mbuf_append(), mbuf_free(), mbuf_trim(), mg_add_conn(), mg_call(), mg_create_connection_base(), mg_hexdump_connection(), mg_next(), mg_time(), mg_connection::mgr, mg_connection::proto_handler, mg_connection::recv_mbuf, mg_connection::recv_mbuf_limit, socket_address::sa, mg_connection::sa, socket_address::sin, mg_connection::sock, mg_iface_vtable::udp_recv, mg_connection::user_data, and mg_iface::vtable.
Referenced by mg_do_recv(), and mg_send().
MG_INTERNAL void mg_remove_conn | ( | struct mg_connection * | c | ) |
References mg_mgr::active_connections, mg_connection::iface, mg_connection::mgr, mg_connection::next, mg_connection::prev, mg_iface_vtable::remove_conn, and mg_iface::vtable.
Referenced by mg_close_conn().
int mg_resolve | ( | const char * | host, |
char * | buf, | ||
size_t | n | ||
) |
References inet_ntoa(), and mg_resolve2().
|
static |
References mg_get_errno(), and strerror().
Referenced by mg_parse_address(), and mg_resolve().
void mg_send | ( | struct mg_connection * | nc, |
const void * | buf, | ||
int | len | ||
) |
References mg_connection::last_io_time, mbuf_append(), mg_recv_tcp(), mg_recv_udp(), mg_time(), and mg_connection::send_mbuf.
Referenced by mg_forward(), mg_http_handler2(), mg_http_transfer_file_data(), mg_vprintf(), and socks_if_handler().
|
static |
References MG_SSL_ERROR, and MG_SSL_OK.
Referenced by mg_ssl_if_conn_accept(), and mg_ssl_if_conn_init().
|
static |
References mbuf::buf, mg_ssl_if_ctx::cipher_suites, mg_ssl_if_ctx::conf, mbuf::len, mbuf_append(), mbuf_trim(), MG_SSL_ERROR, MG_SSL_OK, and strlen().
void mg_set_non_blocking_mode | ( | sock_t | sock | ) |
Referenced by mg_http_handler2(), mg_open_listening_socket(), mg_socket_if_connect_tcp(), and mg_socket_if_sock_set().
const char* mg_set_ssl | ( | struct mg_connection * | nc, |
const char * | cert, | ||
const char * | ca_cert | ||
) |
References mg_ssl_if_conn_params::ca_cert, mg_ssl_if_conn_params::cert, mg_ssl_if_conn_init(), and MG_SSL_OK.
double mg_set_timer | ( | struct mg_connection * | c, |
double | timestamp | ||
) |
References mg_connection::ev_timer_time, mg_connection::flags, and mg_connection::priv_2.
Referenced by mg_http_handler2().
MG_INTERNAL int mg_sntp_parse_reply | ( | const char * | buf, |
int | len, | ||
struct mg_sntp_message * | msg | ||
) |
Referenced by mg_http_handler2().
|
static |
References socket_address::sa.
Referenced by mg_sock_to_str(), and mg_socket_if_get_conn_addr().
void mg_sock_set | ( | struct mg_connection * | nc, |
sock_t | sock | ||
) |
References mg_connection::iface, mg_iface_vtable::sock_set, and mg_iface::vtable.
Referenced by mg_accept_conn(), mg_add_sock_opt(), mg_http_handler2(), mg_socket_if_listen_tcp(), and mg_socket_if_listen_udp().
void mg_sock_to_str | ( | sock_t | sock, |
char * | buf, | ||
size_t | len, | ||
int | flags | ||
) |
References mg_sock_addr_to_str(), and mg_sock_get_addr().
Referenced by mg_http_handler2().
void mg_socket_if_add_conn | ( | struct mg_connection * | nc | ) |
void mg_socket_if_connect_tcp | ( | struct mg_connection * | nc, |
const union socket_address * | sa | ||
) |
void mg_socket_if_connect_udp | ( | struct mg_connection * | nc | ) |
References mg_connection::err, mg_connection::flags, mg_get_errno(), and mg_connection::sock.
int mg_socket_if_create_conn | ( | struct mg_connection * | nc | ) |
void mg_socket_if_destroy_conn | ( | struct mg_connection * | nc | ) |
References mg_connection::flags, mg_connection::listener, and mg_connection::sock.
void mg_socket_if_free | ( | struct mg_iface * | iface | ) |
void mg_socket_if_get_conn_addr | ( | struct mg_connection * | nc, |
int | remote, | ||
union socket_address * | sa | ||
) |
References mg_connection::flags, mg_sock_get_addr(), mg_connection::sa, and mg_connection::sock.
void mg_socket_if_init | ( | struct mg_iface * | iface | ) |
References mg_mgr::ctl, mg_socketpair(), and mg_iface::mgr.
int mg_socket_if_listen_tcp | ( | struct mg_connection * | nc, |
union socket_address * | sa | ||
) |
References mg_get_errno(), mg_open_listening_socket(), and mg_sock_set().
|
static |
References mg_get_errno(), mg_open_listening_socket(), and mg_sock_set().
time_t mg_socket_if_poll | ( | struct mg_iface * | iface, |
int | timeout_ms | ||
) |
References mg_mgr::active_connections, mg_mgr::ctl, mg_connection::ev_timer_time, mg_connection::flags, mbuf::len, mg_connection::listener, mg_add_to_set(), mg_mgr_handle_conn(), mg_mgr_handle_ctl_sock(), mg_time(), mg_iface::mgr, mg_connection::next, mg_connection::recv_mbuf, mg_connection::recv_mbuf_limit, mg_connection::send_mbuf, mg_connection::sock, timeval::tv_sec, and timeval::tv_usec.
void mg_socket_if_remove_conn | ( | struct mg_connection * | nc | ) |
void mg_socket_if_sock_set | ( | struct mg_connection * | nc, |
sock_t | sock | ||
) |
References mg_set_close_on_exec(), mg_set_non_blocking_mode(), and mg_connection::sock.
|
static |
References mg_connection::flags, mg_is_error(), and mg_connection::sock.
|
static |
References mg_is_error(), and mg_connection::sock.
|
static |
References mg_is_error(), socket_address::sa, and mg_connection::sock.
|
static |
References mg_is_error(), socket_address::sa, mg_connection::sa, socket_address::sin, and mg_connection::sock.
int mg_socketpair | ( | sock_t | sp[2], |
int | sock_type | ||
) |
References mg_set_close_on_exec(), mg_socketpair_accept(), mg_socketpair_close(), socket_address::sa, and socket_address::sin.
Referenced by mg_http_handler2(), and mg_socket_if_init().
MG_INTERNAL sock_t mg_socketpair_accept | ( | sock_t | sock, |
union socket_address * | sa, | ||
socklen_t | sa_len | ||
) |
References socket_address::sa.
Referenced by mg_socketpair().
MG_INTERNAL void mg_socketpair_close | ( | sock_t * | sock | ) |
Referenced by mg_socketpair().
|
static |
References mg_connection::sock.
|
static |
|
static |
|
static |
|
static |
References mg_iface_vtable::free, mg_connection::iface, LL_DEBUG, and mg_iface::vtable.
|
static |
References mg_iface::data, LL_DEBUG, socksdata::proxy_addr, and socks_if_disband().
|
static |
References LL_DEBUG.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
int mg_socks_if_tcp_recv | ( | struct mg_connection * | c, |
void * | buf, | ||
size_t | len | ||
) |
References mbuf::buf, mg_iface::data, mg_connection::iface, mbuf::len, mbuf_remove(), mg_connection::recv_mbuf, and socksdata::s.
|
static |
References mg_iface::data, mg_connection::iface, mbuf_append(), socksdata::s, and mg_connection::send_mbuf.
int mg_socks_if_udp_recv | ( | struct mg_connection * | c, |
void * | buf, | ||
size_t | len, | ||
union socket_address * | sa, | ||
size_t * | sa_len | ||
) |
|
static |
References mg_iface::data, mg_if_create_iface(), and strdup().
MG_INTERNAL void mg_ssl_handshake | ( | struct mg_connection * | nc | ) |
References mg_connection::err, mg_connection::flags, mg_connection::listener, mg_call(), mg_ssl_if_handshake(), MG_SSL_OK, MG_SSL_WANT_READ, MG_SSL_WANT_WRITE, mg_connection::sa, and mg_connection::user_data.
Referenced by mg_if_accept_tcp_cb(), mg_if_can_send_cb(), mg_if_connect_cb(), and mg_recv_tcp().
enum mg_ssl_if_result mg_ssl_if_conn_accept | ( | struct mg_connection * | nc, |
struct mg_connection * | lc | ||
) |
References mg_ssl_if_ctx::cert, mg_ssl_if_ctx::conf, mg_ssl_if_ctx::key, mg_set_cipher_list(), MG_SSL_ERROR, mg_ssl_if_mbed_set_psk(), mg_ssl_if_ossl_set_psk(), MG_SSL_OK, mg_use_ca_cert(), mg_use_cert(), mg_ssl_if_ctx::ssl, mg_ssl_if_ctx::ssl_ctx, and mg_connection::ssl_if_data.
Referenced by mg_http_handler2(), and mg_if_accept_tcp_cb().
void mg_ssl_if_conn_close_notify | ( | struct mg_connection * | nc | ) |
References mg_ssl_if_ctx::ssl, and mg_connection::ssl_if_data.
Referenced by mg_close_conn(), and mg_http_handler2().
void mg_ssl_if_conn_free | ( | struct mg_connection * | nc | ) |
enum mg_ssl_if_result mg_ssl_if_conn_init | ( | struct mg_connection * | nc, |
const struct mg_ssl_if_conn_params * | params, | ||
const char ** | err_msg | ||
) |
References mg_ssl_if_conn_params::ca_cert, mg_ssl_if_conn_params::cert, mg_ssl_if_conn_params::cipher_suites, mg_ssl_if_ctx::cipher_suites, mg_ssl_if_ctx::conf, mg_connection::flags, mg_ssl_if_conn_params::key, mbuf_init(), mg_set_cipher_list(), MG_SSL_ERROR, mg_ssl_if_mbed_random(), mg_ssl_if_mbed_set_psk(), mg_ssl_if_ossl_set_psk(), mg_ssl_mbed_log(), MG_SSL_OK, mg_ssl_if_ctx::psk, mg_ssl_if_conn_params::psk_identity, mg_ssl_if_conn_params::psk_key, mg_ssl_if_conn_params::server_name, mg_ssl_if_ctx::ssl, mg_ssl_if_ctx::ssl_ctx, and mg_connection::ssl_if_data.
Referenced by mg_bind_opt(), mg_connect_opt(), mg_http_handler2(), and mg_set_ssl().
enum mg_ssl_if_result mg_ssl_if_handshake | ( | struct mg_connection * | nc | ) |
References mg_ssl_if_ctx::conf, mg_connection::listener, MG_SSL_ERROR, mg_ssl_if_mbed_err(), mg_ssl_if_mbed_free_certs_and_keys(), mg_ssl_if_mbed_recv(), mg_ssl_if_mbed_send(), mg_ssl_if_ssl_err(), MG_SSL_OK, mg_connection::sock, mg_ssl_if_ctx::ssl, and mg_connection::ssl_if_data.
Referenced by mg_http_handler2(), and mg_ssl_handshake().
void mg_ssl_if_init | ( | ) |
References LL_INFO.
Referenced by mg_http_handler2(), and mg_mgr_init_opt().
|
static |
References mg_connection::err, mg_connection::flags, LL_DEBUG, LL_ERROR, MG_SSL_ERROR, MG_SSL_OK, MG_SSL_WANT_READ, and MG_SSL_WANT_WRITE.
Referenced by mg_ssl_if_handshake(), mg_ssl_if_read(), and mg_ssl_if_write().
|
static |
References mg_ssl_if_ctx::ca_cert, mg_ssl_if_ctx::cert, mg_ssl_if_ctx::conf, and mg_ssl_if_ctx::key.
Referenced by mg_ssl_if_conn_free(), and mg_ssl_if_handshake().
int mg_ssl_if_mbed_random | ( | void * | ctx, |
unsigned char * | buf, | ||
size_t | len | ||
) |
Referenced by mg_ssl_if_conn_init().
|
static |
References mg_connection::iface, mg_iface_vtable::tcp_recv, and mg_iface::vtable.
Referenced by mg_ssl_if_handshake().
|
static |
References mg_connection::iface, mg_iface_vtable::tcp_send, and mg_iface::vtable.
Referenced by mg_ssl_if_handshake().
|
static |
References mg_ssl_if_ctx::conf, MG_SSL_ERROR, MG_SSL_OK, and strlen().
Referenced by mg_ssl_if_conn_accept(), and mg_ssl_if_conn_init().
|
static |
References mbuf::buf, mg_ssl_if_ctx::identity_len, mbuf::len, and mg_ssl_if_ctx::psk.
Referenced by mg_ssl_if_ossl_set_psk().
|
static |
References mg_ssl_if_ctx::identity_len, mbuf_append(), MG_SSL_ERROR, mg_ssl_if_ossl_psk_cb(), MG_SSL_OK, mg_ssl_if_ctx::psk, mg_ssl_if_ctx::ssl_ctx, and strlen().
Referenced by mg_ssl_if_conn_accept(), and mg_ssl_if_conn_init().
int mg_ssl_if_read | ( | struct mg_connection * | nc, |
void * | buf, | ||
size_t | buf_size | ||
) |
References mg_connection::flags, mg_ssl_if_mbed_err(), mg_ssl_if_ssl_err(), mg_ssl_if_ctx::ssl, and mg_connection::ssl_if_data.
Referenced by mg_http_handler2(), and mg_recv_tcp().
|
static |
References mg_connection::err, MG_SSL_ERROR, MG_SSL_WANT_READ, MG_SSL_WANT_WRITE, mg_ssl_if_ctx::ssl, mg_ssl_if_ctx::ssl_ctx, and mg_connection::ssl_if_data.
Referenced by mg_ssl_if_handshake(), mg_ssl_if_read(), and mg_ssl_if_write().
int mg_ssl_if_write | ( | struct mg_connection * | nc, |
const void * | data, | ||
size_t | len | ||
) |
References mg_ssl_if_mbed_err(), mg_ssl_if_ssl_err(), mg_ssl_if_ctx::saved_len, mg_ssl_if_ctx::ssl, and mg_connection::ssl_if_data.
Referenced by mg_http_handler2(), and mg_if_can_send_cb().
|
static |
References LL_DEBUG, LL_ERROR, LL_INFO, LL_VERBOSE_DEBUG, and strlen().
Referenced by mg_ssl_if_conn_init().
const char* mg_strchr | ( | const struct mg_str | s, |
int | c | ||
) |
References mg_str::len, mg_strcmp(), mg_str::p, and WEAK.
Referenced by mg_http_handler2(), mg_next_comma_list_entry_n(), and mg_strdup_nul().
References mg_str::len, mg_strncmp(), mg_str::p, and WEAK.
Referenced by mg_strchr(), and mg_strncmp().
References mg_strdup_common().
Referenced by mg_assemble_uri(), and mg_http_handler2().
References mg_str::len, and mg_str::p.
Referenced by mg_strdup(), and mg_strdup_nul().
References mg_strchr(), mg_strdup_common(), and WEAK.
References mg_str::len, mg_strcmp(), mg_strstr(), and WEAK.
Referenced by mg_http_handler2(), and mg_strcmp().
References mg_str::len, and mg_str::p.
Referenced by mg_strncmp().
References c_strnlen(), mg_str::len, mg_str::p, and WEAK.
double mg_time | ( | void | ) |
References cs_time().
Referenced by mg_create_connection_base(), mg_http_handler2(), mg_if_can_send_cb(), mg_null_if_poll(), mg_recv_tcp(), mg_recv_udp(), mg_send(), mg_socket_if_poll(), and resolve_cb().
MG_INTERNAL void mg_timer | ( | struct mg_connection * | c, |
double | now | ||
) |
References mg_connection::ev_timer_time, mg_call(), and mg_connection::user_data.
Referenced by mg_if_poll().
MG_INTERNAL int mg_uri_to_local_path | ( | struct http_message * | hm, |
const struct mg_serve_http_opts * | opts, | ||
char ** | local_path, | ||
struct mg_str * | remainder | ||
) |
Referenced by mg_http_handler2().
|
static |
References MG_SSL_ERROR, and MG_SSL_OK.
Referenced by mg_ssl_if_conn_accept().
|
static |
References mg_ssl_if_ctx::ca_cert, mg_ssl_if_ctx::conf, MG_SSL_ERROR, MG_SSL_OK, and strdup().
|
static |
References mg_ssl_if_ctx::cert, MG_SSL_ERROR, and MG_SSL_OK.
Referenced by mg_ssl_if_conn_accept().
|
static |
References mg_ssl_if_ctx::cert, mg_ssl_if_ctx::conf, mg_ssl_if_ctx::key, MG_SSL_ERROR, and MG_SSL_OK.
int mg_vcasecmp | ( | const struct mg_str * | str1, |
const char * | str2 | ||
) |
References mg_str::len, mg_ncasecmp(), mg_str::p, and strlen().
Referenced by mg_get_mime_type(), mg_http_handler2(), mg_parse_http(), and mg_vcmp().
int mg_vcmp | ( | const struct mg_str * | str1, |
const char * | str2 | ||
) |
References mg_str::len, mg_vcasecmp(), mg_str::p, strlen(), and WEAK.
Referenced by mg_http_handler2(), mg_mk_str_n(), and mg_normalize_uri_path().
int mg_vprintf | ( | struct mg_connection * | nc, |
const char * | fmt, | ||
va_list | ap | ||
) |
References mg_avprintf(), and mg_send().
Referenced by mg_printf().
MG_INTERNAL void mg_ws_handler | ( | struct mg_connection * | nc, |
int | ev, | ||
void *ev_data | MG_UD_ARGvoid *user_data | ||
) |
Referenced by mg_http_handler2().
MG_INTERNAL void mg_ws_handshake | ( | struct mg_connection * | nc, |
const struct mg_str * | key, | ||
struct http_message * | |||
) |
Referenced by mg_http_handler2().
DIR * opendir | ( | const char * | dir_name | ) |
References dirent::d_name, win32_dir::handle, win32_dir::info, win32_dir::result, and to_wchar().
Referenced by mg_http_handler2().
MG_INTERNAL int parse_mqtt | ( | struct mbuf * | io, |
struct mg_mqtt_message * | mm | ||
) |
Referenced by mg_http_handler2().
References isbyte().
Referenced by mg_check_ip_acl().
|
static |
References mg_str::len, and mg_str::p.
Referenced by mg_http_handler2(), mg_normalize_uri_path(), and mg_parse_uri().
References dirent::d_name, win32_dir::handle, win32_dir::info, and win32_dir::result.
Referenced by mg_http_handler2().
MG_INTERNAL size_t recv_avail_size | ( | struct mg_connection * | conn, |
size_t | max | ||
) |
References mbuf::len, mg_do_recv(), mg_connection::recv_mbuf, and mg_connection::recv_mbuf_limit.
Referenced by mg_do_recv(), and mg_if_poll().
|
static |
References mg_dns_message::answers, mg_connection::flags, mg_call(), mg_destroy_conn(), mg_dns_parse_record_data(), mg_do_connect(), MG_RESOLVE_TIMEOUT, mg_time(), mg_dns_message::num_answers, mg_dns_resource_record::rtype, mg_connection::sa, socket_address::sin, and mg_connection::user_data.
Referenced by mg_connect_opt().
|
static |
References socksdata::c, mg_connection::flags, LL_DEBUG, socksdata::s, and mg_connection::user_data.
Referenced by mg_socks_if_free(), and socks_if_handler().
|
static |
References mbuf::buf, socksdata::c, mg_connection::flags, mbuf::len, LL_DEBUG, LL_ERROR, mbuf_remove(), mg_if_connect_cb(), mg_send(), MG_SOCKS_ADDR_IPV4, MG_SOCKS_CMD_CONNECT, MG_SOCKS_HANDSHAKE_FAILURE, MG_SOCKS_HANDSHAKE_NOAUTH, MG_SOCKS_SUCCESS, socksdata::proxy_addr, mg_connection::recv_mbuf, socksdata::s, mg_connection::sa, socket_address::sin, socks_if_disband(), socks_if_relay(), and mg_connection::user_data.
Referenced by mg_socks_if_connect_tcp().
|
static |
References socksdata::c, mg_connection::flags, mbuf::len, mg_if_can_recv_cb(), mg_if_can_send_cb(), mg_connection::recv_mbuf, socksdata::s, mg_connection::send_mbuf, and mg_connection::user_data.
Referenced by socks_if_handler().
|
static |
References mg_ncasecmp(), and WEAK.
Referenced by mg_match_prefix_n(), and mg_ncasecmp().
char* strdup | ( | const char * | src | ) |
References cs_to_hex(), strlen(), and WEAK.
Referenced by c_strnstr(), cs_log_set_filter(), data_acquired_handler(), flex_create_device(), mg_http_handler2(), mg_mgr_init_opt(), mg_socks_mk_iface(), mg_use_ca_cert(), mqtt_topic_default(), parse_getter(), and vdata_make().
int to_wchar | ( | const char * | path, |
wchar_t * | wbuf, | ||
size_t | wbuf_len | ||
) |
References c_strnstr(), strlen(), and WEAK.
Referenced by mg_http_handler2(), and opendir().
enum cs_log_level cs_log_threshold |
size_t ext_len |
Referenced by mg_get_mime_type().
const char* extension |
Referenced by mg_get_mime_type().
LL_ERROR = 0 |
Referenced by mg_http_handler2(), mg_ssl_if_mbed_err(), mg_ssl_mbed_log(), and socks_if_handler().
const struct mg_iface_vtable mg_default_iface_vtable = MG_NULL_IFACE_VTABLE |
const struct mg_iface_vtable* mg_ifaces[] |
Referenced by mg_mgr_init_opt().
const struct mg_iface_vtable mg_null_iface_vtable = MG_NULL_IFACE_VTABLE |
Referenced by mg_mgr_init_opt().
|
static |
|
static |
const struct mg_iface_vtable mg_socket_iface_vtable = MG_SOCKET_IFACE_VTABLE |
const struct mg_iface_vtable mg_socks_iface_vtable |
const { ... } mg_static_builtin_mime_types[] |
Referenced by mg_get_mime_type().
|
static |
const char* mime_type |
Referenced by mg_http_handler2().
|
static |
|
static |
void*(* test_calloc) (size_t count, size_t size) |
void*(* test_malloc) (size_t size) |
enum cs_log_level cs_log_cur_msg_level WEAK |
Referenced by c_itoa(), c_strnlen(), c_strnstr(), cs_from_hex(), cs_hmac_sha1(), cs_log_print_prefix(), cs_log_printf(), cs_log_set_file(), cs_log_set_filter(), fourbit(), mbuf_append(), mbuf_free(), mbuf_init(), mbuf_insert(), mbuf_remove(), mbuf_resize(), mbuf_trim(), mg_asprintf(), mg_casecmp(), mg_mk_str_n(), mg_ncasecmp(), mg_strchr(), mg_strcmp(), mg_strdup_nul(), mg_strncmp(), mg_strstrip(), mg_vcmp(), str_util_lowercase(), strdup(), and to_wchar().