fastcgi_base.pp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. unit fastcgi_base;
  2. interface
  3. {
  4. Automatically converted by H2Pas 0.99.16 from fastcgi.h
  5. The following command line parameters were used:
  6. fastcgi.h
  7. }
  8. {$IFDEF FPC}
  9. {$PACKRECORDS C}
  10. {$ENDIF}
  11. {
  12. * Listening socket file number
  13. }
  14. const
  15. FCGI_LISTENSOCK_FILENO = 0;
  16. type
  17. PFCGI_Header = ^FCGI_Header;
  18. FCGI_Header = record
  19. version : byte;
  20. reqtype : byte;
  21. requestIdB1 : byte;
  22. requestIdB0 : byte;
  23. contentLengthB1 : byte;
  24. contentLengthB0 : byte;
  25. paddingLength : byte;
  26. reserved : byte;
  27. end;
  28. {
  29. * Number of bytes in a FCGI_Header. Future versions of the protocol
  30. * will not reduce this number.
  31. }
  32. const
  33. FCGI_HEADER_LEN = 8;
  34. {
  35. * Value for version component of FCGI_Header
  36. }
  37. FCGI_VERSION_1 = 1;
  38. {
  39. * Values for type component of FCGI_Header
  40. }
  41. FCGI_BEGIN_REQUEST = 1;
  42. FCGI_ABORT_REQUEST = 2;
  43. FCGI_END_REQUEST = 3;
  44. FCGI_PARAMS = 4;
  45. FCGI_STDIN = 5;
  46. FCGI_STDOUT = 6;
  47. FCGI_STDERR = 7;
  48. FCGI_DATA = 8;
  49. FCGI_GET_VALUES = 9;
  50. FCGI_GET_VALUES_RESULT = 10;
  51. FCGI_UNKNOWN_TYPE = 11;
  52. FCGI_MAXTYPE = FCGI_UNKNOWN_TYPE;
  53. {
  54. * Value for requestId component of FCGI_Header
  55. }
  56. FCGI_NULL_REQUEST_ID = 0;
  57. type
  58. FCGI_BeginRequestBody = record
  59. roleB1 : byte;
  60. roleB0 : byte;
  61. flags : byte;
  62. reserved : array[0..4] of byte;
  63. end;
  64. FCGI_BeginRequestRecord = record
  65. header : FCGI_Header;
  66. body : FCGI_BeginRequestBody;
  67. end;
  68. {
  69. * Mask for flags component of FCGI_BeginRequestBody
  70. }
  71. const
  72. FCGI_KEEP_CONN = 1;
  73. {
  74. * Values for role component of FCGI_BeginRequestBody
  75. }
  76. FCGI_RESPONDER = 1;
  77. FCGI_AUTHORIZER = 2;
  78. FCGI_FILTER = 3;
  79. type
  80. FCGI_EndRequestBody = record
  81. appStatusB3 : byte;
  82. appStatusB2 : byte;
  83. appStatusB1 : byte;
  84. appStatusB0 : byte;
  85. protocolStatus : byte;
  86. reserved : array[0..2] of byte;
  87. end;
  88. FCGI_EndRequestRecord = record
  89. header : FCGI_Header;
  90. body : FCGI_EndRequestBody;
  91. end;
  92. {
  93. * Values for protocolStatus component of FCGI_EndRequestBody
  94. }
  95. const
  96. FCGI_REQUEST_COMPLETE = 0;
  97. FCGI_CANT_MPX_CONN = 1;
  98. FCGI_OVERLOADED = 2;
  99. FCGI_UNKNOWN_ROLE = 3;
  100. {
  101. * Variable names for FCGI_GET_VALUES / FCGI_GET_VALUES_RESULT records
  102. }
  103. FCGI_MAX_CONNS = 'FCGI_MAX_CONNS';
  104. FCGI_MAX_REQS = 'FCGI_MAX_REQS';
  105. FCGI_MPXS_CONNS = 'FCGI_MPXS_CONNS';
  106. type
  107. FCGI_UnknownTypeBody = record
  108. _type : byte;
  109. reserved : array[0..6] of byte;
  110. end;
  111. FCGI_UnknownTypeRecord = record
  112. header : FCGI_Header;
  113. body : FCGI_UnknownTypeBody;
  114. end;
  115. implementation
  116. end.