Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
2.7 KiB

  1. /********************************************************************/
  2. /** Copyright(c) 1989 Microsoft Corporation. **/
  3. /********************************************************************/
  4. //***
  5. //
  6. // Filename: ioctl.h
  7. //
  8. // Description: Contains the security function prototypes and
  9. // defintion of AFP_REQUEST_PACKET data structure.
  10. //
  11. // History:
  12. // May 11,1992. NarenG Created original version.
  13. //
  14. #ifndef _IOCTL_
  15. #define _IOCTL_
  16. // This is the size of the buffer sent to the FSD to enumerate entities.
  17. //
  18. #define AFP_INITIAL_BUFFER_SIZE 4096
  19. // This value in a heuristic to calculate the amount of memory required to
  20. // hold all enumerated entities. This value represents the avg size of all
  21. // entities.
  22. //
  23. #define AFP_AVG_STRUCT_SIZE 512
  24. // Id's of the various API types
  25. //
  26. typedef enum _AFP_API_TYPE {
  27. AFP_API_TYPE_COMMAND,
  28. AFP_API_TYPE_SETINFO,
  29. AFP_API_TYPE_DELETE,
  30. AFP_API_TYPE_GETINFO,
  31. AFP_API_TYPE_ENUM,
  32. AFP_API_TYPE_ADD
  33. } AFP_API_TYPE;
  34. typedef struct _AFP_REQUEST_PACKET {
  35. // Command code
  36. //
  37. DWORD dwRequestCode;
  38. AFP_API_TYPE dwApiType;
  39. union {
  40. struct {
  41. PVOID pInputBuf;
  42. DWORD cbInputBufSize;
  43. DWORD dwParmNum;
  44. } SetInfo;
  45. struct {
  46. PVOID pInputBuf;
  47. DWORD cbInputBufSize;
  48. } Add;
  49. struct {
  50. PVOID pInputBuf;
  51. // This parameter will be set to indicate the maximum amount of
  52. // data that may be returned to the client.
  53. // -1 indicates all available data.
  54. //
  55. DWORD cbInputBufSize;
  56. PVOID pOutputBuf;
  57. DWORD cbOutputBufSize;
  58. DWORD cbTotalBytesAvail;
  59. } GetInfo;
  60. struct {
  61. // Will be pointer to an output buffer for Enum calls
  62. //
  63. PVOID pOutputBuf;
  64. // This parameter will be set to indicate the maximum amount of
  65. // data that may be returned to the client.
  66. // -1 indicates all available data.
  67. //
  68. DWORD cbOutputBufSize;
  69. DWORD dwEntriesRead;
  70. // Will contain the total number of entries available from the
  71. // current position (pointed to by dwResumeHandle)
  72. //
  73. DWORD dwTotalAvail;
  74. // This information will get sent to the FSD as the Enum
  75. // request packet.
  76. //
  77. ENUMREQPKT EnumRequestPkt;
  78. } Enum;
  79. struct {
  80. // Will point to structure representing the entity to be
  81. // closed, deleted or removed.
  82. //
  83. PVOID pInputBuf;
  84. DWORD cbInputBufSize;
  85. } Delete;
  86. } Type;
  87. } AFP_REQUEST_PACKET, *PAFP_REQUEST_PACKET;
  88. // Function prototypes
  89. //
  90. DWORD
  91. AfpServerIOCtrl(
  92. PAFP_REQUEST_PACKET pAfpSrp
  93. );
  94. DWORD
  95. AfpServerIOCtrlGetInfo(
  96. PAFP_REQUEST_PACKET pAfpSrp
  97. );
  98. #endif // ifndef _IOCTL_