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.

143 lines
5.0 KiB

  1. /*
  2. ** RmCommon.h - Driver/Winsock common for PGM Reliable Transport
  3. **
  4. ** This file contains PGM specific information for use by WinSock2 compatible
  5. ** applications that need Reliable Multicast Transport.
  6. **
  7. ** Copyright (c) Microsoft Corporation. All rights reserved.
  8. **
  9. ** Created: Mar 12, 2000
  10. **
  11. */
  12. #ifndef _RMCOMMON_H_
  13. #define _RMCOMMON_H_
  14. #include "wsrm.h"
  15. #define SOCK_PGM SOCK_RDM
  16. typedef ULONG tIPADDRESS;
  17. #define PGM_COMMON_SERVICE_FLAGS XP1_GUARANTEED_ORDER \
  18. | XP1_GUARANTEED_DELIVERY \
  19. | XP1_SUPPORT_MULTIPOINT \
  20. | XP1_GRACEFUL_CLOSE \
  21. | XP1_IFS_HANDLES
  22. #define PGM_RDM_SERVICE_FLAGS PGM_COMMON_SERVICE_FLAGS | XP1_MESSAGE_ORIENTED
  23. #define PGM_STREAM_SERVICE_FLAGS PGM_COMMON_SERVICE_FLAGS | XP1_PSEUDO_STREAM
  24. //
  25. // Argument structure for passing requests from WHSPgm.dll to Pgm.dll
  26. //
  27. //
  28. // Ioctl Definitions:
  29. //
  30. //
  31. // Structure for passing MCast info to Ip
  32. //
  33. typedef struct {
  34. tIPADDRESS MCastIpAddr; // struct in_addr imr_multiaddr -- IP multicast address of group
  35. tIPADDRESS MCastInIf; // struct in_addr imr_interface -- local IP address of incoming interface
  36. } tMCAST_INFO;
  37. //
  38. // Structure to be used for passing down Ioctl info:
  39. //
  40. typedef struct {
  41. union
  42. {
  43. struct
  44. {
  45. tMCAST_INFO MCastInfo;
  46. USHORT MCastPort;
  47. };
  48. RM_SENDER_STATS SenderStats;
  49. RM_RECEIVER_STATS ReceiverStats;
  50. ULONG RcvBufferLength; // To set the RcvBufferLength in Pgm
  51. tIPADDRESS MCastOutIf; // local IP address of outgoing interface
  52. RM_SEND_WINDOW TransmitWindowInfo;
  53. ULONG WindowAdvancePercentage; // Sender's transmit window advance rate
  54. ULONG LateJoinerPercentage; // Sender's transmit window advance rate
  55. ULONG NextMessageBoundary;
  56. ULONG MCastTtl;
  57. ULONG WindowAdvanceMethod;
  58. ULONG HighSpeedIntranetOptimization;
  59. RM_FEC_INFO FECInfo;
  60. };
  61. } tPGM_MCAST_REQUEST;
  62. #define FSCTL_PGM_BASE FILE_DEVICE_NETWORK
  63. #define _PGM_CTRL_CODE(function, method, access) \
  64. CTL_CODE(FSCTL_PGM_BASE, function, method, access)
  65. // Ioctls:
  66. #define IOCTL_PGM_WSH_SET_SEND_IF \
  67. _PGM_CTRL_CODE( 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
  68. #define IOCTL_PGM_WSH_ADD_RECEIVE_IF \
  69. _PGM_CTRL_CODE( 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
  70. #define IOCTL_PGM_WSH_DEL_RECEIVE_IF \
  71. _PGM_CTRL_CODE( 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
  72. #define IOCTL_PGM_WSH_JOIN_MCAST_LEAF \
  73. _PGM_CTRL_CODE( 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
  74. #define IOCTL_PGM_WSH_SET_RCV_BUFF_LEN \
  75. _PGM_CTRL_CODE( 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
  76. #define IOCTL_PGM_WSH_SET_WINDOW_SIZE_RATE \
  77. _PGM_CTRL_CODE( 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
  78. #define IOCTL_PGM_WSH_QUERY_WINDOW_SIZE_RATE \
  79. _PGM_CTRL_CODE( 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
  80. #define IOCTL_PGM_WSH_SET_ADVANCE_WINDOW_RATE \
  81. _PGM_CTRL_CODE( 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
  82. #define IOCTL_PGM_WSH_QUERY_ADVANCE_WINDOW_RATE \
  83. _PGM_CTRL_CODE( 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
  84. #define IOCTL_PGM_WSH_SET_LATE_JOINER_PERCENTAGE \
  85. _PGM_CTRL_CODE( 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
  86. #define IOCTL_PGM_WSH_QUERY_LATE_JOINER_PERCENTAGE \
  87. _PGM_CTRL_CODE( 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
  88. #define IOCTL_PGM_WSH_SET_NEXT_MESSAGE_BOUNDARY \
  89. _PGM_CTRL_CODE( 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
  90. #define IOCTL_PGM_WSH_QUERY_SENDER_STATS \
  91. _PGM_CTRL_CODE( 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
  92. #define IOCTL_PGM_WSH_USE_FEC \
  93. _PGM_CTRL_CODE( 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
  94. #define IOCTL_PGM_WSH_SET_MCAST_TTL \
  95. _PGM_CTRL_CODE( 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
  96. #define IOCTL_PGM_WSH_QUERY_FEC_INFO \
  97. _PGM_CTRL_CODE( 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
  98. #define IOCTL_PGM_WSH_QUERY_RECEIVER_STATS \
  99. _PGM_CTRL_CODE( 16, METHOD_BUFFERED, FILE_ANY_ACCESS)
  100. #define IOCTL_PGM_WSH_SET_WINDOW_ADVANCE_METHOD \
  101. _PGM_CTRL_CODE( 17, METHOD_BUFFERED, FILE_ANY_ACCESS)
  102. #define IOCTL_PGM_WSH_QUERY_WINDOW_ADVANCE_METHOD \
  103. _PGM_CTRL_CODE( 18, METHOD_BUFFERED, FILE_ANY_ACCESS)
  104. #define IOCTL_PGM_WSH_SET_HIGH_SPEED_INTRANET_OPT \
  105. _PGM_CTRL_CODE( 19, METHOD_BUFFERED, FILE_ANY_ACCESS)
  106. #define IOCTL_PGM_WSH_QUERY_HIGH_SPEED_INTRANET_OPT \
  107. _PGM_CTRL_CODE( 20, METHOD_BUFFERED, FILE_ANY_ACCESS)
  108. #endif /* _RMCOMMON_H_ */