4 * Defines for the FastCGI protocol.
7 * Copyright (c) 1995-1996 Open Market, Inc.
9 * See the file "LICENSE.TERMS" for information on usage and redistribution
10 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12 * $Id: fastcgi.h,v 1.1.1.1 2003/10/18 09:54:10 weigon Exp $
19 * Listening socket file number
21 #define FCGI_LISTENSOCK_FILENO 0
24 unsigned char version
;
26 unsigned char requestIdB1
;
27 unsigned char requestIdB0
;
28 unsigned char contentLengthB1
;
29 unsigned char contentLengthB0
;
30 unsigned char paddingLength
;
31 unsigned char reserved
;
34 #define FCGI_MAX_LENGTH 0xffff
37 * Number of bytes in a FCGI_Header. Future versions of the protocol
38 * will not reduce this number.
40 #define FCGI_HEADER_LEN 8
43 * Value for version component of FCGI_Header
45 #define FCGI_VERSION_1 1
48 * Values for type component of FCGI_Header
50 #define FCGI_BEGIN_REQUEST 1
51 #define FCGI_ABORT_REQUEST 2
52 #define FCGI_END_REQUEST 3
58 #define FCGI_GET_VALUES 9
59 #define FCGI_GET_VALUES_RESULT 10
60 #define FCGI_UNKNOWN_TYPE 11
61 #define FCGI_MAXTYPE (FCGI_UNKNOWN_TYPE)
64 * Value for requestId component of FCGI_Header
66 #define FCGI_NULL_REQUEST_ID 0
73 unsigned char reserved
[5];
74 } FCGI_BeginRequestBody
;
78 FCGI_BeginRequestBody body
;
79 } FCGI_BeginRequestRecord
;
82 * Mask for flags component of FCGI_BeginRequestBody
84 #define FCGI_KEEP_CONN 1
87 * Values for role component of FCGI_BeginRequestBody
89 #define FCGI_RESPONDER 1
90 #define FCGI_AUTHORIZER 2
95 unsigned char appStatusB3
;
96 unsigned char appStatusB2
;
97 unsigned char appStatusB1
;
98 unsigned char appStatusB0
;
99 unsigned char protocolStatus
;
100 unsigned char reserved
[3];
101 } FCGI_EndRequestBody
;
105 FCGI_EndRequestBody body
;
106 } FCGI_EndRequestRecord
;
109 * Values for protocolStatus component of FCGI_EndRequestBody
111 #define FCGI_REQUEST_COMPLETE 0
112 #define FCGI_CANT_MPX_CONN 1
113 #define FCGI_OVERLOADED 2
114 #define FCGI_UNKNOWN_ROLE 3
118 * Variable names for FCGI_GET_VALUES / FCGI_GET_VALUES_RESULT records
120 #define FCGI_MAX_CONNS "FCGI_MAX_CONNS"
121 #define FCGI_MAX_REQS "FCGI_MAX_REQS"
122 #define FCGI_MPXS_CONNS "FCGI_MPXS_CONNS"
127 unsigned char reserved
[7];
128 } FCGI_UnknownTypeBody
;
132 FCGI_UnknownTypeBody body
;
133 } FCGI_UnknownTypeRecord
;
135 #endif /* _FASTCGI_H */