Included Files
- #include </usr/avr/include/stdint.h>
- #include <nut/include/stdio.h>
- #include <nut/include/time.h>
Preprocessor definitions
#define _PRO_HTTPD_H_
#define METHOD_GET 1
#define METHOD_POST 2
#define METHOD_HEAD 3
#define HTTP_CONN_CLOSE 1
#define HTTP_CONN_KEEP_ALIVE 2
#define HTTP_OF_USE_HOST_TIME 0x00000001UL
#define HTTP_OF_USE_FILE_TIME 0x00000002UL
typedef struct _REQUEST REQUEST
struct _REQUEST
struct _REQUEST
|
|
{
|
|
int req_method;
|
|
int req_version;
|
|
long req_length;
|
|
char* req_url;
|
|
char* req_query;
|
|
char* req_type;
|
|
char* req_cookie;
|
|
char* req_auth;
|
|
char* req_agent;
|
|
char** req_qptrs;
|
|
int req_numqptrs;
|
|
time_t req_ims;
|
|
char* req_referer;
|
|
char* req_host;
|
|
int req_connection;
|
|
}
|
|
typedef struct _MIMETYPES MIMETYPES
struct _MIMETYPES
struct _MIMETYPES
|
|
{
|
|
char* mtyp_ext;
|
|
char* mtyp_type;
|
|
void (*mtyp_handler)(FILE* stream,int fd,int file_len,char* http_root,REQUEST* req);
|
|
}
|
|
typedef struct _AUTHINFO AUTHINFO
struct _AUTHINFO
struct _AUTHINFO
|
|
{
|
|
AUTHINFO* auth_next;
|
|
char* auth_dirname;
|
|
char* auth_login;
|
|
}
|
|
typedef struct _CGIFUNCTION CGIFUNCTION
struct _CGIFUNCTION
struct _CGIFUNCTION
|
|
{
|
|
CGIFUNCTION* cgi_next;
|
|
char* cgi_name;
|
|
int (*cgi_func)(FILE*,REQUEST*);
|
|
}
|
|