Source code of Windows XP (NT5)
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.

136 lines
4.5 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. RM_FEC_INFO FECInfo;
  59. };
  60. } tPGM_MCAST_REQUEST;
  61. #define FSCTL_PGM_BASE FILE_DEVICE_NETWORK
  62. #define _PGM_CTRL_CODE(function, method, access) \
  63. CTL_CODE(FSCTL_PGM_BASE, function, method, access)
  64. // Ioctls:
  65. #define IOCTL_PGM_WSH_SET_SEND_IF \
  66. _PGM_CTRL_CODE( 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
  67. #define IOCTL_PGM_WSH_ADD_RECEIVE_IF \
  68. _PGM_CTRL_CODE( 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
  69. #define IOCTL_PGM_WSH_DEL_RECEIVE_IF \
  70. _PGM_CTRL_CODE( 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
  71. #define IOCTL_PGM_WSH_JOIN_MCAST_LEAF \
  72. _PGM_CTRL_CODE( 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
  73. #define IOCTL_PGM_WSH_SET_RCV_BUFF_LEN \
  74. _PGM_CTRL_CODE( 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
  75. #define IOCTL_PGM_WSH_SET_WINDOW_SIZE_RATE \
  76. _PGM_CTRL_CODE( 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
  77. #define IOCTL_PGM_WSH_QUERY_WINDOW_SIZE_RATE \
  78. _PGM_CTRL_CODE( 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
  79. #define IOCTL_PGM_WSH_SET_ADVANCE_WINDOW_RATE \
  80. _PGM_CTRL_CODE( 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
  81. #define IOCTL_PGM_WSH_QUERY_ADVANCE_WINDOW_RATE \
  82. _PGM_CTRL_CODE( 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
  83. #define IOCTL_PGM_WSH_SET_LATE_JOINER_PERCENTAGE \
  84. _PGM_CTRL_CODE( 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
  85. #define IOCTL_PGM_WSH_QUERY_LATE_JOINER_PERCENTAGE \
  86. _PGM_CTRL_CODE( 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
  87. #define IOCTL_PGM_WSH_SET_NEXT_MESSAGE_BOUNDARY \
  88. _PGM_CTRL_CODE( 11, METHOD_BUFFERED, FILE_ANY_ACCESS)
  89. #define IOCTL_PGM_WSH_QUERY_SENDER_STATS \
  90. _PGM_CTRL_CODE( 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
  91. #define IOCTL_PGM_WSH_USE_FEC \
  92. _PGM_CTRL_CODE( 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
  93. #define IOCTL_PGM_WSH_SET_MCAST_TTL \
  94. _PGM_CTRL_CODE( 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
  95. #define IOCTL_PGM_WSH_QUERY_FEC_INFO \
  96. _PGM_CTRL_CODE( 15, METHOD_BUFFERED, FILE_ANY_ACCESS)
  97. #define IOCTL_PGM_WSH_QUERY_RECEIVER_STATS \
  98. _PGM_CTRL_CODE( 16, METHOD_BUFFERED, FILE_ANY_ACCESS)
  99. #define IOCTL_PGM_WSH_SET_WINDOW_ADVANCE_METHOD \
  100. _PGM_CTRL_CODE( 17, METHOD_BUFFERED, FILE_ANY_ACCESS)
  101. #define IOCTL_PGM_WSH_QUERY_WINDOW_ADVANCE_METHOD \
  102. _PGM_CTRL_CODE( 18, METHOD_BUFFERED, FILE_ANY_ACCESS)
  103. #endif /* _RMCOMMON_H_ */