File indexing completed on 2025-01-17 09:55:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _FASTCGI_H
0016 #define _FASTCGI_H
0017
0018
0019
0020
0021 #define FCGI_LISTENSOCK_FILENO 0
0022
0023 typedef struct {
0024 unsigned char version;
0025 unsigned char type;
0026 unsigned char requestIdB1;
0027 unsigned char requestIdB0;
0028 unsigned char contentLengthB1;
0029 unsigned char contentLengthB0;
0030 unsigned char paddingLength;
0031 unsigned char reserved;
0032 } FCGI_Header;
0033
0034 #define FCGI_MAX_LENGTH 0xffff
0035
0036
0037
0038
0039
0040 #define FCGI_HEADER_LEN 8
0041
0042
0043
0044
0045 #define FCGI_VERSION_1 1
0046
0047
0048
0049
0050 #define FCGI_BEGIN_REQUEST 1
0051 #define FCGI_ABORT_REQUEST 2
0052 #define FCGI_END_REQUEST 3
0053 #define FCGI_PARAMS 4
0054 #define FCGI_STDIN 5
0055 #define FCGI_STDOUT 6
0056 #define FCGI_STDERR 7
0057 #define FCGI_DATA 8
0058 #define FCGI_GET_VALUES 9
0059 #define FCGI_GET_VALUES_RESULT 10
0060 #define FCGI_UNKNOWN_TYPE 11
0061 #define FCGI_MAXTYPE (FCGI_UNKNOWN_TYPE)
0062
0063
0064
0065
0066 #define FCGI_NULL_REQUEST_ID 0
0067
0068
0069 typedef struct {
0070 unsigned char roleB1;
0071 unsigned char roleB0;
0072 unsigned char flags;
0073 unsigned char reserved[5];
0074 } FCGI_BeginRequestBody;
0075
0076 typedef struct {
0077 FCGI_Header header;
0078 FCGI_BeginRequestBody body;
0079 } FCGI_BeginRequestRecord;
0080
0081
0082
0083
0084 #define FCGI_KEEP_CONN 1
0085
0086
0087
0088
0089 #define FCGI_RESPONDER 1
0090 #define FCGI_AUTHORIZER 2
0091 #define FCGI_FILTER 3
0092
0093
0094 typedef struct {
0095 unsigned char appStatusB3;
0096 unsigned char appStatusB2;
0097 unsigned char appStatusB1;
0098 unsigned char appStatusB0;
0099 unsigned char protocolStatus;
0100 unsigned char reserved[3];
0101 } FCGI_EndRequestBody;
0102
0103 typedef struct {
0104 FCGI_Header header;
0105 FCGI_EndRequestBody body;
0106 } FCGI_EndRequestRecord;
0107
0108
0109
0110
0111 #define FCGI_REQUEST_COMPLETE 0
0112 #define FCGI_CANT_MPX_CONN 1
0113 #define FCGI_OVERLOADED 2
0114 #define FCGI_UNKNOWN_ROLE 3
0115
0116
0117
0118
0119
0120 #define FCGI_MAX_CONNS "FCGI_MAX_CONNS"
0121 #define FCGI_MAX_REQS "FCGI_MAX_REQS"
0122 #define FCGI_MPXS_CONNS "FCGI_MPXS_CONNS"
0123
0124
0125 typedef struct {
0126 unsigned char type;
0127 unsigned char reserved[7];
0128 } FCGI_UnknownTypeBody;
0129
0130 typedef struct {
0131 FCGI_Header header;
0132 FCGI_UnknownTypeBody body;
0133 } FCGI_UnknownTypeRecord;
0134
0135 #endif
0136