2 * $Id: fcgi_protocol.h,v 1.1 1999/02/09 03:08:02 roberts Exp $
5 #ifndef FCGI_PROTOCOL_H
6 #define FCGI_PROTOCOL_H
9 * Listening socket file number
11 #define FCGI_LISTENSOCK_FILENO 0
14 unsigned char version
;
16 unsigned char requestIdB1
;
17 unsigned char requestIdB0
;
18 unsigned char contentLengthB1
;
19 unsigned char contentLengthB0
;
20 unsigned char paddingLength
;
21 unsigned char reserved
;
24 #define FCGI_MAX_LENGTH 0xffff
27 * Number of bytes in a FCGI_Header. Future versions of the protocol
28 * will not reduce this number.
30 #define FCGI_HEADER_LEN 8
33 * Value for version component of FCGI_Header
35 #define FCGI_VERSION_1 1
38 * Current version of the FastCGI protocol
40 #define FCGI_VERSION FCGI_VERSION_1
43 * Values for type component of FCGI_Header
45 #define FCGI_BEGIN_REQUEST 1
46 #define FCGI_ABORT_REQUEST 2
47 #define FCGI_END_REQUEST 3
53 #define FCGI_GET_VALUES 9
54 #define FCGI_GET_VALUES_RESULT 10
55 #define FCGI_UNKNOWN_TYPE 11
56 #define FCGI_MAXTYPE (FCGI_UNKNOWN_TYPE)
59 * Value for requestId component of FCGI_Header
61 #define FCGI_NULL_REQUEST_ID 0
68 unsigned char reserved
[5];
69 } FCGI_BeginRequestBody
;
73 FCGI_BeginRequestBody body
;
74 } FCGI_BeginRequestRecord
;
77 * Mask for flags component of FCGI_BeginRequestBody
79 #define FCGI_KEEP_CONN 1
82 * Values for role component of FCGI_BeginRequestBody
84 #define FCGI_RESPONDER 1
85 #define FCGI_AUTHORIZER 2
90 unsigned char appStatusB3
;
91 unsigned char appStatusB2
;
92 unsigned char appStatusB1
;
93 unsigned char appStatusB0
;
94 unsigned char protocolStatus
;
95 unsigned char reserved
[3];
96 } FCGI_EndRequestBody
;
100 FCGI_EndRequestBody body
;
101 } FCGI_EndRequestRecord
;
104 * Values for protocolStatus component of FCGI_EndRequestBody
106 #define FCGI_REQUEST_COMPLETE 0
107 #define FCGI_CANT_MPX_CONN 1
108 #define FCGI_OVERLOADED 2
109 #define FCGI_UNKNOWN_ROLE 3
113 * Variable names for FCGI_GET_VALUES / FCGI_GET_VALUES_RESULT records
115 #define FCGI_MAX_CONNS "FCGI_MAX_CONNS"
116 #define FCGI_MAX_REQS "FCGI_MAX_REQS"
117 #define FCGI_MPXS_CONNS "FCGI_MPXS_CONNS"
122 unsigned char reserved
[7];
123 } FCGI_UnknownTypeBody
;
127 FCGI_UnknownTypeBody body
;
128 } FCGI_UnknownTypeRecord
;
130 #endif /* FCGI_PROTOCOL_H */