Download Zilog TCP/IP Software Suite Programmer`s Guide
Transcript
Zilog TCP/IP Software Suite Programmer’s Guide
Reference Manual
46
The port Parameter. Static and dynamic web pages call the port param-
eter, which is essentially a number that is used to differentiate applications, or instances of the same application, when using the TCP/IP stack
protocol. For HTTP applications, Port 80 is used.
CGI Functions
CGI functions are invoked when the HTTP application in ZTP matches
the path parameter in the array of webpage structures to a pointer of the
CGI function. The request pointer of the http_request structure is
passed to each CGI function for this client request. The http_request
structure contains parameters from the client request. This structure is
defined in the following code fragment from the http.h header file.
typedef struct
UINT8
UINT16
UINT8
UINT8
UINT8
INT16
const struct
const struct
const struct
INT8 *
http_request {
method;
reply;
numheaders;
numparams;
numrespheaders;
fd;
http_method * methods;
webpage * website;
header_rec * headers;
bufstart; /* first free space */
UINT8
Http_Hdr
Http_Hdr
Http_Params
Http_Auth
INT8
INT8
} Http_Request;
extraheader;
rqstheaders[HTTP_MAX_HEADERS];
respheaders[HTTP_MAX_HEADERS];
params[HTTP_MAX_PARAMS];
*AuthParams;/*Used only in HTTP
CRAM-MD5 Authentication*/
buffer[HTTP_REQUEST_BUF];
keepalive;
The http_request structure includes two other structures, http_hdr
and http_params, as shown in the following segment from the http.h
header file.
RM00411401-1211
How to Use HTTP