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.

78 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1987-1999 Microsoft Corporation
  3. Module Name:
  4. vcsndrcv.h
  5. Abstract:
  6. This is the include file that defines all constants and types for VC
  7. (Virtual Circuit) related Send/Receive/INitialization etc.
  8. Notes:
  9. --*/
  10. #ifndef _VCSNDRCV_H_
  11. #define _VCSNDRCV_H_
  12. // The connection oriented transport to a server can utilize multiple VC's to
  13. // acheive better throughput to a server. It is for this reason that the
  14. // VC transport data structure is built around multiple VC's. Howvever this
  15. // feature is not utilized currently.
  16. //
  17. // Though the SMB protocol permits multiple number of VC's to be associated with
  18. // a particular connection to a share, the data transfer of data is done in the
  19. // raw mode. In this mode of operation the SMB protocol does not permit multiple
  20. // outstanding requests. In the SMB protocol a number of requests can be multiplexed
  21. // along a connection to the server There are certain kind of requests which can
  22. // be completed on the client, i.e., no acknowledgement is neither expected nor
  23. // received. In these cases the send call is completed synchronoulsy. On the
  24. // other hand there is a second class of sends which cannot be resumed locally
  25. // till the appropriate acknowledgement is recieved from the server. In such
  26. // cases a list of requests is built up with each VC. On receipt of the appropriate
  27. // acknowledgement these requests are resumed.
  28. //
  29. typedef enum _SMBCE_VC_STATE_ {
  30. SMBCE_VC_STATE_MULTIPLEXED,
  31. SMBCE_VC_STATE_RAW,
  32. SMBCE_VC_STATE_DISCONNECTED,
  33. } SMBCE_VC_STATE, *PSMBCE_VC_STATE;
  34. typedef struct _SMBCE_VC {
  35. SMBCE_OBJECT_HEADER; // the struct header
  36. RXCE_VC RxCeVc;
  37. NTSTATUS Status; // Status of the VC.
  38. } SMBCE_VC, *PSMBCE_VC;
  39. typedef struct SMBCE_SERVER_VC_TRANSPORT {
  40. SMBCE_SERVER_TRANSPORT; // Anonymous struct for common fields
  41. RXCE_CONNECTION RxCeConnection; // the connection handle
  42. LARGE_INTEGER Delay; // the estimated delay on the connection
  43. ULONG MaximumNumberOfVCs;
  44. SMBCE_VC Vcs[1]; // Vcs associated with the connection.
  45. } SMBCE_SERVER_VC_TRANSPORT, *PSMBCE_SERVER_VC_TRANSPORT;
  46. #define VctReferenceVc(pVc) \
  47. InterlockedIncrement(&(pVc)->SwizzleCount)
  48. #define VctReferenceVcLite(pVc) \
  49. ASSERT(SmbCeSpinLockAcquired()); \
  50. (pVc)->SwizzleCount++
  51. #define VctDereferenceVc(pVc) \
  52. InterlockedDecrement(&(pVc)->SwizzleCount)
  53. #define VctDereferenceVcLite(pVc) \
  54. ASSERT(SmbCeSpinLockAcquired()); \
  55. (pVc)->SwizzleCount--
  56. #endif // _VCSNDRCV_H_