Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mongoose.cc File Reference
#include "mongoose.h"
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <stddef.h>
#include <sys/time.h>
#include <stdlib.h>
#include <assert.h>
+ Include dependency graph for mongoose.cc:

Go to the source code of this file.

Classes

struct  ctl_msg
 
struct  frozen
 
union  char64long16
 
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_http_proto_data
 
struct  mg_cgi_env_block
 
struct  ws_mask_ctx
 
struct  mg_dns_header
 
struct  mg_resolve_async_request
 

Macros

#define CS_MONGOOSE_SRC_INTERNAL_H_
 
#define MG_MALLOC   malloc
 
#define MG_CALLOC   calloc
 
#define MG_REALLOC   realloc
 
#define MG_FREE   free
 
#define MBUF_REALLOC   MG_REALLOC
 
#define MBUF_FREE   MG_FREE
 
#define MG_SET_PTRPTR(_ptr, _v)
 
#define MG_INTERNAL   static
 
#define MG_CTL_MSG_MESSAGE_SIZE   8192
 
#define NUM_UPPERCASES   ('Z' - 'A' + 1)
 
#define NUM_LETTERS   (NUM_UPPERCASES * 2)
 
#define NUM_DIGITS   ('9' - '0' + 1)
 
#define BASE64_ENCODE_BODY
 
#define BASE64_OUT(ch)
 
#define BASE64_FLUSH()
 
#define BASE64_OUT(ch)
 
#define BASE64_FLUSH()
 
#define CS_COMMON_CS_DIRENT_H_
 
#define _CRT_SECURE_NO_WARNINGS   /* Disable deprecation warning in VS2005+ */
 
#define FROZEN_REALLOC   realloc
 
#define FROZEN_FREE   free
 
#define EXPECT(cond, err_code)
 
#define TRY(expr)
 
#define END_OF_STRING   (-1)
 
#define EMIT(x)
 
#define F1(x, y, z)   (z ^ (x & (y ^ z)))
 
#define F2(x, y, z)   F1(z, x, y)
 
#define F3(x, y, z)   (x ^ y ^ z)
 
#define F4(x, y, z)   (y ^ (x | ~z))
 
#define MD5STEP(f, w, x, y, z, data, s)   (w += f(x, y, z) + data, w = w << s | w >> (32 - s), w += x)
 
#define SHA1HANDSOFF
 
#define rol(value, bits)   (((value) << (bits)) | ((value) >> (32 - (bits))))
 
#define blk(i)
 
#define R0(v, w, x, y, z, i)
 
#define R1(v, w, x, y, z, i)
 
#define R2(v, w, x, y, z, i)
 
#define R3(v, w, x, y, z, i)
 
#define R4(v, w, x, y, z, i)
 
#define C_SNPRINTF_APPEND_CHAR(ch)
 
#define C_SNPRINTF_FLAG_ZERO   1
 
#define MG_MAX_HOST_LEN   200
 
#define MG_COPY_COMMON_CONNECTION_OPTIONS(dst, src)   memcpy(dst, src, sizeof(*dst));
 
#define _MG_ALLOWED_CONNECT_FLAGS_MASK
 
#define _MG_CALLBACK_MODIFIABLE_FLAGS_MASK
 
#define intptr_t   long
 
#define MG_TCP_RECV_BUFFER_SIZE   1024
 
#define MG_UDP_RECV_BUFFER_SIZE   1500
 
#define _MG_F_FD_CAN_READ   1
 
#define _MG_F_FD_CAN_WRITE   1 << 1
 
#define _MG_F_FD_ERROR   1 << 2
 
#define MG_WS_NO_HOST_HEADER_MAGIC   ((char *) 0x1)
 
#define MIME_ENTRY(_ext, _type)   { _ext, sizeof(_ext) - 1, _type }
 
#define HEXTOI(x)   (isdigit(x) ? x - '0' : x - 'W')
 
#define MG_DEFAULT_NAMESERVER   "8.8.8.8"
 
#define CS_COMMON_PLATFORMS_SIMPLELINK_SL_FS_SLFS_H_
 

Typedefs

typedef int cs_dirent_dummy
 

Enumerations

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_CHUNK,
  MPS_GOT_BOUNDARY, MPS_FINALIZE, MPS_FINISHED
}
 

Functions

MG_INTERNAL struct mg_connectionmg_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, 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_connectionmg_create_connection (struct mg_mgr *mgr, mg_event_handler_t callback, struct mg_add_sock_opts opts)
 
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 size_t mg_handle_chunked (struct mg_connection *nc, struct http_message *hm, char *buf, size_t blen)
 
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 int parse_mqtt (struct mbuf *io, struct mg_mqtt_message *mm)
 
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)
 
void cs_log_print_prefix (const char *func)
 
void cs_log_printf (const char *fmt,...)
 
void cs_log_set_file (FILE *file)
 
void cs_log_set_level (enum cs_log_level level)
 
double cs_time ()
 
static int parse_object (struct frozen *f)
 
static int parse_value (struct frozen *f)
 
static int left (const struct frozen *f)
 
static int is_space (int ch)
 
static void skip_whitespaces (struct frozen *f)
 
static int cur (struct frozen *f)
 
static int test_and_skip (struct frozen *f, int expected)
 
static int test_no_skip (struct frozen *f, int expected)
 
static int is_alpha (int ch)
 
static int is_digit (int ch)
 
static int is_hex_digit (int ch)
 
static int get_escape_len (const char *s, int len)
 
static int capture_ptr (struct frozen *f, const char *ptr, enum json_type type)
 
static int capture_len (struct frozen *f, int token_index, const char *ptr)
 
static int parse_identifier (struct frozen *f)
 
static int get_utf8_char_len (unsigned char ch)
 
static int parse_string (struct frozen *f)
 
static int parse_number (struct frozen *f)
 
static int parse_array (struct frozen *f)
 
static int compare (const char *s, const char *str, int len)
 
static int expect (struct frozen *f, const char *s, int len, enum json_type t)
 
static int parse_key (struct frozen *f)
 
static int parse_pair (struct frozen *f)
 
static int doit (struct frozen *f)
 
int parse_json (const char *s, int s_len, struct json_token *arr, int arr_len)
 
struct json_tokenparse_json2 (const char *s, int s_len)
 
static int path_part_len (const char *p)
 
struct json_tokenfind_json_token (struct json_token *toks, const char *path)
 
int json_emit_long (char *buf, int buf_len, long int value)
 
int json_emit_double (char *buf, int buf_len, double value)
 
int json_emit_quoted_str (char *s, int s_len, const char *str, int len)
 
int json_emit_unquoted_str (char *buf, int buf_len, const char *str, int len)
 
int json_emit_va (char *s, int s_len, const char *fmt, va_list ap)
 
int json_emit (char *buf, int buf_len, const char *fmt,...)
 
static void byteReverse (unsigned char *buf, unsigned longs)
 
void MD5_Init (MD5_CTX *ctx)
 
static void MD5Transform (uint32_t buf[4], uint32_t const in[16])
 
void MD5_Update (MD5_CTX *ctx, const unsigned char *buf, size_t len)
 
void MD5_Final (unsigned char digest[16], MD5_CTX *ctx)
 
void cs_to_hex (char *to, const unsigned char *p, size_t len)
 
char * cs_md5 (char buf[33],...)
 
void mbuf_init (struct mbuf *mbuf, size_t initial_size)
 
void mbuf_free (struct mbuf *mbuf)
 
void mbuf_resize (struct mbuf *a, size_t new_size)
 
void mbuf_trim (struct mbuf *mbuf)
 
size_t mbuf_insert (struct mbuf *a, size_t off, const void *buf, size_t len)
 
size_t mbuf_append (struct mbuf *a, const void *buf, size_t len)
 
void mbuf_remove (struct mbuf *mb, size_t n)
 
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])
 
size_t c_strnlen (const char *s, size_t maxlen)
 
static int c_itoa (char *buf, size_t buf_size, int64_t num, int base, int flags, int field_width)
 
int c_vsnprintf (char *buf, size_t buf_size, const char *fmt, va_list ap)
 
int c_snprintf (char *buf, size_t buf_size, const char *fmt,...)
 
const char * c_strnstr (const char *s, const char *find, size_t slen)
 
int mg_is_error (int n)
 
void mg_set_non_blocking_mode (sock_t sock)
 
void mg_ev_mgr_init (struct mg_mgr *mgr)
 
void mg_ev_mgr_free (struct mg_mgr *mgr)
 
void mg_ev_mgr_add_conn (struct mg_connection *nc)
 
void mg_ev_mgr_remove_conn (struct mg_connection *nc)
 
void mg_if_timer (struct mg_connection *c, double now)
 
void mg_if_poll (struct mg_connection *nc, time_t now)
 
static void mg_destroy_conn (struct mg_connection *conn)
 
void mg_close_conn (struct mg_connection *conn)
 
void mg_mgr_init (struct mg_mgr *m, void *user_data)
 
void mg_mgr_free (struct mg_mgr *m)
 
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_connectionmg_create_connection_base (struct mg_mgr *mgr, mg_event_handler_t callback, struct mg_add_sock_opts opts)
 
struct mg_connectionmg_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)
 
void mg_if_sent_cb (struct mg_connection *nc, int num_sent)
 
static void mg_recv_common (struct mg_connection *nc, void *buf, int len)
 
void mg_if_recv_tcp_cb (struct mg_connection *nc, void *buf, int len)
 
void mg_if_recv_udp_cb (struct mg_connection *nc, void *buf, int len, union socket_address *sa, size_t sa_len)
 
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_connectionmg_connect (struct mg_mgr *mgr, const char *address, mg_event_handler_t callback)
 
struct mg_connectionmg_connect_opt (struct mg_mgr *mgr, const char *address, mg_event_handler_t callback, struct mg_connect_opts opts)
 
struct mg_connectionmg_bind (struct mg_mgr *srv, const char *address, mg_event_handler_t event_handler)
 
struct mg_connectionmg_bind_opt (struct mg_mgr *mgr, const char *address, mg_event_handler_t callback, struct mg_bind_opts opts)
 
struct mg_connectionmg_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)
 
struct mg_connectionmg_add_sock_opt (struct mg_mgr *s, sock_t sock, mg_event_handler_t callback, struct mg_add_sock_opts opts)
 
struct mg_connectionmg_add_sock (struct mg_mgr *s, sock_t sock, mg_event_handler_t callback)
 
double mg_time ()
 
static sock_t mg_open_listening_socket (union socket_address *sa, int proto)
 
void mg_if_connect_tcp (struct mg_connection *nc, const union socket_address *sa)
 
void mg_if_connect_udp (struct mg_connection *nc)
 
int mg_if_listen_tcp (struct mg_connection *nc, union socket_address *sa)
 
int mg_if_listen_udp (struct mg_connection *nc, union socket_address *sa)
 
void mg_if_tcp_send (struct mg_connection *nc, const void *buf, size_t len)
 
void mg_if_udp_send (struct mg_connection *nc, const void *buf, size_t len)
 
void mg_if_recved (struct mg_connection *nc, size_t len)
 
int mg_if_create_conn (struct mg_connection *nc)
 
void mg_if_destroy_conn (struct mg_connection *nc)
 
static int mg_accept_conn (struct mg_connection *lc)
 
static void mg_write_to_socket (struct mg_connection *nc)
 
MG_INTERNAL size_t recv_avail_size (struct mg_connection *conn, size_t max)
 
static void mg_read_from_socket (struct mg_connection *conn)
 
static int mg_recvfrom (struct mg_connection *nc, union socket_address *sa, socklen_t *sa_len, char **buf)
 
static void mg_handle_udp_read (struct mg_connection *nc)
 
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_sock_set (struct mg_connection *nc, sock_t sock)
 
void mg_add_to_set (sock_t sock, fd_set *set, sock_t *max_fd)
 
time_t mg_mgr_poll (struct mg_mgr *mgr, int timeout_ms)
 
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_if_get_conn_addr (struct mg_connection *nc, int remote, union socket_address *sa)
 
static void parse_uri_component (const char **p, const char *end, char sep, struct mg_str *res)
 
int mg_parse_uri (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)
 
static void mg_http_conn_destructor (void *proto_data)
 
static struct mg_http_proto_datamg_http_get_proto_data (struct mg_connection *c)
 
static void mg_http_free_proto_data_file (struct mg_http_proto_data_file *d)
 
static void mg_http_free_proto_data_cgi (struct mg_http_proto_data_cgi *d)
 
static void mg_http_free_proto_data_endpoints (struct mg_http_endpoint **ep)
 
static int mg_mkdir (const char *path, uint32_t mode)
 
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_strmg_get_http_header (struct http_message *hm, const char *name)
 
static int mg_is_ws_fragment (unsigned char flags)
 
static int mg_is_ws_first_fragment (unsigned char flags)
 
static void mg_handle_incoming_websocket_frame (struct mg_connection *nc, struct websocket_message *wsm)
 
static int mg_deliver_websocket_data (struct mg_connection *nc)
 
static uint32_t mg_ws_random_mask (void)
 
static void mg_send_ws_header (struct mg_connection *nc, int op, size_t len, struct ws_mask_ctx *ctx)
 
static void mg_ws_mask_frame (struct mbuf *mbuf, struct ws_mask_ctx *ctx)
 
void mg_send_websocket_frame (struct mg_connection *nc, int op, const void *data, size_t len)
 
void mg_send_websocket_framev (struct mg_connection *nc, int op, const struct mg_str *strv, int strvcnt)
 
void mg_printf_websocket_frame (struct mg_connection *nc, int op, const char *fmt,...)
 
static void mg_websocket_handler (struct mg_connection *nc, int ev, void *ev_data)
 
static void mg_ws_handshake (struct mg_connection *nc, const struct mg_str *key)
 
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)
 
static mg_event_handler_t mg_http_get_endpoint_handler (struct mg_connection *nc, struct mg_str *uri_path)
 
static void mg_http_call_endpoint_handler (struct mg_connection *nc, int ev, struct http_message *hm)
 
void mg_http_handler (struct mg_connection *nc, int ev, void *ev_data)
 
static size_t mg_get_line_len (const char *buf, size_t buf_len)
 
void mg_set_protocol_http_websocket (struct mg_connection *nc)
 
void mg_send_websocket_handshake2 (struct mg_connection *nc, const char *path, const char *host, const char *protocol, const char *extra_headers)
 
void mg_send_websocket_handshake (struct mg_connection *nc, const char *path, const char *extra_headers)
 
void mg_send_response_line (struct mg_connection *nc, int status_code, const char *extra_headers)
 
void mg_send_head (struct mg_connection *c, int status_code, int64_t content_length, const char *extra_headers)
 
static void mg_http_send_error (struct mg_connection *nc, int code, const char *reason)
 
static void mg_send_ssi_file (struct mg_connection *, const char *, FILE *, int, const struct mg_serve_http_opts *)
 
static void mg_send_file_data (struct mg_connection *nc, FILE *fp)
 
static void mg_do_ssi_include (struct mg_connection *nc, const char *ssi, char *tag, int include_level, const struct mg_serve_http_opts *opts)
 
static void do_ssi_exec (struct mg_connection *nc, char *tag)
 
static void mg_do_ssi_call (struct mg_connection *nc, char *tag)
 
static void mg_handle_ssi_request (struct mg_connection *nc, const char *path, const struct mg_serve_http_opts *opts)
 
static void mg_http_construct_etag (char *buf, size_t buf_len, const cs_stat_t *st)
 
static void mg_gmt_time_string (char *buf, size_t buf_len, time_t *t)
 
static int mg_http_parse_range_header (const struct mg_str *header, int64_t *a, int64_t *b)
 
static void mg_http_send_file2 (struct mg_connection *nc, const char *path, cs_stat_t *st, struct http_message *hm, struct mg_serve_http_opts *opts)
 
int mg_url_decode (const char *src, int src_len, char *dst, int dst_len, int is_form_url_encoded)
 
int mg_get_http_var (const struct mg_str *buf, const char *name, char *dst, size_t dst_len)
 
void mg_send_http_chunk (struct mg_connection *nc, const char *buf, size_t len)
 
void mg_printf_http_chunk (struct mg_connection *nc, const char *fmt,...)
 
void mg_printf_html_escape (struct mg_connection *nc, const char *fmt,...)
 
int mg_http_parse_header (struct mg_str *hdr, const char *var_name, char *buf, size_t buf_size)
 
static int mg_is_file_hidden (const char *path, const struct mg_serve_http_opts *opts, int exclude_specials)
 
static void mg_mkmd5resp (const char *method, size_t method_len, const char *uri, size_t uri_len, const char *ha1, size_t ha1_len, const char *nonce, size_t nonce_len, const char *nc, size_t nc_len, const char *cnonce, size_t cnonce_len, const char *qop, size_t qop_len, char *resp)
 
int mg_http_create_digest_auth_header (char *buf, size_t buf_len, const char *method, const char *uri, const char *auth_domain, const char *user, const char *passwd)
 
static int mg_check_nonce (const char *nonce)
 
int mg_http_check_digest_auth (struct http_message *hm, const char *auth_domain, FILE *fp)
 
static int mg_is_authorized (struct http_message *hm, const char *path, int is_directory, const char *domain, const char *passwords_file, int is_global_pass_file)
 
static size_t mg_url_encode (const char *src, size_t s_len, char *dst, size_t dst_len)
 
static void mg_escape (const char *src, char *dst, size_t dst_len)
 
static void mg_print_dir_entry (struct mg_connection *nc, const char *file_name, cs_stat_t *stp)
 
static void mg_scan_directory (struct mg_connection *nc, const char *dir, const struct mg_serve_http_opts *opts, void(*func)(struct mg_connection *, const char *, cs_stat_t *))
 
static void mg_send_directory_listing (struct mg_connection *nc, const char *dir, struct http_message *hm, struct mg_serve_http_opts *opts)
 
static void mg_print_props (struct mg_connection *nc, const char *name, cs_stat_t *stp)
 
static 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)
 
static void mg_handle_mkcol (struct mg_connection *nc, const char *path, struct http_message *hm)
 
static int mg_remove_directory (const struct mg_serve_http_opts *opts, const char *dir)
 
static void mg_handle_move (struct mg_connection *c, const struct mg_serve_http_opts *opts, const char *path, struct http_message *hm)
 
static void mg_handle_delete (struct mg_connection *nc, const struct mg_serve_http_opts *opts, const char *path)
 
static int mg_create_itermediate_directories (const char *path)
 
static void mg_handle_put (struct mg_connection *nc, const char *path, struct http_message *hm)
 
static int mg_is_dav_request (const struct mg_str *s)
 
MG_INTERNAL void mg_find_index_file (const char *path, const char *list, char **index_file, cs_stat_t *stp)
 
static int mg_http_send_port_based_redirect (struct mg_connection *c, struct http_message *hm, const struct mg_serve_http_opts *opts)
 
static pid_t mg_start_process (const char *interp, const char *cmd, const char *env, const char *envp[], const char *dir, sock_t sock)
 
static char * mg_addenv (struct mg_cgi_env_block *block, const char *fmt,...)
 
static void mg_addenv2 (struct mg_cgi_env_block *blk, const char *name)
 
static void mg_prepare_cgi_environment (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, struct mg_cgi_env_block *blk)
 
static void mg_cgi_ev_handler (struct mg_connection *cgi_nc, int ev, void *ev_data)
 
static 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)
 
static int mg_get_month_index (const char *s)
 
static int mg_num_leap_years (int year)
 
static void mg_http_send_digest_auth_request (struct mg_connection *c, const char *domain)
 
static void mg_http_send_options (struct mg_connection *nc)
 
static int mg_is_creation_request (const struct http_message *hm)
 
MG_INTERNAL void mg_send_http_file (struct mg_connection *nc, char *path, const struct mg_str *path_info, struct http_message *hm, struct mg_serve_http_opts *opts)
 
void mg_serve_http (struct mg_connection *nc, struct http_message *hm, struct mg_serve_http_opts opts)
 
static int mg_http_common_url_parse (const char *url, const char *schema, const char *schema_tls, int *use_ssl, char **addr, int *port_i, const char **path)
 
struct mg_connectionmg_connect_http_base (struct mg_mgr *mgr, mg_event_handler_t ev_handler, struct mg_connect_opts opts, const char *schema, const char *schema_ssl, const char *url, const char **path, char **addr)
 
struct mg_connectionmg_connect_http_opt (struct mg_mgr *mgr, mg_event_handler_t ev_handler, struct mg_connect_opts opts, const char *url, const char *extra_headers, const char *post_data)
 
struct mg_connectionmg_connect_http (struct mg_mgr *mgr, mg_event_handler_t ev_handler, const char *url, const char *extra_headers, const char *post_data)
 
struct mg_connectionmg_connect_ws_opt (struct mg_mgr *mgr, mg_event_handler_t ev_handler, struct mg_connect_opts opts, const char *url, const char *protocol, const char *extra_headers)
 
struct mg_connectionmg_connect_ws (struct mg_mgr *mgr, mg_event_handler_t ev_handler, const char *url, const char *protocol, const char *extra_headers)
 
size_t mg_parse_multipart (const char *buf, size_t buf_len, char *var_name, size_t var_name_len, char *file_name, size_t file_name_len, const char **data, size_t *data_len)
 
void mg_register_http_endpoint (struct mg_connection *nc, const char *uri_path, mg_event_handler_t handler)
 
const char * mg_skip (const char *s, const char *end, const char *delims, struct mg_str *v)
 
static int lowercase (const char *s)
 
int mg_ncasecmp (const char *s1, const char *s2, size_t len)
 
int mg_casecmp (const char *s1, const char *s2)
 
int mg_vcasecmp (const struct mg_str *str1, const char *str2)
 
int mg_vcmp (const struct mg_str *str1, const char *str2)
 
int mg_stat (const char *path, cs_stat_t *st)
 
FILE * mg_fopen (const char *path, const char *mode)
 
int mg_open (const char *path, int flag, int mode)
 
void mg_base64_encode (const unsigned char *src, int src_len, char *dst)
 
int mg_base64_decode (const unsigned char *s, int len, char *dst)
 
void mg_set_close_on_exec (sock_t sock)
 
void mg_sock_addr_to_str (const union socket_address *sa, char *buf, size_t len, int flags)
 
void mg_conn_addr_to_str (struct mg_connection *nc, char *buf, size_t len, int flags)
 
int mg_hexdump (const void *buf, int len, char *dst, int dst_len)
 
int mg_avprintf (char **buf, size_t size, const char *fmt, va_list ap)
 
void mg_hexdump_connection (struct mg_connection *nc, const char *path, const void *buf, int num_bytes, int ev)
 
int mg_is_big_endian (void)
 
const char * mg_next_comma_list_entry (const char *list, struct mg_str *val, struct mg_str *eq_val)
 
int mg_match_prefix_n (const struct mg_str pattern, const struct mg_str str)
 
int mg_match_prefix (const char *pattern, int pattern_len, const char *str)
 
struct mg_str mg_mk_str (const char *s)
 
int mg_rpc_create_reply (char *buf, int len, const struct mg_rpc_request *req, const char *result_fmt,...)
 
int mg_rpc_create_request (char *buf, int len, const char *method, const char *id, const char *params_fmt,...)
 
int mg_rpc_create_error (char *buf, int len, struct mg_rpc_request *req, int code, const char *message, const char *fmt,...)
 
int mg_rpc_create_std_error (char *buf, int len, struct mg_rpc_request *req, int code)
 
int mg_rpc_dispatch (const char *buf, int len, char *dst, int dst_len, const char **methods, mg_rpc_handler_t *handlers)
 
int mg_rpc_parse_reply (const char *buf, int len, struct json_token *toks, int max_toks, struct mg_rpc_reply *rep, struct mg_rpc_error *er)
 
static void mqtt_handler (struct mg_connection *nc, int ev, void *ev_data)
 
void mg_set_protocol_mqtt (struct mg_connection *nc)
 
void mg_send_mqtt_handshake (struct mg_connection *nc, const char *client_id)
 
void mg_send_mqtt_handshake_opt (struct mg_connection *nc, const char *client_id, struct mg_send_mqtt_handshake_opts opts)
 
static void mg_mqtt_prepend_header (struct mg_connection *nc, uint8_t cmd, uint8_t flags, size_t len)
 
void mg_mqtt_publish (struct mg_connection *nc, const char *topic, uint16_t message_id, int flags, const void *data, size_t len)
 
void mg_mqtt_subscribe (struct mg_connection *nc, const struct mg_mqtt_topic_expression *topics, size_t topics_len, uint16_t message_id)
 
int mg_mqtt_next_subscribe_topic (struct mg_mqtt_message *msg, struct mg_str *topic, uint8_t *qos, int pos)
 
void mg_mqtt_unsubscribe (struct mg_connection *nc, char **topics, size_t topics_len, uint16_t message_id)
 
void mg_mqtt_connack (struct mg_connection *nc, uint8_t return_code)
 
static void mg_send_mqtt_short_command (struct mg_connection *nc, uint8_t cmd, uint16_t message_id)
 
void mg_mqtt_puback (struct mg_connection *nc, uint16_t message_id)
 
void mg_mqtt_pubrec (struct mg_connection *nc, uint16_t message_id)
 
void mg_mqtt_pubrel (struct mg_connection *nc, uint16_t message_id)
 
void mg_mqtt_pubcomp (struct mg_connection *nc, uint16_t message_id)
 
void mg_mqtt_suback (struct mg_connection *nc, uint8_t *qoss, size_t qoss_len, uint16_t message_id)
 
void mg_mqtt_unsuback (struct mg_connection *nc, uint16_t message_id)
 
void mg_mqtt_ping (struct mg_connection *nc)
 
void mg_mqtt_pong (struct mg_connection *nc)
 
void mg_mqtt_disconnect (struct mg_connection *nc)
 
struct mg_dns_resource_recordmg_dns_next_record (struct mg_dns_message *msg, int query, struct mg_dns_resource_record *prev)
 
int mg_dns_parse_record_data (struct mg_dns_message *msg, struct mg_dns_resource_record *rr, void *data, size_t data_len)
 
int mg_dns_insert_header (struct mbuf *io, size_t pos, struct mg_dns_message *msg)
 
int mg_dns_copy_questions (struct mbuf *io, struct mg_dns_message *msg)
 
static int mg_dns_encode_name (struct mbuf *io, const char *name, size_t len)
 
int mg_dns_encode_record (struct mbuf *io, struct mg_dns_resource_record *rr, const char *name, size_t nlen, const void *rdata, size_t rlen)
 
void mg_send_dns_query (struct mg_connection *nc, const char *name, int query_type)
 
static unsigned char * mg_parse_dns_resource_record (unsigned char *data, unsigned char *end, struct mg_dns_resource_record *rr, int reply)
 
int mg_parse_dns (const char *buf, int len, struct mg_dns_message *msg)
 
size_t mg_dns_uncompress_name (struct mg_dns_message *msg, struct mg_str *name, char *dst, int dst_len)
 
static void dns_handler (struct mg_connection *nc, int ev, void *ev_data)
 
void mg_set_protocol_dns (struct mg_connection *nc)
 
static int mg_get_ip_address_of_nameserver (char *name, size_t name_len)
 
int mg_resolve_from_hosts_file (const char *name, union socket_address *usa)
 
static void mg_resolve_async_eh (struct mg_connection *nc, int ev, void *data)
 
int mg_resolve_async (struct mg_mgr *mgr, const char *name, int query, mg_resolve_callback_t cb, void *data)
 
int mg_resolve_async_opt (struct mg_mgr *mgr, const char *name, int query, mg_resolve_callback_t cb, void *data, struct mg_resolve_async_opts opts)
 

Variables

void *(* test_malloc )(size_t size)
 
void *(* test_calloc )(size_t count, size_t size)
 
enum cs_log_level cs_log_level
 
FILE * cs_log_file = NULL
 
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 []
 
static int mg_dns_tid = 0xa0
 
static const char * mg_default_dns_server = "udp://" MG_DEFAULT_NAMESERVER ":53"
 
MG_INTERNAL char mg_dns_server [256]
 

Macro Definition Documentation

#define _CRT_SECURE_NO_WARNINGS   /* Disable deprecation warning in VS2005+ */

Definition at line 635 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 635 of file mongoose.cc

#define _MG_ALLOWED_CONNECT_FLAGS_MASK
Value:

Definition at line 2109 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2109 of file mongoose.cc

Referenced by mg_connect_opt(), and mg_create_connection_base().

#define _MG_CALLBACK_MODIFIABLE_FLAGS_MASK
Value:

Definition at line 2113 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2113 of file mongoose.cc

Referenced by mg_call().

#define _MG_F_FD_CAN_READ   1

Definition at line 3512 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3512 of file mongoose.cc

Referenced by mg_mgr_handle_conn(), and mg_mgr_poll().

#define _MG_F_FD_CAN_WRITE   1 << 1

Definition at line 3513 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3513 of file mongoose.cc

Referenced by mg_mgr_handle_conn(), and mg_mgr_poll().

#define _MG_F_FD_ERROR   1 << 2

Definition at line 3514 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3514 of file mongoose.cc

Referenced by mg_mgr_poll().

#define BASE64_ENCODE_BODY
Value:
static const char *b64 = \
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; \
int i, j, a, b, c; \
for (i = j = 0; i < src_len; i += 3) { \
a = src[i]; \
b = i + 1 >= src_len ? 0 : src[i + 1]; \
c = i + 2 >= src_len ? 0 : src[i + 2]; \
BASE64_OUT(b64[a >> 2]); \
BASE64_OUT(b64[((a & 3) << 4) | (b >> 4)]); \
if (i + 1 < src_len) { \
BASE64_OUT(b64[(b & 15) << 2 | (c >> 6)]); \
} \
if (i + 2 < src_len) { \
BASE64_OUT(b64[c & 63]); \
} \
} \
while (j % 4 != 0) { \
BASE64_OUT('='); \
} \
BASE64_FLUSH()

Definition at line 206 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 206 of file mongoose.cc

Referenced by cs_base64_encode(), and cs_fprint_base64().

#define BASE64_FLUSH ( )
Value:
do { \
dst[j++] = '\0'; \
} while (0)

Definition at line 255 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 255 of file mongoose.cc

#define BASE64_FLUSH ( )

Definition at line 255 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 255 of file mongoose.cc

#define BASE64_OUT (   ch)
Value:
do { \
dst[j++] = (ch); \
} while (0)

Definition at line 249 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 249 of file mongoose.cc

#define BASE64_OUT (   ch)
Value:
do { \
fprintf(f, "%c", (ch)); \
j++; \
} while (0)

Definition at line 249 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 249 of file mongoose.cc

#define blk (   i)
Value:
(block->l[i & 15] = rol(block->l[(i + 13) & 15] ^ block->l[(i + 8) & 15] ^ \
block->l[(i + 2) & 15] ^ block->l[i & 15], \
1))

Definition at line 1592 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1592 of file mongoose.cc

#define C_SNPRINTF_APPEND_CHAR (   ch)
Value:
do { \
if (i < (int) buf_size) buf[i] = ch; \
i++; \
} while (0)

Definition at line 1827 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1827 of file mongoose.cc

Referenced by c_itoa(), and c_vsnprintf().

#define C_SNPRINTF_FLAG_ZERO   1

Definition at line 1833 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1833 of file mongoose.cc

Referenced by c_itoa(), and c_vsnprintf().

#define CS_COMMON_CS_DIRENT_H_

Definition at line 397 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 397 of file mongoose.cc

#define CS_COMMON_PLATFORMS_SIMPLELINK_SL_FS_SLFS_H_

Definition at line 10347 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 10347 of file mongoose.cc

#define CS_MONGOOSE_SRC_INTERNAL_H_

Definition at line 11 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 11 of file mongoose.cc

#define EMIT (   x)
Value:
do { \
if (s < end) *s = x; \
s++; \
} while (0)

Referenced by json_emit_quoted_str().

#define END_OF_STRING   (-1)

Definition at line 677 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 677 of file mongoose.cc

Referenced by cur(), parse_key(), parse_value(), test_and_skip(), and test_no_skip().

#define EXPECT (   cond,
  err_code 
)
Value:
do { \
if (!(cond)) return (err_code); \
} while (0)

Definition at line 668 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 668 of file mongoose.cc

Referenced by capture_len(), parse_identifier(), parse_number(), and parse_string().

#define F1 (   x,
  y,
  z 
)    (z ^ (x & (y ^ z)))

Definition at line 1249 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1249 of file mongoose.cc

Referenced by MD5Transform().

#define F2 (   x,
  y,
  z 
)    F1(z, x, y)

Definition at line 1250 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1250 of file mongoose.cc

Referenced by MD5Transform().

#define F3 (   x,
  y,
  z 
)    (x ^ y ^ z)

Definition at line 1251 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1251 of file mongoose.cc

Referenced by MD5Transform().

#define F4 (   x,
  y,
  z 
)    (y ^ (x | ~z))

Definition at line 1252 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1252 of file mongoose.cc

Referenced by MD5Transform().

#define FROZEN_FREE   free

Definition at line 653 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 653 of file mongoose.cc

Referenced by parse_json2().

#define FROZEN_REALLOC   realloc

Definition at line 649 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 649 of file mongoose.cc

Referenced by capture_ptr().

#define HEXTOI (   x)    (isdigit(x) ? x - '0' : x - 'W')

Referenced by mg_url_decode().

#define intptr_t   long

Definition at line 2119 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2119 of file mongoose.cc

#define MBUF_FREE   MG_FREE

Definition at line 34 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 34 of file mongoose.cc

Referenced by mbuf_free().

#define MBUF_REALLOC   MG_REALLOC

Definition at line 30 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 30 of file mongoose.cc

Referenced by mbuf_insert(), and mbuf_resize().

#define MD5STEP (   f,
  w,
  x,
  y,
  z,
  data,
  s 
)    (w += f(x, y, z) + data, w = w << s | w >> (32 - s), w += x)

Definition at line 1254 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1254 of file mongoose.cc

Referenced by MD5Transform().

#define MG_CALLOC   calloc

Definition at line 18 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 18 of file mongoose.cc

Referenced by mg_create_connection_base(), mg_http_get_proto_data(), mg_resolve_async_opt(), and mg_send_dns_query().

#define MG_COPY_COMMON_CONNECTION_OPTIONS (   dst,
  src 
)    memcpy(dst, src, sizeof(*dst));

Definition at line 2105 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2105 of file mongoose.cc

Referenced by mg_bind_opt(), and mg_connect_opt().

#define MG_CTL_MSG_MESSAGE_SIZE   8192

Definition at line 59 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 59 of file mongoose.cc

#define MG_DEFAULT_NAMESERVER   "8.8.8.8"

Definition at line 9348 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9348 of file mongoose.cc

#define MG_INTERNAL   static

Definition at line 43 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 43 of file mongoose.cc

#define MG_MALLOC   malloc

Definition at line 14 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 14 of file mongoose.cc

Referenced by mg_avprintf(), mg_hexdump_connection(), mg_http_parse_range_header(), mg_read_from_socket(), mg_recvfrom(), mg_resolve_async_eh(), mg_uri_to_local_path(), and parse_mqtt().

#define MG_MAX_HOST_LEN   200

Definition at line 2103 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2103 of file mongoose.cc

Referenced by mg_bind_opt(), and mg_connect_opt().

#define MG_REALLOC   realloc

Definition at line 22 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 22 of file mongoose.cc

Referenced by mg_find_index_file(), and mg_http_common_url_parse().

#define MG_SET_PTRPTR (   _ptr,
  _v 
)
Value:
do { \
if (_ptr) *(_ptr) = _v; \
} while (0)

Definition at line 37 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 37 of file mongoose.cc

Referenced by mg_bind_opt(), mg_connect_http_base(), mg_connect_opt(), mg_create_connection(), and mg_create_connection_base().

#define MG_TCP_RECV_BUFFER_SIZE   1024

Definition at line 3130 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3130 of file mongoose.cc

Referenced by mg_read_from_socket().

#define MG_UDP_RECV_BUFFER_SIZE   1500

Definition at line 3131 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3131 of file mongoose.cc

Referenced by mg_recvfrom().

#define MG_WS_NO_HOST_HEADER_MAGIC   ((char *) 0x1)

Definition at line 4149 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4149 of file mongoose.cc

Referenced by mg_send_websocket_handshake(), and mg_send_websocket_handshake2().

#define MIME_ENTRY (   _ext,
  _type 
)    { _ext, sizeof(_ext) - 1, _type }

Definition at line 4312 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4312 of file mongoose.cc

#define NUM_DIGITS   ('9' - '0' + 1)

Definition at line 139 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 139 of file mongoose.cc

Referenced by cs_base64_emit_code().

#define NUM_LETTERS   (NUM_UPPERCASES * 2)

Definition at line 138 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 138 of file mongoose.cc

Referenced by cs_base64_emit_code().

#define NUM_UPPERCASES   ('Z' - 'A' + 1)

Definition at line 137 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 137 of file mongoose.cc

Referenced by cs_base64_emit_code().

#define R0 (   v,
  w,
  x,
  y,
  z,
  i 
)
Value:
z += ((w & (x ^ y)) ^ y) + blk0(block, i) + 0x5A827999 + rol(v, 5); \
w = rol(w, 30);

Definition at line 1596 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1596 of file mongoose.cc

Referenced by cs_sha1_transform(), Matter::flavor(), and LBT::flavor().

#define R1 (   v,
  w,
  x,
  y,
  z,
  i 
)
Value:
z += ((w & (x ^ y)) ^ y) + blk(i) + 0x5A827999 + rol(v, 5); \
w = rol(w, 30);

Definition at line 1599 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1599 of file mongoose.cc

Referenced by cs_sha1_transform(), Matter::flavor(), LBT::flavor(), SecondaryVertexFinder::process_event(), TPCEventDisplay(), and LBT::twflavor().

#define R2 (   v,
  w,
  x,
  y,
  z,
  i 
)
Value:
z += (w ^ x ^ y) + blk(i) + 0x6ED9EBA1 + rol(v, 5); \
w = rol(w, 30);

Definition at line 1602 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1602 of file mongoose.cc

Referenced by cs_sha1_transform(), Matter::flavor(), LBT::flavor(), SecondaryVertexFinder::process_event(), TPCEventDisplay(), Acts::AtlasStepper::transportCovarianceToBound(), and LBT::twflavor().

#define R3 (   v,
  w,
  x,
  y,
  z,
  i 
)
Value:
z += (((w | x) & y) | (w & x)) + blk(i) + 0x8F1BBCDC + rol(v, 5); \
w = rol(w, 30);

Definition at line 1605 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1605 of file mongoose.cc

Referenced by cs_sha1_transform(), Matter::flavor(), LBT::flavor(), and TPCEventDisplay().

#define R4 (   v,
  w,
  x,
  y,
  z,
  i 
)
Value:
z += (w ^ x ^ y) + blk(i) + 0xCA62C1D6 + rol(v, 5); \
w = rol(w, 30);

Definition at line 1608 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1608 of file mongoose.cc

Referenced by cs_sha1_transform(), Matter::flavor(), and LBT::flavor().

#define rol (   value,
  bits 
)    (((value) << (bits)) | ((value) >> (32 - (bits))))

Definition at line 1573 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1573 of file mongoose.cc

Referenced by blk0().

#define SHA1HANDSOFF

Definition at line 1563 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1563 of file mongoose.cc

#define TRY (   expr)
Value:
do { \
int _n = expr; \
if (_n < 0) return _n; \
} while (0)

Definition at line 672 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 672 of file mongoose.cc

Referenced by doit(), expect(), parse_array(), parse_identifier(), parse_json(), parse_key(), parse_number(), parse_object(), parse_pair(), parse_string(), and parse_value().

Typedef Documentation

typedef int cs_dirent_dummy

Definition at line 580 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 580 of file mongoose.cc

Enumeration Type Documentation

Enumerator:
MPS_BEGIN 
MPS_WAITING_FOR_BOUNDARY 
MPS_WAITING_FOR_CHUNK 
MPS_GOT_CHUNK 
MPS_GOT_BOUNDARY 
MPS_FINALIZE 
MPS_FINISHED 

Definition at line 4184 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4184 of file mongoose.cc

Enumerator:
DATA_NONE 
DATA_FILE 
DATA_PUT 

Definition at line 4159 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4159 of file mongoose.cc

Function Documentation

static uint32_t blk0 ( union char64long16 block,
int  i 
)
static

Definition at line 1575 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1575 of file mongoose.cc

References i, char64long16::l, and rol.

static void byteReverse ( unsigned char *  buf,
unsigned  longs 
)
static

Definition at line 1234 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1234 of file mongoose.cc

References t.

Referenced by MD5_Final(), and MD5_Update().

+ Here is the caller graph for this function:

static int c_itoa ( char *  buf,
size_t  buf_size,
int64_t  num,
int  base,
int  flags,
int  field_width 
)
static

Definition at line 1840 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1840 of file mongoose.cc

References C_SNPRINTF_APPEND_CHAR, C_SNPRINTF_FLAG_ZERO, i, k, and Acts::Test::tmp().

Referenced by c_vsnprintf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int c_snprintf ( char *  buf,
size_t  buf_size,
const char *  fmt,
  ... 
)

Definition at line 2018 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2018 of file mongoose.cc

References c_vsnprintf().

+ Here is the call graph for this function:

size_t c_strnlen ( const char *  s,
size_t  maxlen 
)

Definition at line 1820 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1820 of file mongoose.cc

References char64long16::l.

Referenced by c_vsnprintf().

+ Here is the caller graph for this function:

const char* c_strnstr ( const char *  s,
const char *  find,
size_t  slen 
)

Definition at line 2058 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2058 of file mongoose.cc

References i.

int c_vsnprintf ( char *  buf,
size_t  buf_size,
const char *  fmt,
va_list  ap 
)

Definition at line 1881 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1881 of file mongoose.cc

References c_itoa(), C_SNPRINTF_APPEND_CHAR, C_SNPRINTF_FLAG_ZERO, c_strnlen(), i, j, precision, and physmon_simulation::s.

Referenced by c_snprintf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int capture_len ( struct frozen f,
int  token_index,
const char *  ptr 
)
static

Definition at line 763 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 763 of file mongoose.cc

References EXPECT, JSON_STRING_INVALID, json_token::len, frozen::max_tokens, json_token::num_desc, frozen::num_tokens, json_token::ptr, and frozen::tokens.

Referenced by doit(), expect(), parse_array(), parse_identifier(), parse_number(), parse_object(), and parse_string().

+ Here is the caller graph for this function:

static int capture_ptr ( struct frozen f,
const char *  ptr,
enum json_type  type 
)
static

Definition at line 747 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 747 of file mongoose.cc

References frozen::do_realloc, FROZEN_REALLOC, JSON_TOKEN_ARRAY_TOO_SMALL, frozen::max_tokens, frozen::num_tokens, merge_hashes::p, json_token::ptr, frozen::tokens, parse_cmake_options::type, and json_token::type.

Referenced by doit(), expect(), parse_array(), parse_identifier(), parse_number(), parse_object(), and parse_string().

+ Here is the caller graph for this function:

static int compare ( const char *  s,
const char *  str,
int  len 
)
static

Definition at line 858 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 858 of file mongoose.cc

References i.

int cs_base64_decode ( const unsigned char *  s,
int  len,
char *  dst 
)

Definition at line 305 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 305 of file mongoose.cc

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, and from_b64().

Referenced by mg_base64_decode().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cs_base64_emit_chunk ( struct cs_base64_ctx ctx)
static

Definition at line 159 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 159 of file mongoose.cc

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, cs_base64_ctx::chunk, cs_base64_ctx::chunk_size, and cs_base64_emit_code().

Referenced by cs_base64_finish(), and cs_base64_update().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void cs_base64_emit_code ( struct cs_base64_ctx ctx,
int  v 
)
static

Definition at line 146 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 146 of file mongoose.cc

References cs_base64_ctx::b64_putc, NUM_DIGITS, NUM_LETTERS, NUM_UPPERCASES, and cs_base64_ctx::user_data.

Referenced by cs_base64_emit_chunk().

+ Here is the caller graph for this function:

void cs_base64_encode ( const unsigned char *  src,
int  src_len,
char *  dst 
)

Definition at line 241 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 241 of file mongoose.cc

References BASE64_ENCODE_BODY.

Referenced by mg_base64_encode().

+ Here is the caller graph for this function:

void cs_base64_finish ( struct cs_base64_ctx ctx)

Definition at line 195 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 195 of file mongoose.cc

References cs_base64_ctx::b64_putc, cs_base64_ctx::chunk, cs_base64_ctx::chunk_size, cs_base64_emit_chunk(), i, and cs_base64_ctx::user_data.

+ Here is the call graph for this function:

void cs_base64_init ( struct cs_base64_ctx ctx,
cs_base64_putc_t  b64_putc,
void *  user_data 
)

Definition at line 176 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 176 of file mongoose.cc

References cs_base64_ctx::b64_putc, cs_base64_ctx::chunk_size, and cs_base64_ctx::user_data.

void cs_base64_update ( struct cs_base64_ctx ctx,
const char *  str,
size_t  len 
)

Definition at line 183 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 183 of file mongoose.cc

References cs_base64_ctx::chunk, cs_base64_ctx::chunk_size, cs_base64_emit_chunk(), and i.

+ Here is the call graph for this function:

void cs_fprint_base64 ( FILE *  f,
const unsigned char *  src,
int  src_len 
)

Definition at line 257 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 257 of file mongoose.cc

References BASE64_ENCODE_BODY.

void cs_hmac_sha1 ( const unsigned char *  key,
size_t  keylen,
const unsigned char *  data,
size_t  datalen,
unsigned char  out[20] 
)

Definition at line 1771 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1771 of file mongoose.cc

References cs_sha1_final(), cs_sha1_init(), cs_sha1_update(), and i.

+ Here is the call graph for this function:

void cs_log_print_prefix ( const char *  func)

Definition at line 355 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 355 of file mongoose.cc

References cs_log_file, cs_time(), and fprintf().

+ Here is the call graph for this function:

void cs_log_printf ( const char *  fmt,
  ... 
)

Definition at line 367 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 367 of file mongoose.cc

References cs_log_file.

void cs_log_set_file ( FILE *  file)

Definition at line 376 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 376 of file mongoose.cc

References cs_log_file, and file.

void cs_log_set_level ( enum cs_log_level  level)

Definition at line 382 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 382 of file mongoose.cc

References cs_time(), and physmon_simulation::level.

+ Here is the call graph for this function:

char* cs_md5 ( char  buf[33],
  ... 
)

Definition at line 1434 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1434 of file mongoose.cc

References cs_to_hex(), json_token::len, MD5_Final(), MD5_Init(), MD5_Update(), and merge_hashes::p.

Referenced by mg_http_create_digest_auth_header(), and mg_mkmd5resp().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cs_sha1_final ( unsigned char  digest[20],
cs_sha1_ctx context 
)

Definition at line 1747 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1747 of file mongoose.cc

References Acts::PhysicalConstants::c, cs_sha1_ctx::count, cs_sha1_update(), i, and cs_sha1_ctx::state.

Referenced by cs_hmac_sha1(), and mg_ws_handshake().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cs_sha1_init ( cs_sha1_ctx context)

Definition at line 1718 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1718 of file mongoose.cc

References cs_sha1_ctx::count, and cs_sha1_ctx::state.

Referenced by cs_hmac_sha1(), and mg_ws_handshake().

+ Here is the caller graph for this function:

void cs_sha1_transform ( uint32_t  state[5],
const unsigned char  buffer[64] 
)

Definition at line 1612 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1612 of file mongoose.cc

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, Acts::UnitConstants::e, R0, R1, R2, R3, and R4.

Referenced by cs_sha1_update().

+ Here is the caller graph for this function:

void cs_sha1_update ( cs_sha1_ctx context,
const unsigned char *  data,
uint32_t  len 
)

Definition at line 1727 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1727 of file mongoose.cc

References cs_sha1_ctx::buffer, cs_sha1_ctx::count, cs_sha1_transform(), i, j, and cs_sha1_ctx::state.

Referenced by cs_hmac_sha1(), cs_sha1_final(), and mg_ws_handshake().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double cs_time ( )

Definition at line 601 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 601 of file mongoose.cc

References double().

Referenced by cs_log_print_prefix(), cs_log_set_level(), and mg_time().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cs_to_hex ( char *  to,
const unsigned char *  p,
size_t  len 
)

Definition at line 1424 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1424 of file mongoose.cc

Referenced by cs_md5().

+ Here is the caller graph for this function:

static int cur ( struct frozen f)
static

Definition at line 691 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 691 of file mongoose.cc

References frozen::cur, frozen::end, END_OF_STRING, and skip_whitespaces().

Referenced by planarity::case_A(), planarity::case_D(), parse_array(), parse_identifier(), parse_key(), parse_number(), parse_object(), parse_value(), testing::internal::PrintCharsAsStringTo(), test_and_skip(), and test_no_skip().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void dns_handler ( struct mg_connection nc,
int  ev,
void *  ev_data 
)
static

Definition at line 9224 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9224 of file mongoose.cc

References mbuf::buf, mg_connection::flags, mg_dns_message::flags, mg_connection::handler, mbuf::len, mbuf_insert(), mbuf_remove(), mg_dns_insert_header(), MG_DNS_MESSAGE, MG_EV_RECV, MG_F_UDP, mg_parse_dns(), mg_send(), and mg_connection::recv_mbuf.

Referenced by mg_set_protocol_dns().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void do_ssi_exec ( struct mg_connection nc,
char *  tag 
)
static

Definition at line 5766 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5766 of file mongoose.cc

References runCondor_beamspot::cmd, mg_printf(), mg_send_file_data(), and pclose().

Referenced by mg_send_ssi_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int doit ( struct frozen f)
static

Definition at line 960 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 960 of file mongoose.cc

References capture_len(), capture_ptr(), frozen::cur, frozen::end, JSON_STRING_INCOMPLETE, JSON_STRING_INVALID, JSON_TYPE_EOF, frozen::num_tokens, parse_array(), parse_object(), test_no_skip(), and TRY.

Referenced by TrkrNtuplizer::fillOutputNtuples(), SvtxEvaluator::fillOutputNtuples(), parse_json(), and parse_json2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int expect ( struct frozen f,
const char *  s,
int  len,
enum json_type  t 
)
static

Definition at line 864 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 864 of file mongoose.cc

References capture_len(), capture_ptr(), frozen::cur, i, JSON_STRING_INCOMPLETE, JSON_STRING_INVALID, left(), json_token::len, n, frozen::num_tokens, and TRY.

Referenced by Acts::Test::BOOST_AUTO_TEST_CASE(), and parse_value().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct json_token* find_json_token ( struct json_token toks,
const char *  path 
)
read

Definition at line 1015 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1015 of file mongoose.cc

References compare(), i, is_digit(), JSON_TYPE_ARRAY, JSON_TYPE_OBJECT, JSON_TYPE_STRING, json_token::len, n, json_token::num_desc, path_part_len(), json_token::ptr, Acts::Test::skip, parse_cmake_options::type, and json_token::type.

Referenced by mg_rpc_dispatch(), and mg_rpc_parse_reply().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static unsigned char from_b64 ( unsigned char  ch)
static

Definition at line 266 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 266 of file mongoose.cc

Referenced by cs_base64_decode().

+ Here is the caller graph for this function:

static int get_escape_len ( const char *  s,
int  len 
)
static

Definition at line 725 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 725 of file mongoose.cc

References is_hex_digit(), JSON_STRING_INCOMPLETE, and JSON_STRING_INVALID.

Referenced by parse_string().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int get_utf8_char_len ( unsigned char  ch)
static

Definition at line 783 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 783 of file mongoose.cc

Referenced by parse_string().

+ Here is the caller graph for this function:

static int is_alpha ( int  ch)
static

Definition at line 713 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 713 of file mongoose.cc

Referenced by parse_identifier(), and parse_key().

+ Here is the caller graph for this function:

static int is_digit ( int  ch)
static

Definition at line 717 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 717 of file mongoose.cc

Referenced by find_json_token(), is_hex_digit(), parse_identifier(), and parse_number().

+ Here is the caller graph for this function:

static int is_hex_digit ( int  ch)
static

Definition at line 721 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 721 of file mongoose.cc

References is_digit().

Referenced by get_escape_len().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int is_space ( int  ch)
static

Definition at line 683 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 683 of file mongoose.cc

Referenced by skip_whitespaces().

+ Here is the caller graph for this function:

static int isbyte ( int  n)
static

Definition at line 3030 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3030 of file mongoose.cc

Referenced by parse_net().

+ Here is the caller graph for this function:

int json_emit ( char *  buf,
int  buf_len,
const char *  fmt,
  ... 
)

Definition at line 1199 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1199 of file mongoose.cc

References json_emit_va(), and json_token::len.

Referenced by mg_rpc_create_error(), mg_rpc_create_reply(), and mg_rpc_create_request().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int json_emit_double ( char *  buf,
int  buf_len,
double  value 
)

Definition at line 1059 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1059 of file mongoose.cc

References n, and Acts::Test::tmp().

Referenced by json_emit_va().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int json_emit_long ( char *  buf,
int  buf_len,
long int  value 
)

Definition at line 1052 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1052 of file mongoose.cc

References n, and Acts::Test::tmp().

Referenced by json_emit_va().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int json_emit_quoted_str ( char *  s,
int  s_len,
const char *  str,
int  len 
)

Definition at line 1066 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1066 of file mongoose.cc

References parse_cmake_options::begin, EMIT, end, json_token::len, and physmon_simulation::s.

Referenced by json_emit_va(), and mg_rpc_create_reply().

+ Here is the caller graph for this function:

int json_emit_unquoted_str ( char *  buf,
int  buf_len,
const char *  str,
int  len 
)

Definition at line 1120 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1120 of file mongoose.cc

References json_token::len, and n.

Referenced by json_emit_va(), and mg_rpc_create_reply().

+ Here is the caller graph for this function:

int json_emit_va ( char *  s,
int  s_len,
const char *  fmt,
va_list  ap 
)

Definition at line 1131 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1131 of file mongoose.cc

References end, json_emit_double(), json_emit_long(), json_emit_quoted_str(), json_emit_unquoted_str(), json_token::len, physmon_simulation::s, and str.

Referenced by json_emit(), mg_rpc_create_error(), mg_rpc_create_reply(), and mg_rpc_create_request().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int left ( const struct frozen f)
static

Definition at line 679 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 679 of file mongoose.cc

References frozen::cur, and frozen::end.

Referenced by SearchTree< T >::_do_initial_connections(), prdfoStream::addEvent(), daqBuffer::addSubevent(), Acts::Test::BOOST_DATA_TEST_CASE(), noiPadDimSet::calc_pads(), testing::internal::String::CaseInsensitiveWideCStringEquals(), nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::divideTree(), expect(), FillCalHist(), FillRawHist(), FindBlobs(), Acts::Logging::NamedOutputDecorator::flush(), Acts::Logging::TimedOutputDecorator::flush(), Acts::Logging::ThreadOutputDecorator::flush(), Acts::Logging::LevelOutputDecorator::flush(), ABlob::GetPHI(), noiPadDimSet::make_pad(), testing::internal::PointwiseMatcher< TupleMatcher, RhsContainer >::Impl< LhsContainer >::MatchAndExplain(), md5_append(), ActsExamples::ModuleClusters::mergeParameters(), mg_http_transfer_file_data(), mvtx::PayLoadCont::moveUnusedToHead(), daqBuffer::nextEvent(), NoiseSimulator(), SearchTree< T >::Node::nullify_treelinks(), parse_string(), nanoflann::KDTreeSingleIndexAdaptor< Distance, DatasetAdaptor, DIM, IndexType >::planeSplit(), Acts::PerigeeSurface::polyhedronRepresentation(), Acts::StrawSurface::polyhedronRepresentation(), prdfoStream::prepare_next(), daqBuffer::prepare_next(), genfit::GblFitterInfo::Print(), printHeader(), ProjectionReverse(), ProjectionReverse2(), ATrace::PulseWidth(), Acts::Frustum< value_t, DIM, SIDES >::svg(), SearchTree< T >::Node::treelinks_null(), and SearchTree< T >::verify_structure_recursive().

+ Here is the caller graph for this function:

static int lowercase ( const char *  s)
static

Definition at line 7868 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7868 of file mongoose.cc

Referenced by mg_match_prefix_n(), and mg_ncasecmp().

+ Here is the caller graph for this function:

size_t mbuf_append ( struct mbuf a,
const void *  buf,
size_t  len 
)

Definition at line 1541 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1541 of file mongoose.cc

References mbuf::len, and mbuf_insert().

Referenced by mg_dns_copy_questions(), mg_dns_encode_name(), mg_dns_encode_record(), mg_if_tcp_send(), mg_if_udp_send(), and mg_recv_common().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mbuf_free ( struct mbuf mbuf)

Definition at line 1484 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1484 of file mongoose.cc

References mbuf::buf, MBUF_FREE, and mbuf_init().

Referenced by mg_destroy_conn(), mg_recv_common(), and mg_send_dns_query().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mbuf_init ( struct mbuf mbuf,
size_t  initial_size 
)

Definition at line 1478 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1478 of file mongoose.cc

References mbuf::buf, mbuf::len, mbuf_resize(), and mbuf::size.

Referenced by mbuf_free(), and mg_send_dns_query().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t mbuf_insert ( struct mbuf a,
size_t  off,
const void *  buf,
size_t  len 
)

Definition at line 1509 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1509 of file mongoose.cc

References assert, mbuf::buf, mbuf::len, json_token::len, MBUF_REALLOC, MBUF_SIZE_MULTIPLIER, merge_hashes::p, size, and mbuf::size.

Referenced by dns_handler(), mbuf_append(), mg_dns_insert_header(), mg_mqtt_prepend_header(), and mg_send_dns_query().

+ Here is the caller graph for this function:

void mbuf_remove ( struct mbuf mb,
size_t  n 
)

Definition at line 1545 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1545 of file mongoose.cc

References mbuf::buf, mbuf::len, json_token::len, and n.

Referenced by dns_handler(), mg_deliver_websocket_data(), mg_forward(), mg_handle_cgi(), mg_handle_put(), mg_http_handler(), mg_http_transfer_file_data(), mg_resolve_async_eh(), mg_write_to_socket(), mqtt_handler(), and parse_mqtt().

+ Here is the caller graph for this function:

void mbuf_resize ( struct mbuf a,
size_t  new_size 
)

Definition at line 1491 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1491 of file mongoose.cc

References mbuf::buf, mbuf::len, MBUF_REALLOC, size, and mbuf::size.

Referenced by mbuf_init(), mbuf_trim(), and mg_deliver_websocket_data().

+ Here is the caller graph for this function:

void mbuf_trim ( struct mbuf mbuf)

Definition at line 1505 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1505 of file mongoose.cc

References mbuf::len, and mbuf_resize().

+ Here is the call graph for this function:

void MD5_Final ( unsigned char  digest[16],
MD5_CTX ctx 
)

Definition at line 1388 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1388 of file mongoose.cc

References KFPMath::a, MD5Context::bits, MD5Context::buf, byteReverse(), test_fpe::count, MD5Context::in, MD5Transform(), and merge_hashes::p.

Referenced by cs_md5().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void MD5_Init ( MD5_CTX ctx)

Definition at line 1261 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1261 of file mongoose.cc

References MD5Context::bits, and MD5Context::buf.

Referenced by cs_md5().

+ Here is the caller graph for this function:

void MD5_Update ( MD5_CTX ctx,
const unsigned char *  buf,
size_t  len 
)

Definition at line 1353 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1353 of file mongoose.cc

References MD5Context::bits, MD5Context::buf, byteReverse(), if(), MD5Context::in, MD5Transform(), merge_hashes::p, and t.

Referenced by cs_md5().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void MD5Transform ( uint32_t  buf[4],
uint32_t const  in[16] 
)
static

Definition at line 1271 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1271 of file mongoose.cc

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, F1, F2, F3, F4, and MD5STEP.

Referenced by MD5_Final(), and MD5_Update().

+ Here is the caller graph for this function:

static int mg_accept_conn ( struct mg_connection lc)
static

Definition at line 3247 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3247 of file mongoose.cc

References DBG, mg_close_conn(), mg_if_accept_new_conn(), mg_if_accept_tcp_cb(), mg_is_error(), mg_sock_set(), socket_address::sa, socket_address::sin, mg_connection::sock, mg_connection::ssl, and mg_connection::ssl_ctx.

Referenced by mg_mgr_handle_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MG_INTERNAL void mg_add_conn ( struct mg_mgr mgr,
struct mg_connection c 
)

Definition at line 2130 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2130 of file mongoose.cc

References mg_mgr::active_connections, Acts::PhysicalConstants::c, DBG, mg_ev_mgr_add_conn(), mg_connection::mgr, mg_connection::next, and mg_connection::prev.

Referenced by mg_add_sock_opt(), mg_bind_opt(), mg_do_connect(), mg_if_accept_new_conn(), and mg_if_recv_udp_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_add_sock ( struct mg_mgr s,
sock_t  sock,
mg_event_handler_t  callback 
)
read

Definition at line 3107 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3107 of file mongoose.cc

References mg_add_sock_opt().

Referenced by mg_handle_cgi().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_add_sock_opt ( struct mg_mgr s,
sock_t  sock,
mg_event_handler_t  callback,
struct mg_add_sock_opts  opts 
)
read

Definition at line 3096 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3096 of file mongoose.cc

References mg_add_conn(), mg_create_connection_base(), mg_sock_set(), and mg_connection::mgr.

Referenced by mg_add_sock().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_add_to_set ( sock_t  sock,
fd_set *  set,
sock_t *  max_fd 
)

Definition at line 3630 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3630 of file mongoose.cc

References mg_connection::sock.

Referenced by mg_mgr_poll().

+ Here is the caller graph for this function:

static char* mg_addenv ( struct mg_cgi_env_block block,
const char *  fmt,
  ... 
)
static

Definition at line 7145 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7145 of file mongoose.cc

References ARRAY_SIZE, mg_cgi_env_block::buf, mg_cgi_env_block::len, n, mg_cgi_env_block::nvars, and mg_cgi_env_block::vars.

Referenced by mg_addenv2(), and mg_prepare_cgi_environment().

+ Here is the caller graph for this function:

static void mg_addenv2 ( struct mg_cgi_env_block blk,
const char *  name 
)
static

Definition at line 7171 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7171 of file mongoose.cc

References mg_addenv(), and physmon_simulation::s.

Referenced by mg_prepare_cgi_environment().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_avprintf ( char **  buf,
size_t  size,
const char *  fmt,
va_list  ap 
)

Definition at line 8058 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8058 of file mongoose.cc

References MG_FREE, and MG_MALLOC.

Referenced by mg_printf_html_escape(), mg_printf_http_chunk(), mg_printf_websocket_frame(), and mg_vprintf().

+ Here is the caller graph for this function:

int mg_base64_decode ( const unsigned char *  s,
int  len,
char *  dst 
)

Definition at line 7942 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7942 of file mongoose.cc

References cs_base64_decode().

+ Here is the call graph for this function:

void mg_base64_encode ( const unsigned char *  src,
int  src_len,
char *  dst 
)

Definition at line 7938 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7938 of file mongoose.cc

References cs_base64_encode().

Referenced by mg_send_websocket_handshake2(), and mg_ws_handshake().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_bind ( struct mg_mgr srv,
const char *  address,
mg_event_handler_t  event_handler 
)
read

Definition at line 2943 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2943 of file mongoose.cc

References mg_bind_opt().

Referenced by mg_server().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_bind_opt ( struct mg_mgr mgr,
const char *  address,
mg_event_handler_t  callback,
struct mg_bind_opts  opts 
)
read

Definition at line 2950 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2950 of file mongoose.cc

References DBG, check_license::err(), mg_bind_opts::error_string, mg_connection::flags, mg_add_conn(), MG_COPY_COMMON_CONNECTION_OPTIONS, mg_create_connection(), mg_destroy_conn(), MG_F_LISTENING, MG_F_UDP, mg_if_listen_tcp(), mg_if_listen_udp(), MG_MAX_HOST_LEN, mg_parse_address(), MG_SET_PTRPTR, mg_set_ssl(), mg_connection::mgr, and mg_connection::sa.

Referenced by mg_bind().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_broadcast ( struct mg_mgr mgr,
mg_event_handler_t  cb,
void *  data,
size_t  len 
)

Definition at line 3005 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3005 of file mongoose.cc

References ctl_msg::callback, Acts::Test::cb, mg_mgr::ctl, dummy, ctl_msg::message, gtest_output_test::message, MG_RECV_FUNC, and MG_SEND_FUNC.

MG_INTERNAL void mg_call ( struct mg_connection nc,
mg_event_handler_t  ev_handler,
int  ev,
void *  ev_data 
)

Definition at line 2147 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2147 of file mongoose.cc

References _MG_CALLBACK_MODIFIABLE_FLAGS_MASK, mbuf::buf, DBG, ev_handler(), mg_connection::flags, mg_connection::handler, mg_mgr::hexdump_file, mbuf::len, MG_EV_POLL, MG_EV_RECV, MG_EV_SEND, MG_F_UDP, mg_hexdump_connection(), mg_if_recved(), mg_connection::mgr, mg_connection::proto_handler, mg_connection::recv_mbuf, and mg_connection::send_mbuf.

Referenced by mg_close_conn(), mg_do_ssi_call(), mg_handle_chunked(), mg_handle_incoming_websocket_frame(), mg_http_call_endpoint_handler(), mg_http_handler(), mg_if_accept_tcp_cb(), mg_if_connect_cb(), mg_if_poll(), mg_if_recv_udp_cb(), mg_if_sent_cb(), mg_if_timer(), mg_recv_common(), mg_websocket_handler(), and resolve_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_casecmp ( const char *  s1,
const char *  s2 
)

Definition at line 7882 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7882 of file mongoose.cc

References mg_ncasecmp().

Referenced by mg_get_mime_type(), and mg_http_check_digest_auth().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_cgi_ev_handler ( struct mg_connection cgi_nc,
int  ev,
void *  ev_data 
)
static

Definition at line 7286 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7286 of file mongoose.cc

References mbuf::buf, mg_connection::flags, h, mbuf::len, mg_str::len, MG_EV_CLOSE, MG_EV_RECV, MG_F_CLOSE_IMMEDIATELY, MG_F_SEND_AND_CLOSE, MG_F_USER_1, mg_forward(), mg_get_http_header(), mg_http_free_proto_data_cgi(), mg_http_get_proto_data(), mg_http_get_request_len(), mg_http_parse_headers(), mg_http_send_error(), MG_MAX_HTTP_REQUEST_SIZE, mg_printf(), mg_str::p, mg_connection::recv_mbuf, and mg_connection::user_data.

Referenced by mg_handle_cgi().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_check_ip_acl ( const char *  acl,
uint32_t  remote_ip 
)

Definition at line 3050 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3050 of file mongoose.cc

References DBG, mask, mg_next_comma_list_entry(), mg_str::p, and parse_net().

Referenced by mg_serve_http().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_check_nonce ( const char *  nonce)
static

Definition at line 6244 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6244 of file mongoose.cc

References Acts::Test::time.

Referenced by mg_http_check_digest_auth().

+ Here is the caller graph for this function:

void mg_close_conn ( struct mg_connection conn)

Definition at line 2228 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2228 of file mongoose.cc

References DBG, mg_connection::flags, mg_call(), mg_destroy_conn(), MG_EV_CLOSE, and mg_remove_conn().

Referenced by mg_accept_conn(), mg_mgr_free(), and mg_mgr_poll().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_conn_addr_to_str ( struct mg_connection nc,
char *  buf,
size_t  len,
int  flags 
)

Definition at line 8026 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8026 of file mongoose.cc

References mg_if_get_conn_addr(), mg_sock_addr_to_str(), and MG_SOCK_STRINGIFY_REMOTE.

Referenced by mg_hexdump_connection(), mg_http_send_port_based_redirect(), and mg_prepare_cgi_environment().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_connect ( struct mg_mgr mgr,
const char *  address,
mg_event_handler_t  callback 
)
read

Definition at line 2859 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2859 of file mongoose.cc

References mg_connect_opt().

Referenced by mg_resolve_async_opt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_connect_http ( struct mg_mgr mgr,
mg_event_handler_t  ev_handler,
const char *  url,
const char *  extra_headers,
const char *  post_data 
)
read

Definition at line 7756 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7756 of file mongoose.cc

References mg_connect_http_opt().

+ Here is the call graph for this function:

struct mg_connection* mg_connect_http_base ( struct mg_mgr mgr,
mg_event_handler_t  ev_handler,
struct mg_connect_opts  opts,
const char *  schema,
const char *  schema_ssl,
const char *  url,
const char **  path,
char **  addr 
)
read

Definition at line 7689 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7689 of file mongoose.cc

References mg_connect_opts::error_string, mg_connect_opt(), MG_FREE, mg_http_common_url_parse(), mg_set_protocol_http_websocket(), MG_SET_PTRPTR, mg_set_ssl(), and mg_connection::ssl_ctx.

Referenced by mg_connect_http_opt(), and mg_connect_ws_opt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_connect_http_opt ( struct mg_mgr mgr,
mg_event_handler_t  ev_handler,
struct mg_connect_opts  opts,
const char *  url,
const char *  extra_headers,
const char *  post_data 
)
read

Definition at line 7730 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7730 of file mongoose.cc

References mg_connect_http_base(), MG_FREE, and mg_printf().

Referenced by mg_connect_http().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_connect_opt ( struct mg_mgr mgr,
const char *  address,
mg_event_handler_t  callback,
struct mg_connect_opts  opts 
)
read

Definition at line 2866 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2866 of file mongoose.cc

References _MG_ALLOWED_CONNECT_FLAGS_MASK, mg_resolve_async_opts::dns_conn, check_license::err(), mg_connect_opts::error_string, mg_connection::flags, mg_connect_opts::flags, MG_COPY_COMMON_CONNECTION_OPTIONS, mg_create_connection(), mg_destroy_conn(), MG_DNS_A_RECORD, mg_do_connect(), MG_F_RESOLVING, MG_F_UDP, MG_MAX_HOST_LEN, mg_parse_address(), mg_resolve_async_opt(), MG_SET_PTRPTR, mg_set_ssl(), mg_connection::mgr, mg_connection::priv_2, resolve_cb(), mg_connection::sa, mg_connection::ssl_ctx, mg_connection::user_data, and mg_connect_opts::user_data.

Referenced by mg_connect(), and mg_connect_http_base().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_connect_ws ( struct mg_mgr mgr,
mg_event_handler_t  ev_handler,
const char *  url,
const char *  protocol,
const char *  extra_headers 
)
read

Definition at line 7787 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7787 of file mongoose.cc

References mg_connect_ws_opt().

+ Here is the call graph for this function:

struct mg_connection* mg_connect_ws_opt ( struct mg_mgr mgr,
mg_event_handler_t  ev_handler,
struct mg_connect_opts  opts,
const char *  url,
const char *  protocol,
const char *  extra_headers 
)
read

Definition at line 7767 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7767 of file mongoose.cc

References mg_connect_http_base(), MG_FREE, and mg_send_websocket_handshake2().

Referenced by mg_connect_ws().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MG_INTERNAL struct mg_connection * mg_create_connection ( struct mg_mgr mgr,
mg_event_handler_t  callback,
struct mg_add_sock_opts  opts 
)
read

Definition at line 2402 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2402 of file mongoose.cc

References mg_add_sock_opts::error_string, mg_create_connection_base(), MG_FREE, mg_if_create_conn(), and MG_SET_PTRPTR.

Referenced by mg_bind_opt(), mg_connect_opt(), and mg_if_accept_new_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MG_INTERNAL struct mg_connection* mg_create_connection_base ( struct mg_mgr mgr,
mg_event_handler_t  callback,
struct mg_add_sock_opts  opts 
)
read

Definition at line 2377 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2377 of file mongoose.cc

References _MG_ALLOWED_CONNECT_FLAGS_MASK, mg_add_sock_opts::error_string, mg_connection::flags, mg_add_sock_opts::flags, mg_connection::handler, mg_connection::last_io_time, MG_CALLOC, MG_SET_PTRPTR, 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_if_recv_udp_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_create_itermediate_directories ( const char *  path)
static

Definition at line 6665 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6665 of file mongoose.cc

References MAX_PATH_SIZE, mg_mkdir(), mg_stat(), and physmon_simulation::s.

Referenced by mg_handle_put().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_deliver_websocket_data ( struct mg_connection nc)
static

Definition at line 4559 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4559 of file mongoose.cc

References mbuf::buf, websocket_message::data, Acts::UnitConstants::e, mg_connection::flags, websocket_message::flags, i, mbuf::len, mg_str::len, mbuf_remove(), mbuf_resize(), MG_F_SEND_AND_CLOSE, MG_F_WEBSOCKET_NO_DEFRAG, mg_handle_incoming_websocket_frame(), mg_is_ws_first_fragment(), mg_is_ws_fragment(), mg_connection::recv_mbuf, mbuf::size, websocket_message::size, and WEBSOCKET_OP_CLOSE.

Referenced by mg_websocket_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_destroy_conn ( struct mg_connection conn)
static

Definition at line 2212 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2212 of file mongoose.cc

References mbuf_free(), MG_FREE, mg_if_destroy_conn(), mg_connection::proto_data, mg_connection::proto_data_destructor, mg_connection::recv_mbuf, mg_connection::send_mbuf, mg_connection::ssl, and mg_connection::ssl_ctx.

Referenced by mg_bind_opt(), mg_close_conn(), mg_connect_opt(), and resolve_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_dns_copy_questions ( struct mbuf io,
struct mg_dns_message msg 
)

Definition at line 8968 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8968 of file mongoose.cc

References parse_cmake_options::begin, end, mg_str::len, mbuf_append(), mg_dns_resource_record::name, mg_dns_message::num_questions, mg_str::p, mg_dns_message::pkt, and mg_dns_message::questions.

+ Here is the call graph for this function:

static int mg_dns_encode_name ( struct mbuf io,
const char *  name,
size_t  len 
)
static

Definition at line 8978 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8978 of file mongoose.cc

References mbuf::len, mbuf_append(), n, perf_headwind::name, Acts::Test::pos, and physmon_simulation::s.

Referenced by mg_dns_encode_record().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_dns_encode_record ( struct mbuf io,
struct mg_dns_resource_record rr,
const char *  name,
size_t  nlen,
const void *  rdata,
size_t  rlen 
)

Definition at line 9007 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9007 of file mongoose.cc

References mbuf::buf, mg_dns_resource_record::kind, mbuf::len, mbuf_append(), MG_DNS_ANSWER, MG_DNS_CNAME_RECORD, mg_dns_encode_name(), MG_DNS_INVALID_RECORD, Acts::Test::pos, mg_dns_resource_record::rclass, mg_dns_resource_record::rtype, and mg_dns_resource_record::ttl.

Referenced by mg_send_dns_query().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_dns_insert_header ( struct mbuf io,
size_t  pos,
struct mg_dns_message msg 
)

Definition at line 8955 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8955 of file mongoose.cc

References mg_dns_message::flags, mg_dns_header::flags, mbuf_insert(), mg_dns_message::num_answers, mg_dns_header::num_answers, mg_dns_message::num_questions, mg_dns_header::num_questions, mg_dns_message::transaction_id, and mg_dns_header::transaction_id.

Referenced by dns_handler(), and mg_send_dns_query().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_dns_resource_record* mg_dns_next_record ( struct mg_dns_message msg,
int  query,
struct mg_dns_resource_record prev 
)
read

Definition at line 8912 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8912 of file mongoose.cc

References mg_dns_message::answers, mg_dns_message::num_answers, and mg_dns_resource_record::rtype.

int mg_dns_parse_record_data ( struct mg_dns_message msg,
struct mg_dns_resource_record rr,
void *  data,
size_t  data_len 
)

Definition at line 8926 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8926 of file mongoose.cc

References mg_str::len, MG_DNS_A_RECORD, MG_DNS_AAAA_RECORD, MG_DNS_CNAME_RECORD, mg_dns_uncompress_name(), mg_str::p, mg_dns_message::pkt, mg_dns_resource_record::rdata, and mg_dns_resource_record::rtype.

Referenced by resolve_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t mg_dns_uncompress_name ( struct mg_dns_message msg,
struct mg_str name,
char *  dst,
int  dst_len 
)

Definition at line 9175 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9175 of file mongoose.cc

References end, mg_str::len, mg_str::p, and mg_dns_message::pkt.

Referenced by mg_dns_parse_record_data().

+ Here is the caller graph for this function:

MG_INTERNAL struct mg_connection * mg_do_connect ( struct mg_connection nc,
int  proto,
union socket_address sa 
)
read

Definition at line 2787 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2787 of file mongoose.cc

References DBG, mg_connection::flags, mg_add_conn(), MG_F_CONNECTING, mg_if_connect_tcp(), mg_if_connect_udp(), mg_connection::mgr, and socket_address::sin.

Referenced by mg_connect_opt(), and resolve_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_do_ssi_call ( struct mg_connection nc,
char *  tag 
)
static

Definition at line 5781 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5781 of file mongoose.cc

References mg_call(), and MG_EV_SSI_CALL.

Referenced by mg_send_ssi_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_do_ssi_include ( struct mg_connection nc,
const char *  ssi,
char *  tag,
int  include_level,
const struct mg_serve_http_opts opts 
)
static

Definition at line 5719 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5719 of file mongoose.cc

References mg_serve_http_opts::document_root, fclose(), MAX_PATH_SIZE, mg_match_prefix(), mg_printf(), mg_send_file_data(), mg_send_ssi_file(), mg_set_close_on_exec(), merge_hashes::p, and mg_serve_http_opts::ssi_pattern.

Referenced by mg_send_ssi_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_escape ( const char *  src,
char *  dst,
size_t  dst_len 
)
static

Definition at line 6366 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6366 of file mongoose.cc

References n.

Referenced by mg_print_dir_entry().

+ Here is the caller graph for this function:

void mg_ev_mgr_add_conn ( struct mg_connection nc)

Definition at line 3622 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3622 of file mongoose.cc

Referenced by mg_add_conn().

+ Here is the caller graph for this function:

void mg_ev_mgr_free ( struct mg_mgr mgr)

Definition at line 3618 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3618 of file mongoose.cc

Referenced by mg_mgr_free().

+ Here is the caller graph for this function:

void mg_ev_mgr_init ( struct mg_mgr mgr)

Definition at line 3608 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3608 of file mongoose.cc

References mg_mgr::ctl, DBG, and mg_socketpair().

Referenced by mg_mgr_init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_ev_mgr_remove_conn ( struct mg_connection nc)

Definition at line 3626 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3626 of file mongoose.cc

Referenced by mg_remove_conn().

+ Here is the caller graph for this function:

MG_INTERNAL void mg_find_index_file ( const char *  path,
const char *  list,
char **  index_file,
cs_stat_t *  stp 
)

Definition at line 6745 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6745 of file mongoose.cc

References DBG, mg_str::len, MG_FREE, mg_next_comma_list_entry(), MG_REALLOC, mg_stat(), and mg_str::p.

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FILE* mg_fopen ( const char *  path,
const char *  mode 
)

Definition at line 7916 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7916 of file mongoose.cc

References ARRAY_SIZE, and MAX_PATH_SIZE.

void mg_forward ( struct mg_connection from,
struct mg_connection to 
)

Definition at line 3075 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3075 of file mongoose.cc

References mbuf::buf, mbuf::len, mbuf_remove(), mg_send(), and mg_connection::recv_mbuf.

Referenced by mg_cgi_ev_handler(), and mg_http_transfer_file_data().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_str* mg_get_http_header ( struct http_message hm,
const char *  name 
)
read

Definition at line 4528 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4528 of file mongoose.cc

References h, http_message::header_names, http_message::header_values, i, mg_str::len, mg_ncasecmp(), mg_str::p, and testSigmaEff::v.

Referenced by mg_cgi_ev_handler(), mg_handle_move(), mg_handle_propfind(), mg_handle_put(), mg_http_check_digest_auth(), mg_http_handler(), mg_http_send_file2(), mg_is_not_modified(), mg_prepare_cgi_environment(), mg_serve_http(), and mg_uri_to_local_path().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_get_http_var ( const struct mg_str buf,
const char *  name,
char *  dst,
size_t  dst_len 
)

Definition at line 6050 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6050 of file mongoose.cc

References Acts::UnitConstants::e, mg_str::len, mg_ncasecmp(), mg_url_decode(), merge_hashes::p, mg_str::p, and physmon_simulation::s.

+ Here is the call graph for this function:

static int mg_get_ip_address_of_nameserver ( char *  name,
size_t  name_len 
)
static

Definition at line 9374 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9374 of file mongoose.cc

References check_license::err(), fclose(), fprintf(), i, line, parse_cmake_options::type, and value.

Referenced by mg_resolve_async_opt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static size_t mg_get_line_len ( const char *  buf,
size_t  buf_len 
)
static

Definition at line 5209 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5209 of file mongoose.cc

Referenced by mg_parse_multipart().

+ Here is the caller graph for this function:

static struct mg_str mg_get_mime_type ( const char *  path,
const char *  dflt,
const struct mg_serve_http_opts opts 
)
staticread

Definition at line 4380 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4380 of file mongoose.cc

References ext_len, extension, i, mg_str::len, mg_casecmp(), mg_next_comma_list_entry(), mg_static_builtin_mime_types, mg_vcasecmp(), parse_cmake_options::opts, mg_str::p, physmon_track_finding_ttbar::r, and testSigmaEff::v.

Referenced by mg_handle_ssi_request(), and mg_http_send_file2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_get_month_index ( const char *  s)
static

Definition at line 7398 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7398 of file mongoose.cc

References ARRAY_SIZE, and i.

Referenced by mg_parse_date_string().

+ Here is the caller graph for this function:

static void mg_gmt_time_string ( char *  buf,
size_t  buf_len,
time_t *  t 
)
static

Definition at line 5897 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5897 of file mongoose.cc

Referenced by mg_http_send_file2(), and mg_print_props().

+ Here is the caller graph for this function:

static 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 
)
static

Definition at line 7341 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7341 of file mongoose.cc

References http_message::body, mg_cgi_env_block::buf, mg_http_proto_data::cgi, mg_serve_http_opts::cgi_interpreter, mg_http_proto_data_cgi::cgi_nc, DBG, mg_connection::flags, mbuf::len, mg_str::len, MAX_PATH_SIZE, mbuf_remove(), http_message::message, mg_add_sock(), mg_cgi_ev_handler(), MG_F_USER_1, mg_http_get_proto_data(), mg_http_send_error(), mg_prepare_cgi_environment(), mg_send(), mg_socketpair(), mg_start_process(), mg_connection::mgr, merge_hashes::p, mg_str::p, mg_connection::recv_mbuf, mg_connection::user_data, and mg_cgi_env_block::vars.

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MG_INTERNAL size_t mg_handle_chunked ( struct mg_connection nc,
struct http_message hm,
char *  buf,
size_t  blen 
)

Definition at line 4916 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4916 of file mongoose.cc

References assert, http_message::body, mg_http_proto_data_chuncked::body_len, mg_http_proto_data::chunk, configureMap::data, mg_connection::flags, mg_connection::handler, i, mbuf::len, mg_str::len, http_message::message, mg_call(), MG_EV_HTTP_CHUNK, MG_F_DELETE_CHUNK, mg_http_get_proto_data(), mg_http_parse_chunk(), n, and mg_connection::recv_mbuf.

Referenced by mg_http_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_handle_delete ( struct mg_connection nc,
const struct mg_serve_http_opts opts,
const char *  path 
)
static

Definition at line 6648 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6648 of file mongoose.cc

References mg_http_send_error(), mg_remove_directory(), and mg_stat().

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_handle_incoming_websocket_frame ( struct mg_connection nc,
struct websocket_message wsm 
)
static

Definition at line 4550 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4550 of file mongoose.cc

References websocket_message::flags, mg_connection::handler, mg_call(), MG_EV_WEBSOCKET_CONTROL_FRAME, and MG_EV_WEBSOCKET_FRAME.

Referenced by mg_deliver_websocket_data().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_handle_mkcol ( struct mg_connection nc,
const char *  path,
struct http_message hm 
)
static

Definition at line 6578 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6578 of file mongoose.cc

References http_message::body, mg_str::len, mg_http_send_error(), and mg_mkdir().

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_handle_move ( struct mg_connection c,
const struct mg_serve_http_opts opts,
const char *  path,
struct http_message hm 
)
static

Definition at line 6624 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6624 of file mongoose.cc

References mg_serve_http_opts::dav_document_root, upload::dest, mg_str::len, MAX_PATH_SIZE, mg_get_http_header(), mg_http_send_error(), and mg_str::p.

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static 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 
)
static

Definition at line 6515 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6515 of file mongoose.cc

References depth, mg_serve_http_opts::enable_directory_listing, mg_connection::flags, mg_str::len, MAX_PATH_SIZE, MG_F_SEND_AND_CLOSE, mg_get_http_header(), mg_print_props(), mg_printf(), mg_scan_directory(), mg_send(), mg_vcmp(), mg_str::p, and http_message::uri.

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_handle_put ( struct mg_connection nc,
const char *  path,
struct http_message hm 
)
static

Definition at line 6684 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6684 of file mongoose.cc

References http_message::body, mg_http_proto_data_file::cl, DATA_PUT, mg_http_proto_data::file, mg_http_proto_data_file::fp, mg_str::len, mbuf_remove(), http_message::message, mg_create_itermediate_directories(), mg_get_http_header(), mg_http_free_proto_data_file(), mg_http_get_proto_data(), mg_http_parse_range_header(), mg_http_send_error(), mg_http_transfer_file_data(), mg_printf(), mg_set_close_on_exec(), mg_stat(), mg_str::p, r1, r2, mg_connection::recv_mbuf, and mg_http_proto_data_file::type.

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_handle_ssi_request ( struct mg_connection nc,
const char *  path,
const struct mg_serve_http_opts opts 
)
static

Definition at line 5862 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5862 of file mongoose.cc

References mg_serve_http_opts::extra_headers, fclose(), mg_connection::flags, mg_str::len, MG_F_SEND_AND_CLOSE, mg_get_mime_type(), mg_http_send_error(), mg_printf(), mg_send_response_line(), mg_send_ssi_file(), mg_set_close_on_exec(), and mg_str::p.

Referenced by mg_http_send_file2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_handle_udp_read ( struct mg_connection nc)
static

Definition at line 3457 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3457 of file mongoose.cc

References DBG, mg_if_recv_udp_cb(), mg_recvfrom(), n, socket_address::sa, mg_connection::sa, and socket_address::sin.

Referenced by mg_mgr_handle_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_hexdump ( const void *  buf,
int  len,
char *  dst,
int  dst_len 
)

Definition at line 8035 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8035 of file mongoose.cc

References i, ambiguity_solver_full_chain::idx, and n.

Referenced by mg_hexdump_connection().

+ Here is the caller graph for this function:

void mg_hexdump_connection ( struct mg_connection nc,
const char *  path,
const void *  buf,
int  num_bytes,
int  ev 
)

Definition at line 8095 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8095 of file mongoose.cc

References fclose(), fprintf(), mg_conn_addr_to_str(), MG_EV_ACCEPT, MG_EV_CONNECT, MG_EV_RECV, MG_EV_SEND, MG_FREE, mg_hexdump(), MG_MALLOC, MG_SOCK_STRINGIFY_IP, MG_SOCK_STRINGIFY_PORT, MG_SOCK_STRINGIFY_REMOTE, conf::stdout, and Acts::Test::time.

Referenced by mg_call(), and mg_send().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_http_call_endpoint_handler ( struct mg_connection nc,
int  ev,
struct http_message hm 
)
static

Definition at line 5001 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5001 of file mongoose.cc

References mg_http_proto_data::endpoint_handler, mg_connection::handler, mg_connection::listener, mg_call(), MG_EV_HTTP_REQUEST, mg_http_get_endpoint_handler(), mg_http_get_proto_data(), and http_message::uri.

Referenced by mg_http_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_http_check_digest_auth ( struct http_message hm,
const char *  auth_domain,
FILE *  fp 
)

Definition at line 6250 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6250 of file mongoose.cc

References mg_str::len, http_message::method, mg_casecmp(), mg_check_nonce(), mg_get_http_header(), mg_http_parse_header(), mg_mkmd5resp(), mg_str::p, http_message::query_string, and http_message::uri.

Referenced by mg_is_authorized().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_http_common_url_parse ( const char *  url,
const char *  schema,
const char *  schema_tls,
int *  use_ssl,
char **  addr,
int *  port_i,
const char **  path 
)
static

Definition at line 7638 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7638 of file mongoose.cc

References cleanup(), DBG, MG_FREE, MG_REALLOC, and summary::url.

Referenced by mg_connect_http_base().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_http_conn_destructor ( void *  proto_data)
static

Definition at line 4277 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4277 of file mongoose.cc

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(), and mg_http_free_proto_data_file().

Referenced by mg_http_get_proto_data().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_http_construct_etag ( char *  buf,
size_t  buf_len,
const cs_stat_t *  st 
)
static

Definition at line 5892 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5892 of file mongoose.cc

Referenced by mg_http_send_file2(), and mg_is_not_modified().

+ Here is the caller graph for this function:

int mg_http_create_digest_auth_header ( char *  buf,
size_t  buf_len,
const char *  method,
const char *  uri,
const char *  auth_domain,
const char *  user,
const char *  passwd 
)

Definition at line 6216 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6216 of file mongoose.cc

References cs_md5(), mg_mkmd5resp(), and Acts::Test::time.

+ Here is the call graph for this function:

static void mg_http_free_proto_data_cgi ( struct mg_http_proto_data_cgi d)
static

Definition at line 4256 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4256 of file mongoose.cc

References mg_http_proto_data_cgi::cgi_nc, mg_connection::flags, and MG_F_CLOSE_IMMEDIATELY.

Referenced by mg_cgi_ev_handler(), and mg_http_conn_destructor().

+ Here is the caller graph for this function:

static void mg_http_free_proto_data_endpoints ( struct mg_http_endpoint **  ep)
static

Definition at line 4264 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4264 of file mongoose.cc

References mg_http_endpoint::name, mg_http_endpoint::next, and Acts::Test::tmp().

Referenced by mg_http_conn_destructor().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_http_free_proto_data_file ( struct mg_http_proto_data_file d)
static

Definition at line 4245 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4245 of file mongoose.cc

References fclose(), and mg_http_proto_data_file::fp.

Referenced by mg_handle_put(), mg_http_conn_destructor(), mg_http_send_file2(), and mg_http_transfer_file_data().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static mg_event_handler_t mg_http_get_endpoint_handler ( struct mg_connection nc,
struct mg_str uri_path 
)
static

Definition at line 4971 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4971 of file mongoose.cc

References mg_http_proto_data::endpoints, mg_http_endpoint::handler, mg_http_get_proto_data(), mg_match_prefix_n(), mg_http_endpoint::name, mg_http_endpoint::name_len, and mg_http_endpoint::next.

Referenced by mg_http_call_endpoint_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static struct mg_http_proto_data* mg_http_get_proto_data ( struct mg_connection c)
staticread

Definition at line 4222 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4222 of file mongoose.cc

References MG_CALLOC, mg_http_conn_destructor(), mg_connection::proto_data, and mg_connection::proto_data_destructor.

Referenced by mg_cgi_ev_handler(), mg_handle_cgi(), mg_handle_chunked(), mg_handle_put(), mg_http_call_endpoint_handler(), mg_http_get_endpoint_handler(), mg_http_handler(), mg_http_send_file2(), mg_http_transfer_file_data(), and mg_register_http_endpoint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_http_get_request_len ( const char *  s,
int  buf_len 
)
static

Definition at line 4418 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4418 of file mongoose.cc

References i.

Referenced by mg_cgi_ev_handler(), mg_parse_http(), and mg_parse_multipart().

+ Here is the caller graph for this function:

void mg_http_handler ( struct mg_connection nc,
int  ev,
void *  ev_data 
)

Definition at line 5040 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5040 of file mongoose.cc

References check_smearing_config::args, http_message::body, mbuf::buf, DBG, mg_http_proto_data::endpoint_handler, mg_http_proto_data::file, mg_http_multipart_part::file_name, mg_connection::flags, mg_http_proto_data_file::fp, mg_connection::handler, http_message::header_names, http_message::header_values, parse_cmake_options::headers, i, mbuf::len, mg_str::len, mg_connection::listener, mbuf_remove(), http_message::message, http_message::method, mg_call(), MG_EV_CLOSE, MG_EV_HTTP_REPLY, MG_EV_HTTP_REQUEST, MG_EV_RECV, MG_EV_WEBSOCKET_HANDSHAKE_DONE, MG_EV_WEBSOCKET_HANDSHAKE_REQUEST, MG_F_CLOSE_IMMEDIATELY, MG_F_IS_WEBSOCKET, MG_F_SEND_AND_CLOSE, mg_get_http_header(), mg_handle_chunked(), mg_http_call_endpoint_handler(), mg_http_get_proto_data(), mg_http_transfer_file_data(), MG_MAX_HTTP_REQUEST_SIZE, mg_parse_http(), mg_vcasecmp(), mg_websocket_handler(), mg_ws_handshake(), mg_connection::mgr, mg_str::p, mg_connection::proto_handler, mg_connection::recv_mbuf, physmon_simulation::s, mg_connection::send_mbuf, mg_http_multipart_part::status, http_message::uri, v1, v2, value, mg_http_multipart_part::var_name, and vec.

Referenced by mg_set_protocol_http_websocket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static size_t mg_http_parse_chunk ( char *  buf,
size_t  len,
char **  chunk_data,
size_t *  chunk_len 
)
static

Definition at line 4883 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4883 of file mongoose.cc

References i, n, and physmon_simulation::s.

Referenced by mg_handle_chunked().

+ Here is the caller graph for this function:

int mg_http_parse_header ( struct mg_str hdr,
const char *  var_name,
char *  buf,
size_t  buf_size 
)

Definition at line 6144 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6144 of file mongoose.cc

References end, mg_str::len, n, merge_hashes::p, mg_str::p, and physmon_simulation::s.

Referenced by mg_http_check_digest_auth(), and mg_parse_multipart().

+ Here is the caller graph for this function:

static const char* mg_http_parse_headers ( const char *  s,
const char *  end,
int  len,
struct http_message req 
)
static

Definition at line 4436 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4436 of file mongoose.cc

References ARRAY_SIZE, http_message::body, http_message::header_names, http_message::header_values, i, k, mg_str::len, http_message::message, mg_ncasecmp(), mg_skip(), mg_str::p, and physmon_simulation::s.

Referenced by mg_cgi_ev_handler(), and mg_parse_http().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_http_parse_range_header ( const struct mg_str header,
int64_t *  a,
int64_t *  b 
)
static

Definition at line 5901 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5901 of file mongoose.cc

References mg_str::len, MG_FREE, MG_MALLOC, and mg_str::p.

Referenced by mg_handle_put(), and mg_http_send_file2().

+ Here is the caller graph for this function:

static void mg_http_send_digest_auth_request ( struct mg_connection c,
const char *  domain 
)
static

Definition at line 7452 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7452 of file mongoose.cc

References mg_printf(), and Acts::Test::time.

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_http_send_error ( struct mg_connection nc,
int  code,
const char *  reason 
)
static

Definition at line 5698 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5698 of file mongoose.cc

References DBG, mg_connection::flags, MG_F_SEND_AND_CLOSE, mg_send(), and mg_send_head().

Referenced by mg_cgi_ev_handler(), mg_handle_cgi(), mg_handle_delete(), mg_handle_mkcol(), mg_handle_move(), mg_handle_put(), mg_handle_ssi_request(), mg_http_send_file2(), mg_send_http_file(), and mg_serve_http().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_http_send_file2 ( struct mg_connection nc,
const char *  path,
cs_stat_t *  st,
struct http_message hm,
struct mg_serve_http_opts opts 
)
static

Definition at line 5917 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5917 of file mongoose.cc

References mg_http_proto_data_file::cl, current_time, DATA_FILE, DBG, mg_serve_http_opts::extra_headers, mg_http_proto_data::file, mg_http_proto_data_file::fp, mg_http_proto_data_file::keepalive, mg_str::len, mg_get_http_header(), mg_get_mime_type(), mg_gmt_time_string(), mg_handle_ssi_request(), mg_http_construct_etag(), mg_http_free_proto_data_file(), mg_http_get_proto_data(), mg_http_parse_range_header(), mg_http_send_error(), mg_http_transfer_file_data(), mg_match_prefix(), mg_printf(), mg_send_response_line(), mg_vcasecmp(), mg_vcmp(), n, mg_str::p, http_message::proto, r1, r2, mg_serve_http_opts::ssi_pattern, t, Acts::Test::time, and mg_http_proto_data_file::type.

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_http_send_options ( struct mg_connection nc)
static

Definition at line 7462 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7462 of file mongoose.cc

References mg_connection::flags, MG_F_SEND_AND_CLOSE, and mg_printf().

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_http_send_port_based_redirect ( struct mg_connection c,
struct http_message hm,
const struct mg_serve_http_opts opts 
)
static

Definition at line 6776 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6776 of file mongoose.cc

References mg_str::len, mg_conn_addr_to_str(), mg_next_comma_list_entry(), mg_printf(), mg_send_response_line(), MG_SOCK_STRINGIFY_PORT, mg_vcmp(), mg_str::p, http_message::proto, http_message::uri, and mg_serve_http_opts::url_rewrites.

Referenced by mg_serve_http().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_http_transfer_file_data ( struct mg_connection nc)
static

Definition at line 4825 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4825 of file mongoose.cc

References mbuf::buf, mg_http_proto_data::cgi, mg_http_proto_data_cgi::cgi_nc, mg_http_proto_data_file::cl, DATA_FILE, DATA_PUT, mg_http_proto_data::file, mg_connection::flags, mg_http_proto_data_file::fp, mg_http_proto_data_file::keepalive, left(), mbuf::len, mbuf_remove(), MG_F_SEND_AND_CLOSE, mg_forward(), mg_http_free_proto_data_file(), mg_http_get_proto_data(), MG_MAX_HTTP_SEND_MBUF, mg_send(), n, mg_connection::recv_mbuf, mg_connection::send_mbuf, mg_http_proto_data_file::sent, and mg_http_proto_data_file::type.

Referenced by mg_handle_put(), mg_http_handler(), and mg_http_send_file2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_if_accept_new_conn ( struct mg_connection lc)
read

Definition at line 2664 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2664 of file mongoose.cc

References DBG, mg_connection::flags, mg_connection::handler, mg_connection::listener, mg_add_conn(), mg_create_connection(), mg_connection::mgr, mg_connection::proto_handler, mg_connection::recv_mbuf_limit, mg_connection::sock, mg_connection::ssl, mg_connection::ssl_ctx, and mg_connection::user_data.

Referenced by mg_accept_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_accept_tcp_cb ( struct mg_connection nc,
union socket_address sa,
size_t  sa_len 
)

Definition at line 2680 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2680 of file mongoose.cc

References mg_call(), MG_EV_ACCEPT, and mg_connection::sa.

Referenced by mg_accept_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_connect_cb ( struct mg_connection nc,
int  err 
)

Definition at line 2803 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2803 of file mongoose.cc

References DBG, mg_connection::flags, mg_call(), MG_EV_CONNECT, MG_F_CLOSE_IMMEDIATELY, and MG_F_CONNECTING.

Referenced by mg_mgr_handle_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_connect_tcp ( struct mg_connection nc,
const union socket_address sa 
)

Definition at line 3170 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3170 of file mongoose.cc

References DBG, mg_connection::err, mg_is_error(), mg_set_non_blocking_mode(), socket_address::sa, socket_address::sin, and mg_connection::sock.

Referenced by mg_do_connect().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_connect_udp ( struct mg_connection nc)

Definition at line 3186 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3186 of file mongoose.cc

References mg_connection::err, and mg_connection::sock.

Referenced by mg_do_connect().

+ Here is the caller graph for this function:

int mg_if_create_conn ( struct mg_connection nc)

Definition at line 3224 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3224 of file mongoose.cc

Referenced by mg_create_connection().

+ Here is the caller graph for this function:

void mg_if_destroy_conn ( struct mg_connection nc)

Definition at line 3229 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3229 of file mongoose.cc

References mg_connection::flags, mg_connection::listener, MG_F_UDP, and mg_connection::sock.

Referenced by mg_destroy_conn().

+ Here is the caller graph for this function:

void mg_if_get_conn_addr ( struct mg_connection nc,
int  remote,
union socket_address sa 
)

Definition at line 3836 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3836 of file mongoose.cc

References mg_sock_get_addr(), mg_connection::sa, and mg_connection::sock.

Referenced by mg_conn_addr_to_str().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_if_listen_tcp ( struct mg_connection nc,
union socket_address sa 
)

Definition at line 3195 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3195 of file mongoose.cc

References mg_open_listening_socket(), and mg_sock_set().

Referenced by mg_bind_opt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_if_listen_udp ( struct mg_connection nc,
union socket_address sa 
)

Definition at line 3204 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3204 of file mongoose.cc

References mg_open_listening_socket(), and mg_sock_set().

Referenced by mg_bind_opt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_poll ( struct mg_connection nc,
time_t  now 
)

Definition at line 2206 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2206 of file mongoose.cc

References mg_connection::flags, mg_call(), MG_EV_POLL, MG_F_SSL_HANDSHAKE_DONE, and mg_connection::ssl.

Referenced by mg_mgr_handle_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_recv_tcp_cb ( struct mg_connection nc,
void *  buf,
int  len 
)

Definition at line 2732 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2732 of file mongoose.cc

References mg_recv_common().

Referenced by mg_read_from_socket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_recv_udp_cb ( struct mg_connection nc,
void *  buf,
int  len,
union socket_address sa,
size_t  sa_len 
)

Definition at line 2736 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2736 of file mongoose.cc

References assert, DBG, mg_connection::flags, mg_connection::handler, mg_connection::listener, mg_add_conn(), mg_call(), mg_create_connection_base(), MG_EV_ACCEPT, MG_F_LISTENING, MG_F_UDP, MG_FREE, mg_if_recved(), mg_next(), mg_recv_common(), mg_connection::mgr, mg_connection::proto_handler, mg_connection::recv_mbuf_limit, socket_address::sa, mg_connection::sa, mg_connection::sock, and mg_connection::user_data.

Referenced by mg_handle_udp_read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_recved ( struct mg_connection nc,
size_t  len 
)

Definition at line 3219 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3219 of file mongoose.cc

Referenced by mg_call(), and mg_if_recv_udp_cb().

+ Here is the caller graph for this function:

void mg_if_sent_cb ( struct mg_connection nc,
int  num_sent 
)

Definition at line 2701 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2701 of file mongoose.cc

References mg_connection::flags, mg_call(), MG_EV_SEND, and MG_F_CLOSE_IMMEDIATELY.

Referenced by mg_write_to_socket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_tcp_send ( struct mg_connection nc,
const void *  buf,
size_t  len 
)

Definition at line 3211 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3211 of file mongoose.cc

References mbuf_append(), and mg_connection::send_mbuf.

Referenced by mg_send().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_timer ( struct mg_connection c,
double  now 
)

Definition at line 2192 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2192 of file mongoose.cc

References mg_connection::ev_timer_time, mg_call(), and MG_EV_TIMER.

Referenced by mg_mgr_handle_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_if_udp_send ( struct mg_connection nc,
const void *  buf,
size_t  len 
)

Definition at line 3215 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3215 of file mongoose.cc

References mbuf_append(), and mg_connection::send_mbuf.

Referenced by mg_send().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_is_authorized ( struct http_message hm,
const char *  path,
int  is_directory,
const char *  domain,
const char *  passwords_file,
int  is_global_pass_file 
)
static

Definition at line 6295 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6295 of file mongoose.cc

References DBG, fclose(), mg_http_check_digest_auth(), MG_MAX_PATH, merge_hashes::p, and path.

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_is_big_endian ( void  )

Definition at line 8136 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8136 of file mongoose.cc

static int mg_is_creation_request ( const struct http_message hm)
static

Definition at line 7472 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7472 of file mongoose.cc

References http_message::method, and mg_vcmp().

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_is_dav_request ( const struct mg_str s)
static

Definition at line 6720 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6720 of file mongoose.cc

References ARRAY_SIZE, i, and mg_vcmp().

Referenced by mg_send_http_file(), and mg_uri_to_local_path().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_is_error ( int  n)

Definition at line 3153 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3153 of file mongoose.cc

References DBG, and n.

Referenced by mg_accept_conn(), mg_if_connect_tcp(), mg_read_from_socket(), and mg_write_to_socket().

+ Here is the caller graph for this function:

static int mg_is_file_hidden ( const char *  path,
const struct mg_serve_http_opts opts,
int  exclude_specials 
)
static

Definition at line 6182 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6182 of file mongoose.cc

References mg_serve_http_opts::hidden_file_pattern, mg_match_prefix(), path, and mg_serve_http_opts::per_directory_auth_file.

Referenced by mg_remove_directory(), mg_scan_directory(), and mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MG_INTERNAL int mg_is_not_modified ( struct http_message hm,
cs_stat_t *  st 
)

Definition at line 7439 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7439 of file mongoose.cc

References mg_get_http_header(), mg_http_construct_etag(), mg_parse_date_string(), mg_vcasecmp(), and mg_str::p.

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_is_ws_first_fragment ( unsigned char  flags)
static

Definition at line 4546 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4546 of file mongoose.cc

Referenced by mg_deliver_websocket_data().

+ Here is the caller graph for this function:

static int mg_is_ws_fragment ( unsigned char  flags)
static

Definition at line 4542 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4542 of file mongoose.cc

Referenced by mg_deliver_websocket_data().

+ Here is the caller graph for this function:

int mg_match_prefix ( const char *  pattern,
int  pattern_len,
const char *  str 
)

Definition at line 8221 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8221 of file mongoose.cc

References mg_match_prefix_n(), and mg_mk_str().

Referenced by mg_do_ssi_include(), mg_http_send_file2(), mg_is_file_hidden(), and mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_match_prefix_n ( const struct mg_str  pattern,
const struct mg_str  str 
)

Definition at line 8175 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8175 of file mongoose.cc

References i, j, mg_str::len, lowercase(), mg_match_prefix_n(), and mg_str::p.

Referenced by mg_http_get_endpoint_handler(), mg_match_prefix(), mg_match_prefix_n(), and mg_uri_to_local_path().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_mgr_free ( struct mg_mgr m)

Definition at line 2294 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2294 of file mongoose.cc

References mg_mgr::active_connections, mg_mgr::ctl, DBG, mg_close_conn(), mg_ev_mgr_free(), mg_mgr_poll(), and mg_connection::next.

+ Here is the call graph for this function:

void mg_mgr_handle_conn ( struct mg_connection nc,
int  fd_flags,
double  now 
)

Definition at line 3516 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3516 of file mongoose.cc

References _MG_F_FD_CAN_READ, _MG_F_FD_CAN_WRITE, DBG, check_license::err(), mg_connection::err, mg_connection::flags, mbuf::len, mg_accept_conn(), MG_F_CLOSE_IMMEDIATELY, MG_F_CONNECTING, MG_F_LISTENING, MG_F_UDP, mg_handle_udp_read(), mg_if_connect_cb(), mg_if_poll(), mg_if_timer(), mg_read_from_socket(), mg_write_to_socket(), mg_connection::recv_mbuf, mg_connection::send_mbuf, mg_connection::sock, and mg_connection::ssl.

Referenced by mg_mgr_poll().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_mgr_handle_ctl_sock ( struct mg_mgr mgr)
static

Definition at line 3584 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3584 of file mongoose.cc

References ctl_msg::callback, mg_mgr::ctl, DBG, dummy, ctl_msg::message, MG_EV_POLL, mg_next(), MG_RECV_FUNC, and MG_SEND_FUNC.

Referenced by mg_mgr_poll().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_mgr_init ( struct mg_mgr m,
void *  user_data 
)

Definition at line 2235 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2235 of file mongoose.cc

References mg_mgr::ctl, configureMap::data, DBG, init_done, mg_ev_mgr_init(), signal(), and mg_mgr::user_data.

Referenced by mg_server().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

time_t mg_mgr_poll ( struct mg_mgr mgr,
int  timeout_ms 
)

Definition at line 3643 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3643 of file mongoose.cc

References _MG_F_FD_CAN_READ, _MG_F_FD_CAN_WRITE, _MG_F_FD_ERROR, mg_mgr::active_connections, mg_mgr::ctl, DBG, mg_connection::ev_timer_time, mg_connection::flags, mbuf::len, mg_connection::listener, mg_add_to_set(), mg_close_conn(), MG_F_CLOSE_IMMEDIATELY, MG_F_CONNECTING, MG_F_SEND_AND_CLOSE, MG_F_UDP, MG_F_WANT_READ, MG_F_WANT_WRITE, mg_mgr_handle_conn(), mg_mgr_handle_ctl_sock(), mg_time(), mg_connection::next, mg_connection::recv_mbuf, mg_connection::recv_mbuf_limit, mg_connection::send_mbuf, mg_connection::sock, and Acts::Test::tmp().

Referenced by mg_mgr_free(), and mg_server().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_str mg_mk_str ( const char *  s)
read

Definition at line 8226 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8226 of file mongoose.cc

References mg_str::len, and physmon_simulation::s.

Referenced by mg_match_prefix().

+ Here is the caller graph for this function:

static int mg_mkdir ( const char *  path,
uint32_t  mode 
)
static

Definition at line 4370 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4370 of file mongoose.cc

Referenced by mg_create_itermediate_directories(), and mg_handle_mkcol().

+ Here is the caller graph for this function:

static void mg_mkmd5resp ( const char *  method,
size_t  method_len,
const char *  uri,
size_t  uri_len,
const char *  ha1,
size_t  ha1_len,
const char *  nonce,
size_t  nonce_len,
const char *  nc,
size_t  nc_len,
const char *  cnonce,
size_t  cnonce_len,
const char *  qop,
size_t  qop_len,
char *  resp 
)
static

Definition at line 6201 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6201 of file mongoose.cc

References cs_md5().

Referenced by mg_http_check_digest_auth(), and mg_http_create_digest_auth_header().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_mqtt_connack ( struct mg_connection nc,
uint8_t  return_code 
)

Definition at line 8652 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8652 of file mongoose.cc

References MG_MQTT_CMD_CONNACK, mg_mqtt_prepend_header(), and mg_send().

+ Here is the call graph for this function:

void mg_mqtt_disconnect ( struct mg_connection nc)

Definition at line 8710 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8710 of file mongoose.cc

References MG_MQTT_CMD_DISCONNECT, and mg_mqtt_prepend_header().

+ Here is the call graph for this function:

int mg_mqtt_next_subscribe_topic ( struct mg_mqtt_message msg,
struct mg_str topic,
uint8_t *  qos,
int  pos 
)

Definition at line 8621 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8621 of file mongoose.cc

References if(), mg_str::len, mg_str::p, and mg_mqtt_message::payload.

+ Here is the call graph for this function:

void mg_mqtt_ping ( struct mg_connection nc)

Definition at line 8702 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8702 of file mongoose.cc

References MG_MQTT_CMD_PINGREQ, and mg_mqtt_prepend_header().

+ Here is the call graph for this function:

void mg_mqtt_pong ( struct mg_connection nc)

Definition at line 8706 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8706 of file mongoose.cc

References MG_MQTT_CMD_PINGRESP, and mg_mqtt_prepend_header().

+ Here is the call graph for this function:

static void mg_mqtt_prepend_header ( struct mg_connection nc,
uint8_t  cmd,
uint8_t  flags,
size_t  len 
)
static

Definition at line 8559 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8559 of file mongoose.cc

References assert, mbuf::len, mbuf_insert(), and mg_connection::send_mbuf.

Referenced by mg_mqtt_connack(), mg_mqtt_disconnect(), mg_mqtt_ping(), mg_mqtt_pong(), mg_mqtt_publish(), mg_mqtt_suback(), mg_mqtt_subscribe(), mg_mqtt_unsubscribe(), and mg_send_mqtt_short_command().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_mqtt_puback ( struct mg_connection nc,
uint16_t  message_id 
)

Definition at line 8671 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8671 of file mongoose.cc

References MG_MQTT_CMD_PUBACK, and mg_send_mqtt_short_command().

+ Here is the call graph for this function:

void mg_mqtt_pubcomp ( struct mg_connection nc,
uint16_t  message_id 
)

Definition at line 8683 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8683 of file mongoose.cc

References MG_MQTT_CMD_PUBCOMP, and mg_send_mqtt_short_command().

+ Here is the call graph for this function:

void mg_mqtt_publish ( struct mg_connection nc,
const char *  topic,
uint16_t  message_id,
int  flags,
const void *  data,
size_t  len 
)

Definition at line 8582 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8582 of file mongoose.cc

References mbuf::len, MG_MQTT_CMD_PUBLISH, MG_MQTT_GET_QOS, mg_mqtt_prepend_header(), mg_send(), and mg_connection::send_mbuf.

+ Here is the call graph for this function:

void mg_mqtt_pubrec ( struct mg_connection nc,
uint16_t  message_id 
)

Definition at line 8675 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8675 of file mongoose.cc

References MG_MQTT_CMD_PUBREC, and mg_send_mqtt_short_command().

+ Here is the call graph for this function:

void mg_mqtt_pubrel ( struct mg_connection nc,
uint16_t  message_id 
)

Definition at line 8679 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8679 of file mongoose.cc

References MG_MQTT_CMD_PUBREL, and mg_send_mqtt_short_command().

+ Here is the call graph for this function:

void mg_mqtt_suback ( struct mg_connection nc,
uint8_t *  qoss,
size_t  qoss_len,
uint16_t  message_id 
)

Definition at line 8687 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8687 of file mongoose.cc

References i, MG_MQTT_CMD_SUBACK, mg_mqtt_prepend_header(), MG_MQTT_QOS, and mg_send().

+ Here is the call graph for this function:

void mg_mqtt_subscribe ( struct mg_connection nc,
const struct mg_mqtt_topic_expression topics,
size_t  topics_len,
uint16_t  message_id 
)

Definition at line 8601 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8601 of file mongoose.cc

References i, mbuf::len, MG_MQTT_CMD_SUBSCRIBE, mg_mqtt_prepend_header(), MG_MQTT_QOS, mg_send(), and mg_connection::send_mbuf.

+ Here is the call graph for this function:

void mg_mqtt_unsuback ( struct mg_connection nc,
uint16_t  message_id 
)

Definition at line 8698 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8698 of file mongoose.cc

References MG_MQTT_CMD_UNSUBACK, and mg_send_mqtt_short_command().

+ Here is the call graph for this function:

void mg_mqtt_unsubscribe ( struct mg_connection nc,
char **  topics,
size_t  topics_len,
uint16_t  message_id 
)

Definition at line 8634 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8634 of file mongoose.cc

References i, mbuf::len, MG_MQTT_CMD_UNSUBSCRIBE, mg_mqtt_prepend_header(), MG_MQTT_QOS, mg_send(), and mg_connection::send_mbuf.

+ Here is the call graph for this function:

int mg_ncasecmp ( const char *  s1,
const char *  s2,
size_t  len 
)

Definition at line 7872 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7872 of file mongoose.cc

References lowercase().

Referenced by mg_casecmp(), mg_get_http_header(), mg_get_http_var(), mg_http_parse_headers(), mg_parse_multipart(), mg_uri_to_local_path(), and mg_vcasecmp().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct mg_connection* mg_next ( struct mg_mgr s,
struct mg_connection conn 
)
read

Definition at line 3000 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3000 of file mongoose.cc

References mg_mgr::active_connections, and mg_connection::next.

Referenced by broadcast(), mg_if_recv_udp_cb(), and mg_mgr_handle_ctl_sock().

+ Here is the caller graph for this function:

const char* mg_next_comma_list_entry ( const char *  list,
struct mg_str val,
struct mg_str eq_val 
)

Definition at line 8142 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8142 of file mongoose.cc

References mg_str::len, and mg_str::p.

Referenced by mg_check_ip_acl(), mg_find_index_file(), mg_get_mime_type(), mg_http_send_port_based_redirect(), and mg_uri_to_local_path().

+ Here is the caller graph for this function:

int mg_normalize_uri_path ( const struct mg_str in,
struct mg_str out 
)

Definition at line 4100 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4100 of file mongoose.cc

References if(), mg_str::len, mg_vcmp(), next, mg_str::p, parse_uri_component(), and physmon_simulation::s.

Referenced by mg_serve_http().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_num_leap_years ( int  year)
static

Definition at line 7409 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7409 of file mongoose.cc

Referenced by mg_parse_date_string().

+ Here is the caller graph for this function:

int mg_open ( const char *  path,
int  flag,
int  mode 
)

Definition at line 7927 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7927 of file mongoose.cc

References ARRAY_SIZE, MAX_PATH_SIZE, and Acts::open.

static sock_t mg_open_listening_socket ( union socket_address sa,
int  proto 
)
static

Definition at line 3281 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3281 of file mongoose.cc

References mg_set_non_blocking_mode(), on, socket_address::sa, socket_address::sin, and socket_address::sin6.

Referenced by mg_if_listen_tcp(), and mg_if_listen_udp().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MG_INTERNAL int mg_parse_address ( const char *  str,
union socket_address sa,
int *  proto,
char *  host,
size_t  host_len 
)

Definition at line 2429 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2429 of file mongoose.cc

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, mg_resolve_from_hosts_file(), socket_address::sin, and socket_address::sin6.

Referenced by mg_bind_opt(), and mg_connect_opt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MG_INTERNAL time_t mg_parse_date_string ( const char *  datetime)

Definition at line 7414 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7414 of file mongoose.cc

References mg_get_month_index(), and mg_num_leap_years().

Referenced by mg_is_not_modified().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_parse_dns ( const char *  buf,
int  len,
struct mg_dns_message msg 
)

Definition at line 9139 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9139 of file mongoose.cc

References mg_dns_message::answers, ARRAY_SIZE, end, mg_dns_message::flags, mg_dns_header::flags, i, mg_str::len, mg_parse_dns_resource_record(), mg_dns_message::num_answers, mg_dns_header::num_answers, mg_dns_message::num_questions, mg_dns_header::num_questions, mg_str::p, mg_dns_message::pkt, mg_dns_message::questions, mg_dns_message::transaction_id, and mg_dns_header::transaction_id.

Referenced by dns_handler(), and mg_resolve_async_eh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static unsigned char* mg_parse_dns_resource_record ( unsigned char *  data,
unsigned char *  end,
struct mg_dns_resource_record rr,
int  reply 
)
static

Definition at line 9091 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9091 of file mongoose.cc

References configureMap::data, mg_dns_resource_record::kind, mg_str::len, MG_DNS_ANSWER, MG_DNS_QUESTION, mg_dns_resource_record::name, mg_str::p, mg_dns_resource_record::rclass, mg_dns_resource_record::rdata, mg_dns_resource_record::rtype, and mg_dns_resource_record::ttl.

Referenced by mg_parse_dns().

+ Here is the caller graph for this function:

int mg_parse_http ( const char *  s,
int  n,
struct http_message hm,
int  is_req 
)

Definition at line 4464 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4464 of file mongoose.cc

References http_message::body, end, 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, physmon_simulation::s, and http_message::uri.

Referenced by mg_http_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

size_t mg_parse_multipart ( const char *  buf,
size_t  buf_len,
char *  var_name,
size_t  var_name_len,
char *  file_name,
size_t  file_name_len,
const char **  data,
size_t *  data_len 
)

Definition at line 7796 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7796 of file mongoose.cc

References cd(), mg_str::len, mg_get_line_len(), mg_http_get_request_len(), mg_http_parse_header(), mg_ncasecmp(), n, mg_str::p, and Acts::Test::pos.

+ Here is the call graph for this function:

int mg_parse_uri ( 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 
)

Definition at line 3984 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3984 of file mongoose.cc

References end, mg_str::len, merge_hashes::p, mg_str::p, parse_uri_component(), and filter::state.

+ Here is the call graph for this function:

static void mg_prepare_cgi_environment ( 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,
struct mg_cgi_env_block blk 
)
static

Definition at line 7176 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7176 of file mongoose.cc

References mg_cgi_env_block::buf, mg_serve_http_opts::document_root, h, http_message::header_names, http_message::header_values, i, mg_str::len, mg_cgi_env_block::len, http_message::method, mg_addenv(), mg_addenv2(), mg_conn_addr_to_str(), MG_ENV_EXPORT_TO_CGI, mg_get_http_header(), MG_SOCK_STRINGIFY_IP, MG_SOCK_STRINGIFY_PORT, MG_SOCK_STRINGIFY_REMOTE, mg_sock_to_str(), MG_VERSION, mg_cgi_env_block::nc, mg_cgi_env_block::nvars, merge_hashes::p, mg_str::p, http_message::query_string, physmon_simulation::s, mg_connection::sock, mg_connection::ssl, http_message::uri, and mg_cgi_env_block::vars.

Referenced by mg_handle_cgi().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_print_dir_entry ( struct mg_connection nc,
const char *  file_name,
cs_stat_t *  stp 
)
static

Definition at line 6379 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6379 of file mongoose.cc

References MAX_PATH_SIZE, mg_escape(), mg_printf_http_chunk(), mg_url_encode(), and size.

Referenced by mg_send_directory_listing().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_print_props ( struct mg_connection nc,
const char *  name,
cs_stat_t *  stp 
)
static

Definition at line 6492 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6492 of file mongoose.cc

References MAX_PATH_SIZE, mg_gmt_time_string(), mg_printf(), mg_url_encode(), and t.

Referenced by mg_handle_propfind().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_printf ( struct mg_connection conn,
const char *  fmt,
  ... 
)

Definition at line 2330 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2330 of file mongoose.cc

References mg_vprintf().

Referenced by do_ssi_exec(), mg_cgi_ev_handler(), mg_connect_http_opt(), mg_do_ssi_include(), mg_handle_propfind(), mg_handle_put(), mg_handle_ssi_request(), mg_http_send_digest_auth_request(), mg_http_send_file2(), mg_http_send_options(), mg_http_send_port_based_redirect(), mg_print_props(), mg_send_directory_listing(), mg_send_head(), mg_send_http_file(), mg_send_response_line(), mg_send_ssi_file(), mg_send_websocket_handshake2(), mg_ws_handshake(), send_error(), send_nothing(), send_status(), and send_updates().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_printf_html_escape ( struct mg_connection nc,
const char *  fmt,
  ... 
)

Definition at line 6117 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6117 of file mongoose.cc

References i, j, mg_str::len, mg_avprintf(), MG_FREE, mg_send(), and MG_VPRINTF_BUFFER_SIZE.

+ Here is the call graph for this function:

void mg_printf_http_chunk ( struct mg_connection nc,
const char *  fmt,
  ... 
)

Definition at line 6097 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6097 of file mongoose.cc

References mg_str::len, mg_avprintf(), MG_FREE, mg_send_http_chunk(), and MG_VPRINTF_BUFFER_SIZE.

Referenced by mg_print_dir_entry(), and mg_send_directory_listing().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_printf_websocket_frame ( struct mg_connection nc,
int  op,
const char *  fmt,
  ... 
)

Definition at line 4759 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4759 of file mongoose.cc

References mg_avprintf(), MG_FREE, mg_send_websocket_frame(), and MG_VPRINTF_BUFFER_SIZE.

+ Here is the call graph for this function:

static void mg_read_from_socket ( struct mg_connection conn)
static

Definition at line 3390 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3390 of file mongoose.cc

References DBG, mg_connection::flags, MG_F_CLOSE_IMMEDIATELY, MG_F_SEND_AND_CLOSE, MG_F_SSL_HANDSHAKE_DONE, MG_FREE, mg_if_recv_tcp_cb(), mg_is_error(), MG_MALLOC, MG_RECV_FUNC, MG_TCP_RECV_BUFFER_SIZE, n, recv_avail_size(), mg_connection::sock, and mg_connection::ssl.

Referenced by mg_mgr_handle_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_recv_common ( struct mg_connection nc,
void *  buf,
int  len 
)
static

Definition at line 2708 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2708 of file mongoose.cc

References mbuf::buf, DBG, mg_connection::flags, mg_connection::last_io_time, mbuf::len, mbuf_append(), mbuf_free(), mg_call(), MG_EV_RECV, MG_F_CLOSE_IMMEDIATELY, MG_FREE, mg_time(), mg_connection::recv_mbuf, and mbuf::size.

Referenced by mg_if_recv_tcp_cb(), and mg_if_recv_udp_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_recvfrom ( struct mg_connection nc,
union socket_address sa,
socklen_t *  sa_len,
char **  buf 
)
static

Definition at line 3441 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3441 of file mongoose.cc

References DBG, MG_FREE, MG_MALLOC, MG_UDP_RECV_BUFFER_SIZE, n, socket_address::sa, and mg_connection::sock.

Referenced by mg_handle_udp_read().

+ Here is the caller graph for this function:

void mg_register_http_endpoint ( struct mg_connection nc,
const char *  uri_path,
mg_event_handler_t  handler 
)

Definition at line 7834 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7834 of file mongoose.cc

References mg_http_proto_data::endpoints, handler(), mg_http_endpoint::handler, mg_http_get_proto_data(), mg_http_endpoint::name, mg_http_endpoint::name_len, mg_http_endpoint::next, and strdup().

+ Here is the call graph for this function:

MG_INTERNAL void mg_remove_conn ( struct mg_connection c)

Definition at line 2140 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2140 of file mongoose.cc

References mg_mgr::active_connections, mg_ev_mgr_remove_conn(), mg_connection::mgr, mg_connection::next, and mg_connection::prev.

Referenced by mg_close_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int mg_remove_directory ( const struct mg_serve_http_opts opts,
const char *  dir 
)
static

Definition at line 6597 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6597 of file mongoose.cc

References MAX_PATH_SIZE, mg_is_file_hidden(), mg_stat(), and path.

Referenced by mg_handle_delete().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_resolve ( const char *  host,
char *  buf,
size_t  n 
)

Definition at line 2371 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2371 of file mongoose.cc

References mg_resolve2().

+ Here is the call graph for this function:

static int mg_resolve2 ( const char *  host,
struct in_addr *  ina 
)
static

Definition at line 2341 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2341 of file mongoose.cc

References DBG, h, and merge_hashes::p.

Referenced by mg_resolve().

+ Here is the caller graph for this function:

int mg_resolve_async ( struct mg_mgr mgr,
const char *  name,
int  query,
mg_resolve_callback_t  cb,
void *  data 
)

Definition at line 9542 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9542 of file mongoose.cc

References mg_resolve_async_opt().

+ Here is the call graph for this function:

static void mg_resolve_async_eh ( struct mg_connection nc,
int  ev,
void *  data 
)
static
int mg_resolve_async_opt ( struct mg_mgr mgr,
const char *  name,
int  query,
mg_resolve_callback_t  cb,
void *  data,
struct mg_resolve_async_opts  opts 
)

Definition at line 9549 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9549 of file mongoose.cc

References mg_resolve_async_request::callback, Acts::Test::cb, configureMap::data, mg_resolve_async_request::data, DBG, mg_resolve_async_opts::dns_conn, mg_resolve_async_opts::max_retries, mg_resolve_async_request::max_retries, MG_CALLOC, mg_connect(), mg_dns_server, mg_get_ip_address_of_nameserver(), mg_resolve_async_eh(), mg_resolve_async_request::name, mg_resolve_async_opts::nameserver_url, mg_resolve_async_request::query, mg_resolve_async_opts::timeout, mg_resolve_async_request::timeout, and mg_connection::user_data.

Referenced by mg_connect_opt(), and mg_resolve_async().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_resolve_from_hosts_file ( const char *  name,
union socket_address usa 
)

Definition at line 9443 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9443 of file mongoose.cc

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, fclose(), line, merge_hashes::p, and socket_address::sin.

Referenced by mg_parse_address().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_rpc_create_error ( char *  buf,
int  len,
struct mg_rpc_request req,
int  code,
const char *  message,
const char *  fmt,
  ... 
)

Definition at line 8283 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8283 of file mongoose.cc

References mg_rpc_request::id, json_emit(), json_emit_va(), json_token::len, n, and json_token::ptr.

Referenced by mg_rpc_create_std_error().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_rpc_create_reply ( char *  buf,
int  len,
const struct mg_rpc_request req,
const char *  result_fmt,
  ... 
)

Definition at line 8243 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8243 of file mongoose.cc

References mg_rpc_request::id, json_emit(), json_emit_quoted_str(), json_emit_unquoted_str(), json_emit_va(), JSON_TYPE_NULL, JSON_TYPE_STRING, json_token::len, n, json_token::ptr, and json_token::type.

+ Here is the call graph for this function:

int mg_rpc_create_request ( char *  buf,
int  len,
const char *  method,
const char *  id,
const char *  params_fmt,
  ... 
)

Definition at line 8267 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8267 of file mongoose.cc

References json_emit(), json_emit_va(), and n.

+ Here is the call graph for this function:

int mg_rpc_create_std_error ( char *  buf,
int  len,
struct mg_rpc_request req,
int  code 
)

Definition at line 8301 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8301 of file mongoose.cc

References JSON_RPC_INVALID_PARAMS_ERROR, JSON_RPC_INVALID_REQUEST_ERROR, JSON_RPC_METHOD_NOT_FOUND_ERROR, JSON_RPC_PARSE_ERROR, JSON_RPC_SERVER_ERROR, gtest_output_test::message, and mg_rpc_create_error().

Referenced by mg_rpc_dispatch().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_rpc_dispatch ( const char *  buf,
int  len,
char *  dst,
int  dst_len,
const char **  methods,
mg_rpc_handler_t handlers 
)

Definition at line 8329 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8329 of file mongoose.cc

References find_json_token(), i, mg_rpc_request::id, JSON_RPC_INVALID_REQUEST_ERROR, JSON_RPC_METHOD_NOT_FOUND_ERROR, JSON_RPC_PARSE_ERROR, JSON_RPC_SERVER_ERROR, JSON_STRING_INVALID, json_token::len, mg_rpc_request::message, mg_rpc_request::method, mg_rpc_create_std_error(), n, mg_rpc_request::params, parse_json(), and json_token::ptr.

+ Here is the call graph for this function:

int mg_rpc_parse_reply ( const char *  buf,
int  len,
struct json_token toks,
int  max_toks,
struct mg_rpc_reply rep,
struct mg_rpc_error er 
)

Definition at line 8368 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8368 of file mongoose.cc

References mg_rpc_error::error_code, mg_rpc_error::error_data, mg_rpc_error::error_message, find_json_token(), mg_rpc_reply::id, mg_rpc_error::id, mg_rpc_reply::message, mg_rpc_error::message, n, parse_json(), and mg_rpc_reply::result.

+ Here is the call graph for this function:

static void mg_scan_directory ( struct mg_connection nc,
const char *  dir,
const struct mg_serve_http_opts opts,
void(*)(struct mg_connection *, const char *, cs_stat_t *)  func 
)
static

Definition at line 6413 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6413 of file mongoose.cc

References DBG, MAX_PATH_SIZE, mg_is_file_hidden(), and mg_stat().

Referenced by mg_handle_propfind(), and mg_send_directory_listing().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_send ( struct mg_connection nc,
const void *  buf,
int  len 
)

Definition at line 2687 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2687 of file mongoose.cc

References mg_connection::flags, mg_mgr::hexdump_file, mg_connection::last_io_time, MG_EV_SEND, MG_F_UDP, mg_hexdump_connection(), mg_if_tcp_send(), mg_if_udp_send(), mg_time(), and mg_connection::mgr.

Referenced by dns_handler(), mg_forward(), mg_handle_cgi(), mg_handle_propfind(), mg_http_send_error(), mg_http_transfer_file_data(), mg_mqtt_connack(), mg_mqtt_publish(), mg_mqtt_suback(), mg_mqtt_subscribe(), mg_mqtt_unsubscribe(), mg_printf_html_escape(), mg_send_dns_query(), mg_send_file_data(), mg_send_head(), mg_send_http_chunk(), mg_send_mqtt_handshake_opt(), mg_send_mqtt_short_command(), mg_send_ssi_file(), mg_send_websocket_frame(), mg_send_websocket_framev(), mg_send_ws_header(), and mg_vprintf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_send_directory_listing ( struct mg_connection nc,
const char *  dir,
struct http_message hm,
struct mg_serve_http_opts opts 
)
static

Definition at line 6440 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6440 of file mongoose.cc

References mg_serve_http_opts::extra_headers, mg_connection::flags, mg_str::len, MG_F_SEND_AND_CLOSE, mg_print_dir_entry(), mg_printf(), mg_printf_http_chunk(), mg_scan_directory(), mg_send_http_chunk(), mg_send_response_line(), mg_str::p, and http_message::uri.

Referenced by mg_send_http_file().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_send_dns_query ( struct mg_connection nc,
const char *  name,
int  query_type 
)

Definition at line 9052 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9052 of file mongoose.cc

References mbuf::buf, cleanup(), DBG, mg_connection::flags, mg_dns_message::flags, mg_dns_resource_record::kind, mbuf::len, mbuf_free(), mbuf_init(), mbuf_insert(), MG_CALLOC, mg_dns_encode_record(), mg_dns_insert_header(), MG_DNS_QUESTION, mg_dns_tid, MG_F_UDP, MG_FREE, mg_send(), mg_dns_message::num_questions, mg_dns_message::questions, mg_dns_resource_record::rclass, mg_dns_resource_record::rtype, and mg_dns_message::transaction_id.

Referenced by mg_resolve_async_eh().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_send_file_data ( struct mg_connection nc,
FILE *  fp 
)
static

Definition at line 5711 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5711 of file mongoose.cc

References mg_send(), and n.

Referenced by do_ssi_exec(), and mg_do_ssi_include().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_send_head ( struct mg_connection c,
int  status_code,
int64_t  content_length,
const char *  extra_headers 
)

Definition at line 5681 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5681 of file mongoose.cc

References mg_printf(), mg_send(), and mg_send_response_line().

Referenced by mg_http_send_error().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_send_http_chunk ( struct mg_connection nc,
const char *  buf,
size_t  len 
)

Definition at line 6087 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6087 of file mongoose.cc

References mg_send(), and n.

Referenced by mg_printf_http_chunk(), and mg_send_directory_listing().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MG_INTERNAL void mg_send_http_file ( struct mg_connection nc,
char *  path,
const struct mg_str path_info,
struct http_message hm,
struct mg_serve_http_opts opts 
)
void mg_send_mqtt_handshake ( struct mg_connection nc,
const char *  client_id 
)

Definition at line 8504 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8504 of file mongoose.cc

References mg_send_mqtt_handshake_opt().

+ Here is the call graph for this function:

void mg_send_mqtt_handshake_opt ( struct mg_connection nc,
const char *  client_id,
struct mg_send_mqtt_handshake_opts  opts 
)

Definition at line 8509 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8509 of file mongoose.cc

References mg_send_mqtt_handshake_opts::flags, mg_send_mqtt_handshake_opts::keep_alive, MG_MQTT_CMD_CONNECT, MG_MQTT_HAS_PASSWORD, MG_MQTT_HAS_USER_NAME, mg_send(), mg_send_mqtt_handshake_opts::password, and mg_send_mqtt_handshake_opts::user_name.

Referenced by mg_send_mqtt_handshake().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_send_mqtt_short_command ( struct mg_connection nc,
uint8_t  cmd,
uint16_t  message_id 
)
static

Definition at line 8664 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8664 of file mongoose.cc

References mg_mqtt_prepend_header(), MG_MQTT_QOS, and mg_send().

Referenced by mg_mqtt_puback(), mg_mqtt_pubcomp(), mg_mqtt_pubrec(), mg_mqtt_pubrel(), and mg_mqtt_unsuback().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_send_response_line ( struct mg_connection nc,
int  status_code,
const char *  extra_headers 
)

Definition at line 5642 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5642 of file mongoose.cc

References mg_printf().

Referenced by mg_handle_ssi_request(), mg_http_send_file2(), mg_http_send_port_based_redirect(), mg_send_directory_listing(), and mg_send_head().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_send_ssi_file ( struct mg_connection nc,
const char *  path,
FILE *  fp,
int  include_level,
const struct mg_serve_http_opts opts 
)
static

Definition at line 5789 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5789 of file mongoose.cc

References do_ssi_exec(), i, mg_str::len, mg_do_ssi_call(), mg_do_ssi_include(), MG_MK_STR, mg_printf(), mg_send(), and mg_str::p.

Referenced by mg_do_ssi_include(), and mg_handle_ssi_request().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_send_websocket_frame ( struct mg_connection nc,
int  op,
const void *  data,
size_t  len 
)

Definition at line 4723 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4723 of file mongoose.cc

References DBG, mg_connection::flags, MG_F_SEND_AND_CLOSE, mg_send(), mg_send_ws_header(), mg_ws_mask_frame(), mg_connection::send_mbuf, and WEBSOCKET_OP_CLOSE.

Referenced by broadcast(), initial_ws_update(), mg_printf_websocket_frame(), and mg_websocket_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_send_websocket_framev ( struct mg_connection nc,
int  op,
const struct mg_str strv,
int  strvcnt 
)

Definition at line 4737 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4737 of file mongoose.cc

References mg_connection::flags, i, mg_str::len, MG_F_SEND_AND_CLOSE, mg_send(), mg_send_ws_header(), mg_ws_mask_frame(), mg_connection::send_mbuf, and WEBSOCKET_OP_CLOSE.

+ Here is the call graph for this function:

void mg_send_websocket_handshake ( struct mg_connection nc,
const char *  path,
const char *  extra_headers 
)

Definition at line 5634 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5634 of file mongoose.cc

References mg_send_websocket_handshake2(), and MG_WS_NO_HOST_HEADER_MAGIC.

+ Here is the call graph for this function:

void mg_send_websocket_handshake2 ( struct mg_connection nc,
const char *  path,
const char *  host,
const char *  protocol,
const char *  extra_headers 
)

Definition at line 5605 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5605 of file mongoose.cc

References mg_base64_encode(), mg_printf(), and MG_WS_NO_HOST_HEADER_MAGIC.

Referenced by mg_connect_ws_opt(), and mg_send_websocket_handshake().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_send_ws_header ( struct mg_connection nc,
int  op,
size_t  len,
struct ws_mask_ctx ctx 
)
static

Definition at line 4678 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4678 of file mongoose.cc

References mbuf::len, mg_connection::listener, ws_mask_ctx::mask, mg_send(), mg_ws_random_mask(), ws_mask_ctx::pos, mg_connection::send_mbuf, Acts::Test::tmp(), and WEBSOCKET_DONT_FIN.

Referenced by mg_send_websocket_frame(), and mg_send_websocket_framev().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_serve_http ( struct mg_connection nc,
struct http_message hm,
struct mg_serve_http_opts  opts 
)

Definition at line 7576 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7576 of file mongoose.cc

References mg_serve_http_opts::cgi_file_pattern, mg_serve_http_opts::document_root, mg_serve_http_opts::enable_directory_listing, mg_connection::flags, mg_serve_http_opts::index_files, mg_serve_http_opts::ip_acl, mg_check_ip_acl(), MG_F_SEND_AND_CLOSE, MG_FREE, mg_get_http_header(), mg_http_send_error(), mg_http_send_port_based_redirect(), mg_normalize_uri_path(), mg_send_http_file(), mg_uri_to_local_path(), mg_vcmp(), mg_serve_http_opts::per_directory_auth_file, http_message::proto, mg_connection::sa, socket_address::sin, mg_serve_http_opts::ssi_pattern, and http_message::uri.

Referenced by ev_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_set_close_on_exec ( sock_t  sock)

Definition at line 7970 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7970 of file mongoose.cc

Referenced by mg_do_ssi_include(), mg_handle_put(), mg_handle_ssi_request(), mg_sock_set(), and mg_socketpair().

+ Here is the caller graph for this function:

void mg_set_non_blocking_mode ( sock_t  sock)

Definition at line 3139 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3139 of file mongoose.cc

References mg_add_sock_opts::flags, and on.

Referenced by mg_if_connect_tcp(), mg_open_listening_socket(), and mg_sock_set().

+ Here is the caller graph for this function:

void mg_set_protocol_dns ( struct mg_connection nc)

Definition at line 9255 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9255 of file mongoose.cc

References dns_handler(), and mg_connection::proto_handler.

+ Here is the call graph for this function:

void mg_set_protocol_http_websocket ( struct mg_connection nc)

Definition at line 5599 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 5599 of file mongoose.cc

References mg_http_handler(), and mg_connection::proto_handler.

Referenced by mg_connect_http_base(), and mg_server().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_set_protocol_mqtt ( struct mg_connection nc)

Definition at line 8500 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8500 of file mongoose.cc

References mqtt_handler(), and mg_connection::proto_handler.

+ Here is the call graph for this function:

double mg_set_timer ( struct mg_connection c,
double  timestamp 
)

Definition at line 3080 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3080 of file mongoose.cc

References DBG, mg_connection::ev_timer_time, mg_connection::flags, MG_F_RESOLVING, mg_connection::priv_2, and CDB::timestamp.

const char* mg_skip ( const char *  s,
const char *  end,
const char *  delims,
struct mg_str v 
)

Definition at line 7859 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7859 of file mongoose.cc

References mg_str::len, mg_str::p, and physmon_simulation::s.

Referenced by mg_http_parse_headers(), and mg_parse_http().

+ Here is the caller graph for this function:

void mg_sock_addr_to_str ( const union socket_address sa,
char *  buf,
size_t  len,
int  flags 
)

Definition at line 7980 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7980 of file mongoose.cc

References if(), MG_SOCK_STRINGIFY_IP, MG_SOCK_STRINGIFY_PORT, socket_address::sa, socket_address::sin, socket_address::sin6, and start.

Referenced by mg_conn_addr_to_str(), and mg_sock_to_str().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_sock_get_addr ( sock_t  sock,
int  remote,
union socket_address sa 
)
static

Definition at line 3818 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3818 of file mongoose.cc

References socket_address::sa.

Referenced by mg_if_get_conn_addr(), and mg_sock_to_str().

+ Here is the caller graph for this function:

void mg_sock_set ( struct mg_connection nc,
sock_t  sock 
)

Definition at line 3601 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3601 of file mongoose.cc

References DBG, mg_set_close_on_exec(), mg_set_non_blocking_mode(), and mg_connection::sock.

Referenced by mg_accept_conn(), mg_add_sock_opt(), mg_if_listen_tcp(), and mg_if_listen_udp().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void mg_sock_to_str ( sock_t  sock,
char *  buf,
size_t  len,
int  flags 
)

Definition at line 3829 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3829 of file mongoose.cc

References mg_sock_addr_to_str(), mg_sock_get_addr(), and MG_SOCK_STRINGIFY_REMOTE.

Referenced by mg_prepare_cgi_environment().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_socketpair ( sock_t  sp[2],
int  sock_type 
)

Definition at line 3774 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3774 of file mongoose.cc

References mg_set_close_on_exec(), socket_address::sa, and socket_address::sin.

Referenced by mg_ev_mgr_init(), and mg_handle_cgi().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static pid_t mg_start_process ( const char *  interp,
const char *  cmd,
const char *  env,
const char *  envp[],
const char *  dir,
sock_t  sock 
)
static

Definition at line 7097 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7097 of file mongoose.cc

References train_ambiguity_solver::pid, signal(), and Acts::Test::tmp().

Referenced by mg_handle_cgi().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_stat ( const char *  path,
cs_stat_t *  st 
)

Definition at line 7905 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7905 of file mongoose.cc

References ARRAY_SIZE, DBG, and MAX_PATH_SIZE.

Referenced by mg_create_itermediate_directories(), mg_find_index_file(), mg_handle_delete(), mg_handle_put(), mg_remove_directory(), mg_scan_directory(), mg_send_http_file(), and mg_uri_to_local_path().

+ Here is the caller graph for this function:

double mg_time ( )

Definition at line 3114 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3114 of file mongoose.cc

References cs_time().

Referenced by mg_create_connection_base(), mg_mgr_poll(), mg_recv_common(), mg_send(), and resolve_cb().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 
)

Definition at line 6799 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6799 of file mongoose.cc

References assert, KFPMath::b, mg_serve_http_opts::dav_document_root, DBG, mg_serve_http_opts::document_root, Acts::Concepts::exists, i, mg_str::len, http_message::method, MG_FREE, mg_get_http_header(), mg_is_dav_request(), MG_MALLOC, mg_match_prefix_n(), MG_MAX_PATH, mg_ncasecmp(), mg_next_comma_list_entry(), mg_stat(), mg_url_decode(), mg_vcmp(), next, out, merge_hashes::p, mg_str::p, parse_uri_component(), Acts::UnitConstants::ps, physmon_ckf_tracking::u, http_message::uri, and mg_serve_http_opts::url_rewrites.

Referenced by mg_serve_http().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_url_decode ( const char *  src,
int  src_len,
char *  dst,
int  dst_len,
int  is_form_url_encoded 
)

Definition at line 6022 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6022 of file mongoose.cc

References KFPMath::a, KFPMath::b, HEXTOI, i, and j.

Referenced by mg_get_http_var(), and mg_uri_to_local_path().

+ Here is the caller graph for this function:

static size_t mg_url_encode ( const char *  src,
size_t  s_len,
char *  dst,
size_t  dst_len 
)
static

Definition at line 6344 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 6344 of file mongoose.cc

References i, and j.

Referenced by mg_print_dir_entry(), and mg_print_props().

+ Here is the caller graph for this function:

int mg_vcasecmp ( const struct mg_str str1,
const char *  str2 
)

Definition at line 7886 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7886 of file mongoose.cc

References mg_str::len, mg_ncasecmp(), mg_str::p, and physmon_track_finding_ttbar::r.

Referenced by mg_get_mime_type(), mg_http_handler(), mg_http_send_file2(), mg_is_not_modified(), and mg_parse_http().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int mg_vcmp ( const struct mg_str str1,
const char *  str2 
)

Definition at line 7895 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 7895 of file mongoose.cc

References mg_str::len, mg_str::p, and physmon_track_finding_ttbar::r.

Referenced by ev_handler(), mg_handle_propfind(), mg_http_send_file2(), mg_http_send_port_based_redirect(), mg_is_creation_request(), mg_is_dav_request(), mg_normalize_uri_path(), mg_send_http_file(), mg_serve_http(), and mg_uri_to_local_path().

+ Here is the caller graph for this function:

int mg_vprintf ( struct mg_connection nc,
const char *  fmt,
va_list  ap 
)

Definition at line 2316 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2316 of file mongoose.cc

References mg_avprintf(), MG_FREE, mg_send(), and MG_VPRINTF_BUFFER_SIZE.

Referenced by mg_printf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_websocket_handler ( struct mg_connection nc,
int  ev,
void *  ev_data 
)
static

Definition at line 4776 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4776 of file mongoose.cc

References mg_connection::flags, mg_connection::handler, mg_connection::last_io_time, mg_call(), mg_deliver_websocket_data(), MG_EV_POLL, MG_EV_RECV, MG_F_IS_WEBSOCKET, mg_send_websocket_frame(), MG_WEBSOCKET_PING_INTERVAL_SECONDS, and WEBSOCKET_OP_PING.

Referenced by mg_http_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_write_to_socket ( struct mg_connection nc)
static

Definition at line 3328 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3328 of file mongoose.cc

References assert, mbuf::buf, DBG, mg_connection::flags, mbuf::len, mbuf_remove(), MG_F_SSL_HANDSHAKE_DONE, MG_F_UDP, MG_F_WANT_READ, MG_F_WANT_WRITE, mg_if_sent_cb(), mg_is_error(), MG_SEND_FUNC, n, socket_address::sa, mg_connection::sa, mg_connection::send_mbuf, socket_address::sin, mg_connection::sock, and mg_connection::ssl.

Referenced by mg_mgr_handle_conn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_ws_handshake ( struct mg_connection nc,
const struct mg_str key 
)
static

Definition at line 4800 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4800 of file mongoose.cc

References cs_sha1_final(), cs_sha1_init(), cs_sha1_update(), DBG, mg_str::len, mg_base64_encode(), mg_printf(), MG_VPRINTF_BUFFER_SIZE, and mg_str::p.

Referenced by mg_http_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void mg_ws_mask_frame ( struct mbuf mbuf,
struct ws_mask_ctx ctx 
)
static

Definition at line 4715 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4715 of file mongoose.cc

References mbuf::buf, i, mbuf::len, ws_mask_ctx::mask, and ws_mask_ctx::pos.

Referenced by mg_send_websocket_frame(), and mg_send_websocket_framev().

+ Here is the caller graph for this function:

static uint32_t mg_ws_random_mask ( void  )
static

Definition at line 4650 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4650 of file mongoose.cc

References mask.

Referenced by mg_send_ws_header().

+ Here is the caller graph for this function:

static void mqtt_handler ( struct mg_connection nc,
int  ev,
void *  ev_data 
)
static

Definition at line 8475 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8475 of file mongoose.cc

References mbuf::buf, mg_mqtt_message::cmd, mg_connection::handler, mg_str::len, mbuf_remove(), MG_EV_RECV, MG_FREE, MG_MQTT_EVENT_BASE, mg_str::p, parse_mqtt(), mg_mqtt_message::payload, mg_connection::recv_mbuf, and mg_mqtt_message::topic.

Referenced by mg_set_protocol_mqtt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int parse_array ( struct frozen f)
static

Definition at line 844 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 844 of file mongoose.cc

References capture_len(), capture_ptr(), frozen::cur, cur(), JSON_TYPE_ARRAY, frozen::num_tokens, parse_value(), test_and_skip(), and TRY.

Referenced by doit(), and parse_value().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int parse_identifier ( struct frozen f)
static

Definition at line 772 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 772 of file mongoose.cc

References capture_len(), capture_ptr(), frozen::cur, cur(), frozen::end, EXPECT, is_alpha(), is_digit(), JSON_STRING_INVALID, JSON_TYPE_STRING, frozen::num_tokens, and TRY.

Referenced by parse_key().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int parse_json ( const char *  s,
int  s_len,
struct json_token arr,
int  arr_len 
)

Definition at line 980 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 980 of file mongoose.cc

References arr, frozen::cur, doit(), frozen::end, frozen::max_tokens, physmon_simulation::s, frozen::tokens, and TRY.

Referenced by mg_rpc_dispatch(), and mg_rpc_parse_reply().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

struct json_token* parse_json2 ( const char *  s,
int  s_len 
)
read

Definition at line 994 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 994 of file mongoose.cc

References frozen::cur, frozen::do_realloc, doit(), frozen::end, FROZEN_FREE, physmon_simulation::s, and frozen::tokens.

+ Here is the call graph for this function:

static int parse_key ( struct frozen f)
static

Definition at line 922 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 922 of file mongoose.cc

References frozen::cur, cur(), frozen::end, END_OF_STRING, is_alpha(), JSON_STRING_INCOMPLETE, JSON_STRING_INVALID, parse_identifier(), parse_string(), printf(), and TRY.

Referenced by parse_pair().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MG_INTERNAL int parse_mqtt ( struct mbuf io,
struct mg_mqtt_message mm 
)

Definition at line 8407 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8407 of file mongoose.cc

References mbuf::buf, runCondor_beamspot::cmd, mg_mqtt_message::cmd, mg_mqtt_message::connack_ret_code, mbuf::len, mbuf_remove(), mg_mqtt_message::message_id, MG_MALLOC, MG_MQTT_CMD_CONNACK, MG_MQTT_CMD_CONNECT, MG_MQTT_CMD_PUBACK, MG_MQTT_CMD_PUBCOMP, MG_MQTT_CMD_PUBLISH, MG_MQTT_CMD_PUBREC, MG_MQTT_CMD_PUBREL, MG_MQTT_CMD_SUBACK, MG_MQTT_CMD_SUBSCRIBE, MG_MQTT_GET_QOS, mg_mqtt_message::qos, and mg_mqtt_message::topic.

Referenced by mqtt_handler().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int parse_net ( const char *  spec,
uint32_t *  net,
uint32_t *  mask 
)
static

Definition at line 3034 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3034 of file mongoose.cc

References KFPMath::a, KFPMath::b, Acts::PhysicalConstants::c, isbyte(), and n.

Referenced by mg_check_ip_acl().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int parse_number ( struct frozen f)
static

Definition at line 818 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 818 of file mongoose.cc

References capture_len(), capture_ptr(), frozen::cur, cur(), frozen::end, EXPECT, is_digit(), JSON_STRING_INCOMPLETE, JSON_STRING_INVALID, JSON_TYPE_NUMBER, frozen::num_tokens, and TRY.

Referenced by parse_value().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int parse_object ( struct frozen f)
static

Definition at line 946 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 946 of file mongoose.cc

References capture_len(), capture_ptr(), frozen::cur, cur(), JSON_TYPE_OBJECT, frozen::num_tokens, parse_pair(), test_and_skip(), and TRY.

Referenced by doit(), and parse_value().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int parse_pair ( struct frozen f)
static

Definition at line 938 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 938 of file mongoose.cc

References parse_key(), parse_value(), test_and_skip(), and TRY.

Referenced by parse_object().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int parse_string ( struct frozen f)
static

Definition at line 796 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 796 of file mongoose.cc

References capture_len(), capture_ptr(), frozen::cur, frozen::end, EXPECT, get_escape_len(), get_utf8_char_len(), JSON_STRING_INCOMPLETE, JSON_STRING_INVALID, JSON_TYPE_STRING, left(), json_token::len, n, frozen::num_tokens, test_and_skip(), and TRY.

Referenced by parse_key(), and parse_value().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void parse_uri_component ( const char **  p,
const char *  end,
char  sep,
struct mg_str res 
)
static

Definition at line 3972 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3972 of file mongoose.cc

References end, mg_str::len, merge_hashes::p, and mg_str::p.

Referenced by mg_normalize_uri_path(), mg_parse_uri(), and mg_uri_to_local_path().

+ Here is the caller graph for this function:

static int parse_value ( struct frozen f)
static

Definition at line 879 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 879 of file mongoose.cc

References cur(), END_OF_STRING, expect(), JSON_STRING_INCOMPLETE, JSON_STRING_INVALID, JSON_TYPE_FALSE, JSON_TYPE_NULL, JSON_TYPE_TRUE, parse_array(), parse_number(), parse_object(), parse_string(), and TRY.

Referenced by parse_array(), and parse_pair().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int path_part_len ( const char *  p)
static

Definition at line 1009 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 1009 of file mongoose.cc

References i.

Referenced by find_json_token().

+ Here is the caller graph for this function:

MG_INTERNAL size_t recv_avail_size ( struct mg_connection conn,
size_t  max 
)

Definition at line 3383 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 3383 of file mongoose.cc

References mbuf::len, mg_connection::recv_mbuf, and mg_connection::recv_mbuf_limit.

Referenced by mg_read_from_socket().

+ Here is the caller graph for this function:

static void resolve_cb ( struct mg_dns_message msg,
void *  data,
enum mg_resolve_err  e 
)
static

Definition at line 2819 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 2819 of file mongoose.cc

References mg_dns_message::answers, mg_connection::flags, i, mg_call(), mg_destroy_conn(), MG_DNS_A_RECORD, mg_dns_parse_record_data(), mg_do_connect(), MG_EV_CLOSE, MG_EV_CONNECT, MG_EV_TIMER, MG_F_RESOLVING, MG_F_UDP, MG_RESOLVE_TIMEOUT, mg_time(), mg_dns_message::num_answers, mg_dns_resource_record::rtype, mg_connection::sa, and socket_address::sin.

Referenced by mg_connect_opt().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void skip_whitespaces ( struct frozen f)
static

Definition at line 687 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 687 of file mongoose.cc

References frozen::cur, frozen::end, and is_space().

Referenced by cur().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int test_and_skip ( struct frozen f,
int  expected 
)
static

Definition at line 696 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 696 of file mongoose.cc

References frozen::cur, cur(), END_OF_STRING, JSON_STRING_INCOMPLETE, and JSON_STRING_INVALID.

Referenced by parse_array(), parse_object(), parse_pair(), and parse_string().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int test_no_skip ( struct frozen f,
int  expected 
)
static

Definition at line 705 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 705 of file mongoose.cc

References cur(), END_OF_STRING, JSON_STRING_INCOMPLETE, and JSON_STRING_INVALID.

Referenced by doit().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

FILE* cs_log_file = NULL

Definition at line 349 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 349 of file mongoose.cc

Referenced by cs_log_print_prefix(), cs_log_printf(), and cs_log_set_file().

Initial value:

Definition at line 340 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 340 of file mongoose.cc

size_t ext_len

Definition at line 4316 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4316 of file mongoose.cc

Referenced by mg_get_mime_type().

const char* mg_default_dns_server = "udp://" MG_DEFAULT_NAMESERVER ":53"
static

Definition at line 9351 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9351 of file mongoose.cc

MG_INTERNAL char mg_dns_server[256]

Definition at line 9353 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 9353 of file mongoose.cc

Referenced by mg_resolve_async_opt().

int mg_dns_tid = 0xa0
static

Definition at line 8901 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 8901 of file mongoose.cc

Referenced by mg_send_dns_query().

struct { ... } mg_static_builtin_mime_types[]

Referenced by mg_get_mime_type().

const char* mg_version_header = "Mongoose/" MG_VERSION
static

Definition at line 4157 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4157 of file mongoose.cc

const char* mime_type

Definition at line 4317 of file mongoose.cc.

View newest version in sPHENIX GitHub at line 4317 of file mongoose.cc

void*(* test_calloc)(size_t count, size_t size)
void*(* test_malloc)(size_t size)