nut/include/pro/httpd.h File Reference


Detailed Description

HTTP protocol definitions for daemons.

#include <stdio.h>

Data Structures

struct  _AUTHINFO
 HTTP authorization information structure. More...
struct  _CGIFUNCTION
 Registered CGI function. More...
struct  _REQUEST
 HTTP request information structure. More...

Defines

#define METHOD_GET   1
#define METHOD_HEAD   3
#define METHOD_POST   2

Typedefs

typedef typedef__END_DECLS
struct _AUTHINFO 
AUTHINFO
typedef typedef__END_DECLS
struct _CGIFUNCTION 
CGIFUNCTION
typedef _REQUEST REQUEST

Functions

void NutCgiProcessRequest (FILE *stream, REQUEST *req)
 Process an incoming CGI request.
void NutClearAuth (void)
 Clear all authorization entries.
void * NutGetMimeHandler (char *name)
 Return the mime type handler of a specified file name.
char * NutGetMimeType (char *name)
 Return the mime type description of a specified file name.
__BEGIN_DECLS int NutHttpAuthValidate (REQUEST *req)
 Validate an authorization request.
char * NutHttpGetParameter (REQUEST *req, char *name)
 Gets a request parameter value by name.
int NutHttpGetParameterCount (REQUEST *req)
 Gets the number of request parameters.
char * NutHttpGetParameterName (REQUEST *req, int index)
 Gets the name of a request parameter.
char * NutHttpGetParameterValue (REQUEST *req, int index)
 Get the value of a request paramter.
void NutHttpProcessPostQuery (FILE *stream, REQUEST *req)
 Parses the QueryString.
void NutHttpProcessQueryString (REQUEST *req)
 Parses the QueryString.
__BEGIN_DECLS void NutHttpProcessRequest (FILE *stream)
 Process the next HTTP request.
void NutHttpSendError (FILE *stream, REQUEST *req, int status)
 Send a HTTP error response.
void NutHttpSendHeaderBot (FILE *stream, char *mime_type, long bytes)
 Send bottom lines of a standard HTML header.
void NutHttpSendHeaderTop (FILE *stream, REQUEST *req, int status, char *title)
 Send top lines of a standard HTML header.
void NutHttpURLDecode (char *str)
 URLDecodes a string.
char * NutHttpURLEncode (char *str)
int NutRegisterAuth (CONST char *dirname, CONST char *login)
 Register an authorization entry.
int NutRegisterCgi (char *name, int(*func)(FILE *, REQUEST *))
 Register a CGI function.
__BEGIN_DECLS int NutRegisterHttpRoot (char *path)
 Register the HTTP server's root directory.
u_char NutSetMimeHandler (char *extension, void(*handler)(FILE *stream, int fd, int file_len, char *http_root, REQUEST *req))
 Set the mime type handler for a specified file extension.


Generated on Tue Jan 23 21:12:26 2007 for BTnut System Software by doxygen 1.4.7