Leaked source code of windows server 2003
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.

103 lines
2.7 KiB

  1. #ifndef _FSANTFY_
  2. #define _FSANTFY_
  3. // fsantfy.h
  4. //
  5. // This header file has the definitions needed for recall notification
  6. //
  7. //
  8. // The name of the mailslot, created by the client, that notification messages are sent to
  9. //
  10. #define WSB_MAILSLOT_NAME L"HSM_MAILSLOT"
  11. //
  12. // The following messages will be sent between the FSA and the recall notification client
  13. //
  14. //
  15. // Request to identify yourself
  16. //
  17. typedef struct wsb_identify_req {
  18. WCHAR fsaName[MAX_COMPUTERNAME_LENGTH + 1]; // Name of machine that FSA is on
  19. ULONG holdOff; // Wait period before attempting ID response (milliseconds)
  20. } WSB_IDENTIFY_REQ, *PWSB_IDENTIFY_REQ;
  21. //
  22. // Recall notification message
  23. //
  24. typedef struct wsb_notify_recall {
  25. WCHAR fsaName[MAX_COMPUTERNAME_LENGTH + 1]; // Name of server the FSA is on
  26. LONGLONG fileSize; // Size of file being recalled
  27. HSM_JOB_STATE state; // Job state
  28. GUID identifier; // ID of this recall
  29. //
  30. // TBD - need more information here (or make them get it via recall object) ??
  31. //
  32. } WSB_NOTIFY_RECALL, *PWSB_NOTIFY_RECALL;
  33. typedef union wsb_msg {
  34. WSB_IDENTIFY_REQ idrq;
  35. WSB_NOTIFY_RECALL ntfy;
  36. } WSB_MSG, *PWSB_MSG;
  37. typedef struct wsb_mailslot_msg {
  38. ULONG msgType;
  39. ULONG msgCount;
  40. WSB_MSG msg;
  41. } WSB_MAILSLOT_MSG, *PWSB_MAILSLOT_MSG;
  42. //
  43. // msgType values
  44. //
  45. #define WSB_MSG_IDENTIFY 1
  46. #define WSB_MSG_NOTIFY 2
  47. //
  48. // Holdoff increment (milliseconds)
  49. //
  50. #define WSB_HOLDOFF_INCREMENT 300
  51. //
  52. // The following message is sent by the notification client via a named pipe
  53. // in response to a identification request.
  54. //
  55. typedef struct wsb_identify_rep {
  56. WCHAR clientName[MAX_COMPUTERNAME_LENGTH + 1]; // Name of server that notification client is on
  57. } WSB_IDENTIFY_REP, *PWSB_IDENTIFY_REP;
  58. typedef union wsb_pmsg {
  59. WSB_IDENTIFY_REP idrp;
  60. } WSB_PMSG, *PWSB_PMSG;
  61. typedef struct wsb_pipe_msg {
  62. ULONG msgType;
  63. WSB_PMSG msg;
  64. } WSB_PIPE_MSG, *PWSB_PIPE_MSG;
  65. //
  66. // msgType values
  67. //
  68. #define WSB_PMSG_IDENTIFY 1
  69. //
  70. // FSA pipe name used for identification response
  71. //
  72. #define WSB_PIPE_NAME L"HSM_PIPE"
  73. //
  74. // Pipe defines
  75. //
  76. #define WSB_MAX_PIPES 32 // Bug 558180: limit the number of concurrent instances such that
  77. // malicious clients cannot drain the server resources
  78. #define WSB_PIPE_BUFF_SIZE sizeof(WSB_PIPE_MSG)
  79. #define WSB_PIPE_TIME_OUT 5000
  80. #endif // _FSANTFY_