ReactOS 0.4.16-dev-334-g4d9f67c
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <sys/stat.h>
#include "tinydir.h"
#include "lwip/init.h"
#include "../httpd_structs.h"
#include "lwip/apps/fs.h"
#include "../core/inet_chksum.c"
#include "../core/def.c"
Go to the source code of this file.
Classes | |
struct | file_entry |
Macros | |
#define | MAKEFS_SUPPORT_DEFLATE 0 |
#define | MAKEFS_SUPPORT_DEFLATE_ZLIB 0 |
#define | COPY_BUFSIZE (1024*1024) /* 1 MByte */ |
#define | USAGE_ARG_DEFLATE "" |
#define | NEWLINE "\r\n" |
#define | NEWLINE_LEN 2 |
#define | LWIP_PLATFORM_ASSERT(x) |
#define | LWIP_HTTPD_DYNAMIC_HEADERS 1 |
#define | LWIP_HTTPD_SSI 1 |
#define | PAYLOAD_ALIGNMENT 4 |
#define | ALIGN_PAYLOAD 1 |
#define | PAYLOAD_ALIGN_TYPE "unsigned int" |
#define | HEX_BYTES_PER_LINE 16 |
#define | MAX_PATH_LEN 256 |
Variables | |
static const char * | serverID = "Server: "HTTPD_SERVER_AGENT"\r\n" |
static char | serverIDBuffer [1024] |
static int | payload_alingment_dummy_counter = 0 |
static char | file_buffer_c [COPY_BUFSIZE *5+((COPY_BUFSIZE/HEX_BYTES_PER_LINE) *3)] |
static char | curSubdir [MAX_PATH_LEN-3] |
static char | lastFileVar [MAX_PATH_LEN] |
static char | hdr_buf [4096] |
static unsigned char | processSubs = 1 |
static unsigned char | includeHttpHeader = 1 |
static unsigned char | useHttp11 = 0 |
static unsigned char | supportSsi = 1 |
static unsigned char | precalcChksum = 0 |
static unsigned char | includeLastModified = 0 |
static const char * | exclude_list = NULL |
static const char * | ncompress_list = NULL |
static struct file_entry * | first_file = NULL |
static struct file_entry * | last_file = NULL |
static char * | ssi_file_buffer |
static char ** | ssi_file_lines |
static size_t | ssi_file_num_lines |
#define ALIGN_PAYLOAD 1 |
Definition at line 117 of file makefsdata.c.
#define COPY_BUFSIZE (1024*1024) /* 1 MByte */ |
Definition at line 35 of file makefsdata.c.
#define HEX_BYTES_PER_LINE 16 |
Definition at line 122 of file makefsdata.c.
#define LWIP_HTTPD_DYNAMIC_HEADERS 1 |
Definition at line 101 of file makefsdata.c.
#define LWIP_HTTPD_SSI 1 |
Definition at line 102 of file makefsdata.c.
Definition at line 97 of file makefsdata.c.
#define MAKEFS_SUPPORT_DEFLATE 0 |
makefsdata: Converts a directory structure for use with the lwIP httpd.
This file is part of the lwIP TCP/IP stack.
Author: Jim Pettinato Simon Goldschmidt
Makefsdata can generate all files deflate-compressed (where file size shrinks). Since nearly all browsers support this, this is a good way to reduce ROM size. To compress the files, "miniz.c" must be downloaded separately OR MAKEFS_SUPPORT_DEFLATE_ZLIB must be set and the zlib library and headers must be present on the system compiling this program.
Definition at line 29 of file makefsdata.c.
#define MAKEFS_SUPPORT_DEFLATE_ZLIB 0 |
Definition at line 31 of file makefsdata.c.
#define MAX_PATH_LEN 256 |
Definition at line 124 of file makefsdata.c.
#define NEWLINE "\r\n" |
Definition at line 93 of file makefsdata.c.
#define NEWLINE_LEN 2 |
Definition at line 94 of file makefsdata.c.
#define PAYLOAD_ALIGN_TYPE "unsigned int" |
Definition at line 119 of file makefsdata.c.
#define PAYLOAD_ALIGNMENT 4 |
Definition at line 115 of file makefsdata.c.
#define USAGE_ARG_DEFLATE "" |
Definition at line 70 of file makefsdata.c.
Definition at line 411 of file makefsdata.c.
Referenced by main().
Definition at line 808 of file makefsdata.c.
Referenced by main().
Definition at line 434 of file makefsdata.c.
Referenced by concat_files().
Definition at line 925 of file makefsdata.c.
Referenced by file_can_be_compressed(), and file_to_exclude().
Definition at line 956 of file makefsdata.c.
Referenced by process_file().
Definition at line 1280 of file makefsdata.c.
Referenced by file_write_http_header(), and process_file().
int file_write_http_header | ( | FILE * | data_file, |
const char * | filename, | ||
int | file_size, | ||
u16_t * | http_hdr_len, | ||
u16_t * | http_hdr_chksum, | ||
u8_t | provide_content_len, | ||
int | is_compressed | ||
) |
Definition at line 1079 of file makefsdata.c.
Referenced by process_file().
Definition at line 757 of file makefsdata.c.
Referenced by process_file().
|
static |
Definition at line 568 of file makefsdata.c.
Referenced by process_file().
Definition at line 888 of file makefsdata.c.
Referenced by process_file().
Definition at line 746 of file makefsdata.c.
Referenced by fix_filename_for_c().
Definition at line 195 of file makefsdata.c.
Definition at line 172 of file makefsdata.c.
Referenced by main().
Definition at line 961 of file makefsdata.c.
Referenced by process_sub().
Definition at line 684 of file makefsdata.c.
Referenced by process_file().
Definition at line 465 of file makefsdata.c.
Referenced by main(), and process_sub().
Definition at line 795 of file makefsdata.c.
Referenced by process_file().
Definition at line 1293 of file makefsdata.c.
|
static |
Definition at line 708 of file makefsdata.c.
Referenced by process_file().
|
static |
Definition at line 147 of file makefsdata.c.
Referenced by is_ssi_file(), main(), process_file(), and process_sub().
Definition at line 162 of file makefsdata.c.
Referenced by file_to_exclude(), and main().
|
static |
Definition at line 145 of file makefsdata.c.
Referenced by process_file_data().
|
static |
Definition at line 165 of file makefsdata.c.
Referenced by fix_filename_for_c(), main(), and register_filename().
|
static |
Definition at line 149 of file makefsdata.c.
Referenced by file_write_http_header(), and main().
Definition at line 152 of file makefsdata.c.
Referenced by main(), and process_file().
Definition at line 156 of file makefsdata.c.
Referenced by file_write_http_header(), and main().
|
static |
Definition at line 166 of file makefsdata.c.
Referenced by register_filename().
|
static |
Definition at line 148 of file makefsdata.c.
Referenced by main(), and process_file().
Definition at line 163 of file makefsdata.c.
Referenced by file_can_be_compressed(), and main().
|
static |
Definition at line 120 of file makefsdata.c.
Referenced by process_file().
Definition at line 155 of file makefsdata.c.
Referenced by file_write_http_header(), main(), and process_file().
Definition at line 151 of file makefsdata.c.
Referenced by main(), and process_sub().
(Your server name here)
Definition at line 111 of file makefsdata.c.
Referenced by file_write_http_header(), and main().
|
static |
Definition at line 112 of file makefsdata.c.
Referenced by main().
|
static |
Definition at line 168 of file makefsdata.c.
Referenced by checkSsiByFilelist(), is_ssi_file(), and main().
|
static |
Definition at line 169 of file makefsdata.c.
Referenced by checkSsiByFilelist(), is_ssi_file(), and main().
|
static |
Definition at line 170 of file makefsdata.c.
Referenced by checkSsiByFilelist(), and is_ssi_file().
Definition at line 154 of file makefsdata.c.
Referenced by is_ssi_file(), and main().
Definition at line 153 of file makefsdata.c.
Referenced by file_write_http_header(), main(), and process_file().