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.

101 lines
3.0 KiB

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