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.

126 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. mailslot.c
  5. Abstract:
  6. This module implements the routines needed to process incoming mailslot
  7. requests.
  8. Author:
  9. Larry Osterman (larryo) 18-Oct-1991
  10. Revision History:
  11. 18-Oct-1991 larryo
  12. Created
  13. --*/
  14. #ifndef _MAILSLOT_
  15. #define _MAILSLOT_
  16. //
  17. // The MAILSLOTBUFFER structure is a structure that is prepended to a mailslot
  18. // message to facilitate the transfer of the data between the FSD and the FSP.
  19. //
  20. typedef struct _MAILSLOT_BUFFER {
  21. CSHORT Signature;
  22. CSHORT Size;
  23. union {
  24. LIST_ENTRY NextBuffer; // Pointer to next buffer.
  25. WORK_QUEUE_ITEM WorkHeader; // Executive Worker item header.
  26. } Overlay;
  27. ULONG BufferSize;
  28. LARGE_INTEGER TimeReceived; // Time message was received
  29. ULONG ClientIpAddress; // IP Address of client sending datagram
  30. PTRANSPORT_NAME TransportName; // Transport address receiving DG
  31. CHAR ClientAddress[max(NETBIOS_NAME_LEN, SMB_IPX_NAME_LENGTH)]; // Name of client initiating receive.
  32. ULONG ReceiveLength; // # of bytes received.
  33. CHAR Buffer[1]; // Buffer
  34. } MAILSLOT_BUFFER, *PMAILSLOT_BUFFER;
  35. extern ULONG BowserNetlogonMaxMessageCount;
  36. //
  37. // Two services get their PNP messages through the bowser.
  38. //
  39. #define BROWSER_PNP 0
  40. #define NETLOGON_PNP 1
  41. #define BOWSER_PNP_COUNT 2
  42. NTSTATUS
  43. BowserEnablePnp (
  44. IN PLMDR_REQUEST_PACKET InputBuffer,
  45. IN ULONG ServiceIndex
  46. );
  47. NTSTATUS
  48. BowserReadPnp (
  49. IN PIRP Irp,
  50. IN ULONG OutputBufferLength,
  51. IN ULONG ServiceIndex
  52. );
  53. VOID
  54. BowserSendPnp(
  55. IN NETLOGON_PNP_OPCODE NlPnpOpcode,
  56. IN PUNICODE_STRING HostedDomainName OPTIONAL,
  57. IN PUNICODE_STRING TransportName,
  58. IN ULONG TransportFlags
  59. );
  60. VOID
  61. BowserNetlogonDeleteTransportFromMessageQueue (
  62. PTRANSPORT Transport
  63. );
  64. VOID
  65. BowserProcessMailslotWrite (
  66. IN PVOID WorkHeader
  67. );
  68. PMAILSLOT_BUFFER
  69. BowserAllocateMailslotBuffer(
  70. IN PTRANSPORT_NAME TransportName,
  71. IN ULONG BufferSize
  72. );
  73. VOID
  74. BowserFreeMailslotBuffer(
  75. IN PMAILSLOT_BUFFER Buffer
  76. );
  77. VOID
  78. BowserFreeMailslotBufferHighIrql(
  79. IN PMAILSLOT_BUFFER Buffer
  80. );
  81. VOID
  82. BowserpInitializeMailslot (
  83. VOID
  84. );
  85. VOID
  86. BowserpUninitializeMailslot (
  87. VOID
  88. );
  89. #endif // _MAILSLOT_