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.

82 lines
2.9 KiB

  1. /*++ BUILD Version: 0009 // Increment this if a change has global effects
  2. Copyright (c) 1987-1993 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. Revision History:
  9. Balan Sethu Raman (SethuR) 06-Mar-95 Created
  10. Notes:
  11. --*/
  12. #ifndef _VCSNDRCV_H_
  13. #define _VCSNDRCV_H_
  14. // The connection oriented transport to a server can utilize multiple VC's to
  15. // acheive better throughput to a server. It is for this reason that the
  16. // VC transport data structure is built around multiple VC's. Howvever this
  17. // feature is not utilized currently.
  18. //
  19. // Though the SMB protocol permits multiple number of VC's to be associated with
  20. // a particular connection to a share, the data transfer of data is done in the
  21. // raw mode. In this mode of operation the SMB protocol does not permit multiple
  22. // outstanding requests. In the SMB protocol a number of requests can be multiplexed
  23. // along a connection to the server There are certain kind of requests which can
  24. // be completed on the client, i.e., no acknowledgement is neither expected nor
  25. // received. In these cases the send call is completed synchronoulsy. On the
  26. // other hand there is a second class of sends which cannot be resumed locally
  27. // till the appropriate acknowledgement is recieved from the server. In such
  28. // cases a list of requests is built up with each VC. On receipt of the appropriate
  29. // acknowledgement these requests are resumed.
  30. //
  31. typedef enum _SMBCE_VC_STATE_ {
  32. SMBCE_VC_STATE_MULTIPLEXED,
  33. SMBCE_VC_STATE_RAW,
  34. SMBCE_VC_STATE_DISCONNECTED,
  35. } SMBCE_VC_STATE, *PSMBCE_VC_STATE;
  36. typedef struct _SMBCE_VC {
  37. SMBCE_OBJECT_HEADER; // the struct header
  38. RXCE_VC RxCeVc;
  39. NTSTATUS Status; // Status of the VC.
  40. } SMBCE_VC, *PSMBCE_VC;
  41. typedef struct SMBCE_SERVER_VC_TRANSPORT {
  42. SMBCE_SERVER_TRANSPORT; // Anonymous struct for common fields
  43. RXCE_CONNECTION RxCeConnection; // the connection handle
  44. LARGE_INTEGER Delay; // the estimated delay on the connection
  45. ULONG MaximumNumberOfVCs;
  46. SMBCE_VC Vcs[1]; // Vcs associated with the connection.
  47. } SMBCE_SERVER_VC_TRANSPORT, *PSMBCE_SERVER_VC_TRANSPORT;
  48. #define VctReferenceVc(pVc) \
  49. InterlockedIncrement(&(pVc)->SwizzleCount)
  50. #define VctReferenceVcLite(pVc) \
  51. ASSERT(SmbCeSpinLockAcquired()); \
  52. (pVc)->SwizzleCount++
  53. #define VctDereferenceVc(pVc) \
  54. InterlockedDecrement(&(pVc)->SwizzleCount)
  55. #define VctDereferenceVcLite(pVc) \
  56. ASSERT(SmbCeSpinLockAcquired()); \
  57. (pVc)->SwizzleCount--
  58. #endif // _VCSNDRCV_H_