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.

109 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. smbadmin.h
  5. Abstract:
  6. This module implements the SMB's that need to be exchanged to facilitate
  7. bookkeeping at the server
  8. Author:
  9. Balan Sethu Raman [SethuR] 7-March-1995
  10. Revision History:
  11. Notes;
  12. In the normal course of events a TreeId/UserId which translates into a Share/Session instance
  13. is required to send a SMB to the server. In terms of the local data structures it translates
  14. to a SMBCEDB_SERVER_ENTRY/SMBCEDB_SESSION_ENTRY/SMBCEDB_NET_ROOT_ENTRY. However, there are a
  15. few exceptions to this rule in which one or more of the fields in not required. These are
  16. normally used during connection establishment/connection tear down and connection state
  17. maintenance.
  18. All these SMB's have been grouped together in the implementation of SMB_ADMIN_EXCHANGE which
  19. is derived from SMB_EXCHANGE. All NEGOTIATE,LOG_OFF,DISCONNECT and ECHO SMB are sent
  20. using this type of exchange. The important factor that distinguishes the SMB_ADMIN_EXCHANGE
  21. from regular exchanges is the way the state of the exchange is manipulated to take into
  22. account the specialized requirements of each of the above mentioned commands.
  23. --*/
  24. #ifndef _SMBADMIN_H_
  25. #define _SMBADMIN_H_
  26. #include <smbxchng.h>
  27. typedef struct _SMB_ADMIN_EXCHANGE_ {
  28. SMB_EXCHANGE;
  29. ULONG SmbBufferLength;
  30. PVOID pSmbBuffer;
  31. PMDL pSmbMdl;
  32. PSMBCE_RESUMPTION_CONTEXT pResumptionContext;
  33. union {
  34. struct {
  35. PMRX_SRV_CALL pSrvCall;
  36. UNICODE_STRING DomainName;
  37. PMDL pSecurityBlobMdl;
  38. } Negotiate;
  39. struct {
  40. UCHAR DisconnectSmb[TRANSPORT_HEADER_SIZE +
  41. sizeof(SMB_HEADER) +
  42. sizeof(REQ_TREE_DISCONNECT)];
  43. } Disconnect;
  44. struct {
  45. UCHAR LogOffSmb[TRANSPORT_HEADER_SIZE +
  46. sizeof(SMB_HEADER) +
  47. sizeof(REQ_LOGOFF_ANDX)];
  48. } LogOff;
  49. struct {
  50. PMDL pEchoProbeMdl;
  51. ULONG EchoProbeLength;
  52. } EchoProbe;
  53. };
  54. } SMB_ADMIN_EXCHANGE, *PSMB_ADMIN_EXCHANGE;
  55. PSMB_EXCHANGE
  56. SmbResetServerEntryNegotiateExchange(
  57. PSMBCEDB_SERVER_ENTRY pServerEntry);
  58. PSMB_EXCHANGE
  59. SmbResetServerEntryNegotiateExchange(
  60. PSMBCEDB_SERVER_ENTRY pServerEntry);
  61. extern SMB_EXCHANGE_DISPATCH_VECTOR AdminExchangeDispatch;
  62. extern NTSTATUS
  63. SmbCeNegotiate(
  64. PSMBCEDB_SERVER_ENTRY pServerEntry,
  65. PMRX_SRV_CALL pSrvCall,
  66. BOOLEAN RemoteBootSession);
  67. extern NTSTATUS
  68. SmbCeDisconnect(
  69. PSMBCE_V_NET_ROOT_CONTEXT pNetRootEntry);
  70. extern NTSTATUS
  71. SmbCeLogOff(
  72. PSMBCEDB_SERVER_ENTRY pServerEntry,
  73. PSMBCEDB_SESSION_ENTRY pSessionEntry);
  74. extern NTSTATUS
  75. SmbCeSendEchoProbe(
  76. PSMBCEDB_SERVER_ENTRY pServerEntry,
  77. PMRXSMB_ECHO_PROBE_SERVICE_CONTEXT pEchoProbeContext);
  78. #endif // _SMBADMIN_H_
  79. 
  80.