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.

90 lines
3.2 KiB

  1. /*
  2. ** wspgm.h - winsock extension 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) 1995-2000 Microsoft Corporation
  8. **
  9. ** Created: Mar 12, 2000
  10. **
  11. */
  12. #ifndef _WSPGM_H_
  13. #define _WSPGM_H_
  14. #define IPPROTO_RM 113
  15. //
  16. // options for setsockopt, getsockopt
  17. //
  18. #define RM_OPTIONSBASE 1000
  19. // Set/Query rate (Kb/Sec) + window size (Kb and/or MSec) -- described by RM_SEND_WINDOW below
  20. #define RM_RATE_WINDOW_SIZE (RM_OPTIONSBASE + 1)
  21. // Set the size of the next message -- (ULONG)
  22. #define RM_SET_MESSAGE_BOUNDARY (RM_OPTIONSBASE + 2)
  23. // flush the entire data (window) right now
  24. #define RM_FLUSHCACHE (RM_OPTIONSBASE + 3)
  25. // receiver side: discard the partial message and start over
  26. #define RM_FLUSHMESSAGE (RM_OPTIONSBASE + 4)
  27. // get sender statistics
  28. #define RM_SENDER_STATISTICS (RM_OPTIONSBASE + 5)
  29. // allow a late-joiner to NAK any packet upto the lowest sequence Id
  30. #define RM_LATEJOIN (RM_OPTIONSBASE + 6)
  31. // set IP multicast outgoing interface
  32. #define RM_SET_SEND_IF (RM_OPTIONSBASE + 7)
  33. // add IP multicast incoming interface
  34. #define RM_ADD_RECEIVE_IF (RM_OPTIONSBASE + 8)
  35. // delete IP multicast incoming interface
  36. #define RM_DEL_RECEIVE_IF (RM_OPTIONSBASE + 9)
  37. // Set/Query the Window's Advance rate (has to be less that MAX_WINDOW_INCREMENT_PERCENTAGE)
  38. #define RM_SEND_WINDOW_ADV_RATE (RM_OPTIONSBASE + 10)
  39. #define SENDER_DEFAULT_RATE_KB_PER_SEC 56 // 56 Kb/Sec
  40. #define SENDER_DEFAULT_WINDOW_SIZE_BYTES 10 *1000*1000 // 10 Megs
  41. #define SENDER_MAX_WINDOW_SIZE_BYTES 100*1000*1000 // 100 Megs
  42. #define SENDER_DEFAULT_WINDOW_ADV_PERCENTAGE 15 // 15%
  43. #define MAX_WINDOW_INCREMENT_PERCENTAGE 25 // 25%
  44. #define SENDER_DEFAULT_LATE_JOINER_PERCENTAGE 50 // 50%
  45. #define SENDER_MAX_LATE_JOINER_PERCENTAGE 75 // 75%
  46. typedef struct _RM_SEND_WINDOW
  47. {
  48. ULONG RateKbPerSec; // Send rate
  49. ULONG WindowSizeInMSecs;
  50. ULONG WindowSizeInBytes;
  51. } RM_SEND_WINDOW;
  52. typedef struct _RM_SENDER_STATS
  53. {
  54. ULONGLONG DataBytesSent; // # client data bytes sent out so far
  55. ULONGLONG TotalBytesSent; // SPM, OData and RData bytes
  56. ULONGLONG NaksReceived; // # NAKs received so far
  57. ULONGLONG NaksReceivedTooLate; // # NAKs recvd after window advanced
  58. ULONGLONG NumOutstandingNaks; // # NAKs yet to be responded to
  59. ULONGLONG NumNaksAfterRData; // # NAKs yet to be responded to
  60. ULONGLONG RepairPacketsSent; // # Repairs (RDATA) sent so far
  61. // ULONGLONG NumMessagesDropped; // # partial messages dropped
  62. ULONGLONG TrailingEdgeSeqId; // smallest (oldest) Sequence Id in the window
  63. ULONGLONG LeadingEdgeSeqId; // largest (newest) Sequence Id in the window
  64. } RM_SENDER_STATS;
  65. //
  66. // Pgm options
  67. //
  68. #endif /* _WSPGM_H_ */