#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <errno.h>
#include <limits.h>
#include <stddef.h>
#include <stdarg.h>
#include <ctype.h>
#include <time.h>
#include "mongoose.h"
#include <sys/wait.h>
#include <unistd.h>
Go to the source code of this file.
|
static void | die (const char *fmt,...) |
|
static char * | get_option (char **options, const char *option_name) |
|
static void | init_server_name (void) |
|
static int | is_path_absolute (const char *path) |
|
int | main (int argc, char *argv[]) |
|
int | modify_passwords_file (const char *fname, const char *domain, const char *user, const char *pass) |
|
static void | notify (const char *fmt,...) |
|
static int | path_exists (const char *path, int is_dir) |
|
static void | process_command_line_arguments (char *argv[], char **options) |
|
static char * | sdup (const char *str) |
|
static void * | serving_thread_func (void *param) |
|
static void | set_absolute_path (char *options[], const char *option_name) |
|
static void | set_option (char **options, const char *name, const char *value) |
|
static void | set_options (char *argv[]) |
|
static void | show_usage_and_exit (void) |
|
static void __cdecl | signal_handler (int sig_num) |
|
static void | start_mongoose (int argc, char *argv[]) |
|
static void | verify_existence (char **options, const char *name, int is_dir) |
|
static void | vnotify (const char *fmt, va_list ap, int must_exit) |
|
#define _CRT_SECURE_NO_WARNINGS |
#define _WIN32_WINNT 0x500 |
#define _XOPEN_SOURCE 600 |
#define abs_path |
( |
|
rel, |
|
|
|
abs, |
|
|
|
abs_size |
|
) |
| realpath((rel), (abs)) |
#define CONFIG_FILE "mongoose.conf" |
#define MAX_CONF_FILE_LINE_SIZE (8 * 1024) |
static void die |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
static char* get_option |
( |
char ** |
options, |
|
|
const char * |
option_name |
|
) |
| |
|
static |
static void init_server_name |
( |
void |
| ) |
|
|
static |
static int is_path_absolute |
( |
const char * |
path | ) |
|
|
static |
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
int modify_passwords_file |
( |
const char * |
fname, |
|
|
const char * |
domain, |
|
|
const char * |
user, |
|
|
const char * |
pass |
|
) |
| |
static void notify |
( |
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
static int path_exists |
( |
const char * |
path, |
|
|
int |
is_dir |
|
) |
| |
|
static |
static void process_command_line_arguments |
( |
char * |
argv[], |
|
|
char ** |
options |
|
) |
| |
|
static |
static char* sdup |
( |
const char * |
str | ) |
|
|
static |
static void* serving_thread_func |
( |
void * |
param | ) |
|
|
static |
static void set_absolute_path |
( |
char * |
options[], |
|
|
const char * |
option_name |
|
) |
| |
|
static |
static void set_option |
( |
char ** |
options, |
|
|
const char * |
name, |
|
|
const char * |
value |
|
) |
| |
|
static |
static void set_options |
( |
char * |
argv[] | ) |
|
|
static |
static void show_usage_and_exit |
( |
void |
| ) |
|
|
static |
static void __cdecl signal_handler |
( |
int |
sig_num | ) |
|
|
static |
static void start_mongoose |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
static |
static void verify_existence |
( |
char ** |
options, |
|
|
const char * |
name, |
|
|
int |
is_dir |
|
) |
| |
|
static |
static void vnotify |
( |
const char * |
fmt, |
|
|
va_list |
ap, |
|
|
int |
must_exit |
|
) |
| |
|
static |
char s_config_file[PATH_MAX] |
|
static |
const char* s_default_document_root = "." |
|
static |
const char* s_default_listening_port = "8080" |
|
static |