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 $
14 * License: Open Market License (OML)
15 * https://fedoraproject.org/wiki/Licensing/Open_Market_License (LICENSE.TERMS)
22 * Listening socket file number
24 #define FCGI_LISTENSOCK_FILENO 0
27 unsigned char version
;
29 unsigned char requestIdB1
;
30 unsigned char requestIdB0
;
31 unsigned char contentLengthB1
;
32 unsigned char contentLengthB0
;
33 unsigned char paddingLength
;
34 unsigned char reserved
;
37 #define FCGI_MAX_LENGTH 0xffff
40 * Number of bytes in a FCGI_Header. Future versions of the protocol
41 * will not reduce this number.
43 #define FCGI_HEADER_LEN 8
46 * Value for version component of FCGI_Header
48 #define FCGI_VERSION_1 1
51 * Values for type component of FCGI_Header
53 #define FCGI_BEGIN_REQUEST 1
54 #define FCGI_ABORT_REQUEST 2
55 #define FCGI_END_REQUEST 3
61 #define FCGI_GET_VALUES 9
62 #define FCGI_GET_VALUES_RESULT 10
63 #define FCGI_UNKNOWN_TYPE 11
64 #define FCGI_MAXTYPE (FCGI_UNKNOWN_TYPE)
67 * Value for requestId component of FCGI_Header
69 #define FCGI_NULL_REQUEST_ID 0
76 unsigned char reserved
[5];
77 } FCGI_BeginRequestBody
;
81 FCGI_BeginRequestBody body
;
82 } FCGI_BeginRequestRecord
;
85 * Mask for flags component of FCGI_BeginRequestBody
87 #define FCGI_KEEP_CONN 1
90 * Values for role component of FCGI_BeginRequestBody
92 #define FCGI_RESPONDER 1
93 #define FCGI_AUTHORIZER 2
98 unsigned char appStatusB3
;
99 unsigned char appStatusB2
;
100 unsigned char appStatusB1
;
101 unsigned char appStatusB0
;
102 unsigned char protocolStatus
;
103 unsigned char reserved
[3];
104 } FCGI_EndRequestBody
;
108 FCGI_EndRequestBody body
;
109 } FCGI_EndRequestRecord
;
112 * Values for protocolStatus component of FCGI_EndRequestBody
114 #define FCGI_REQUEST_COMPLETE 0
115 #define FCGI_CANT_MPX_CONN 1
116 #define FCGI_OVERLOADED 2
117 #define FCGI_UNKNOWN_ROLE 3
121 * Variable names for FCGI_GET_VALUES / FCGI_GET_VALUES_RESULT records
123 #define FCGI_MAX_CONNS "FCGI_MAX_CONNS"
124 #define FCGI_MAX_REQS "FCGI_MAX_REQS"
125 #define FCGI_MPXS_CONNS "FCGI_MPXS_CONNS"
130 unsigned char reserved
[7];
131 } FCGI_UnknownTypeBody
;
135 FCGI_UnknownTypeBody body
;
136 } FCGI_UnknownTypeRecord
;
138 #endif /* _FASTCGI_H */