![]() |
Kinetis SDK v.1.2 Demo Applications User's Guide
Rev. 0
Freescale Semiconductor, Inc.
|
#include <stdio.h>
#include <stdlib.h>
#include <dir.h>
#include <dos.h>
#include <string.h>
#include "fsl_debug_console.h"
#include "../httpd_structs.h"
#include "../../../../lwip/src/core/ipv4/inet_chksum.c"
#include "../../../../lwip/src/core/def.c"
Macros | |
#define | FIND_T |
#define | FIND_T_FILENAME(fInfo) |
#define | FIND_T_IS_DIR(fInfo) |
#define | FIND_T_IS_FILE(fInfo) |
#define | FIND_RET_T |
#define | FINDFIRST_FILE(path, result) |
#define | FINDFIRST_DIR(path, result) |
#define | FINDNEXT(ff_res, result) |
#define | FINDFIRST_SUCCEEDED(ret) |
#define | FINDNEXT_SUCCEEDED(ret) |
#define | GETCWD(path, len) |
#define | CHDIR(path) |
#define | LWIP_HTTPD_DYNAMIC_HEADERS |
#define | LWIP_HTTPD_SSI |
#define | PAYLOAD_ALIGNMENT |
#define | ALIGN_PAYLOAD |
#define | PAYLOAD_ALIGN_TYPE |
#define | HEX_BYTES_PER_LINE |
#define | MAX_PATH_LEN |
#define | COPY_BUFSIZE |
Functions | |
int | process_sub (FILE *data_file, FILE *struct_file) |
int | process_file (FILE *data_file, FILE *struct_file, const char *filename) |
int | file_write_http_header (FILE *data_file, const char *filename, int file_size, u16_t *http_hdr_len, u16_t *http_hdr_chksum) |
int | file_put_ascii (FILE *file, const char *ascii_string, int len, int *i) |
int | s_put_ascii (char *buf, const char *ascii_string, int len, int *i) |
void | concat_files (const char *file1, const char *file2, const char *targetfile) |
int | main (int argc, char *argv[]) |
static void | copy_file (const char *filename_in, FILE *fout) |
int | get_file_size (const char *filename) |
void | process_file_data (const char *filename, FILE *data_file) |
int | write_checksums (FILE *struct_file, const char *filename, const char *varname, u16_t hdr_len, u16_t hdr_chksum) |
Variables | |
const char * | serverID |
static int | payload_alingment_dummy_counter |
static unsigned char | file_buffer_raw [COPY_BUFSIZE] |
static char | file_buffer_c [COPY_BUFSIZE *5+((COPY_BUFSIZE/HEX_BYTES_PER_LINE)*3)] |
char | curSubdir [MAX_PATH_LEN] |
char | lastFileVar [MAX_PATH_LEN] |
char | hdr_buf [4096] |
unsigned char | processSubs |
unsigned char | includeHttpHeader |
unsigned char | useHttp11 |
unsigned char | supportSsi |
unsigned char | precalcChksum |
#define ALIGN_PAYLOAD |
#define CHDIR | ( | path | ) |
#define COPY_BUFSIZE |
#define FIND_RET_T |
#define FIND_T |
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
#define FIND_T_FILENAME | ( | fInfo | ) |
#define FIND_T_IS_DIR | ( | fInfo | ) |
#define FIND_T_IS_FILE | ( | fInfo | ) |
#define FINDFIRST_DIR | ( | path, | |
result | |||
) |
#define FINDFIRST_FILE | ( | path, | |
result | |||
) |
#define FINDFIRST_SUCCEEDED | ( | ret | ) |
#define FINDNEXT | ( | ff_res, | |
result | |||
) |
#define FINDNEXT_SUCCEEDED | ( | ret | ) |
#define GETCWD | ( | path, | |
len | |||
) |
#define HEX_BYTES_PER_LINE |
#define LWIP_HTTPD_DYNAMIC_HEADERS |
#define LWIP_HTTPD_SSI |
#define MAX_PATH_LEN |
#define PAYLOAD_ALIGN_TYPE |
#define PAYLOAD_ALIGNMENT |
void concat_files | ( | const char * | file1, |
const char * | file2, | ||
const char * | targetfile | ||
) |
|
static |
int file_put_ascii | ( | FILE * | file, |
const char * | ascii_string, | ||
int | len, | ||
int * | i | ||
) |
int file_write_http_header | ( | FILE * | data_file, |
const char * | filename, | ||
int | file_size, | ||
u16_t * | http_hdr_len, | ||
u16_t * | http_hdr_chksum | ||
) |
int get_file_size | ( | const char * | filename | ) |
int main | ( | int | argc, |
char * | argv[] | ||
) |
int process_file | ( | FILE * | data_file, |
FILE * | struct_file, | ||
const char * | filename | ||
) |
void process_file_data | ( | const char * | filename, |
FILE * | data_file | ||
) |
int process_sub | ( | FILE * | data_file, |
FILE * | struct_file | ||
) |
int s_put_ascii | ( | char * | buf, |
const char * | ascii_string, | ||
int | len, | ||
int * | i | ||
) |
int write_checksums | ( | FILE * | struct_file, |
const char * | filename, | ||
const char * | varname, | ||
u16_t | hdr_len, | ||
u16_t | hdr_chksum | ||
) |
char curSubdir[MAX_PATH_LEN] |
|
static |
|
static |
char hdr_buf[4096] |
unsigned char includeHttpHeader |
char lastFileVar[MAX_PATH_LEN] |
|
static |
unsigned char precalcChksum |
unsigned char processSubs |
const char* serverID |
unsigned char supportSsi |
unsigned char useHttp11 |