Counter Strike : Global Offensive Source Code
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.

166 lines
3.9 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef CSERSERVERPROTOCOL_ENGINE_H
  7. #define CSERSERVERPROTOCOL_ENGINE_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. // NOTE: These defined must match the ones in Steam's CSERServerProtocol.h!!!
  12. #define C2M_REPORT_GAMESTATISTICS 'k'
  13. #define C2M_REPORT_GAMESTATISTICS_PROTOCOL_VERSION_1 1
  14. #define C2M_REPORT_GAMESTATISTICS_PROTOCOL_VERSION 2
  15. typedef enum
  16. {
  17. GS_UNKNOWN = 0,
  18. GS_NO_UPLOAD,
  19. GS_UPLOAD_REQESTED,
  20. // Must be last
  21. GS_NUM_TYPES
  22. } EGameStatsEnum;
  23. // C2M_REPORT_GAMESTATISTICS details (OLD VERSION)
  24. // u8(C2M_REPORT_GAMESTATISTICS_PROTOCOL_VERSION_1)
  25. // u32(build_number)
  26. // string( exename )
  27. // string( gamedir )
  28. // string( mapname )
  29. // u32 requested upload data length
  30. // C2M_REPORT_GAMESTATISTICS details (current version)
  31. // u8(C2M_REPORT_GAMESTATISTICS_PROTOCOL_VERSION)
  32. // u32(appID)
  33. // u32 requested upload data length
  34. #define M2C_ACKREPORT_GAMESTATISTICS 'l'
  35. // M2C_ACKREPORT_GAMESTATISTICS details
  36. // u8(protocol okay (bool))
  37. // u8(GS_NO_UPLOAD or GS_UPLOAD_REQESTED )
  38. // iff GS_UPLOAD_REQESTED then add:
  39. // u32(harvester ip address)
  40. // u16(harvester port #)
  41. // u32(upload context id)
  42. #define C2M_PHONEHOME 'm'
  43. #define C2M_PHONEHOME_PROTOCOL_VERSION 3
  44. // C2M_PHONEHOME
  45. // u8( C2M_PHONEHOME_PROTOCOL_VERSION )
  46. // u32( sessionid ) or 0 to request a new sessionid
  47. // u16(encryptedlength)
  48. // remainder = encrypteddata:
  49. // u8 corruption id == 1
  50. // string build unique id
  51. // string computername
  52. // string username
  53. // string gamedir
  54. // float( enginetimestamp )
  55. // u8 messagetype:
  56. // 1: engine startup
  57. // 2: engine shutdown
  58. // 3: map started + mapname
  59. // 4: map finished + mapname
  60. // string( mapname )
  61. #define M2C_ACKPHONEHOME 'n'
  62. // M2C_ACKPHONEHOME details
  63. // u8(connection allowed (bool))
  64. // u32(sessionid)
  65. #define C2M_BUGREPORT 'o'
  66. #define C2M_BUGREPORT_PROTOCOL_VERSION 3
  67. // C2M_BUGREPORT details
  68. // u8(C2M_BUGREPORT_PROTOCOL_VERSION)
  69. // u16(encryptedlength)
  70. // remainder=encrypteddata
  71. // encrypted payload:
  72. // byte corruptionid = 1
  73. // u32(buildnumber)
  74. // string(exename 64)
  75. // string(gamedir 64)
  76. // string(mapname 64)
  77. // u32 RAM
  78. // u32 CPU
  79. // string(processor)
  80. // u32 DXVerHigh
  81. // u32 DXVerLow
  82. // u32 DXVendorID
  83. // u32 DXDeviceID
  84. // string(OSVer)
  85. // Version 2+:
  86. // {
  87. // reporttype(char 32)
  88. // email(char 80)
  89. // accountname(char 80)
  90. // }
  91. // Version 3+
  92. // {
  93. // userid( sizeof( TSteamGlobalUserID ) )
  94. // }
  95. // --- all versions
  96. // string(title 128)
  97. // u32(.zip file size, or 0 if none available)
  98. // u32(text length > max 1024)
  99. // text(descriptive text -- capped to text length bytes)
  100. #define M2C_ACKBUGREPORT 'p'
  101. typedef enum
  102. {
  103. BR_UNKNOWN = 0,
  104. BR_NO_FILES,
  105. BR_REQEST_FILES,
  106. // Must be last
  107. BR_NUM_TYPES
  108. } EBugReportAckEnum;
  109. // M2C_ACKBUGREPORT details
  110. // u8(protocol okay (bool))
  111. // u8(BR_NO_FILES or BR_REQEST_FILES )
  112. // iff BR_REQEST_FILES then add:
  113. // u32(harvester ip address)
  114. // u16(harvester port #)
  115. // u32(upload context id)
  116. // Arbitrary encrypted data upload
  117. #define C2M_UPLOADDATA 'q'
  118. #define C2M_UPLOADDATA_PROTOCOL_VERSION 1
  119. #define C2M_UPLOADDATA_DATA_VERSION 1
  120. // C2M_BUGREPORT details
  121. // u8(C2M_UPLOADDATA_PROTOCOL_VERSION)
  122. // u16(encryptedlength)
  123. // remainder=encrypteddata
  124. // encrypted payload:
  125. // byte(corruptionid)
  126. // byte(protocolid) // C2M_UPLOADDATA_DATA_VERSION
  127. // string(tablename 40)
  128. // u8(numvalues)
  129. // for each value:
  130. // string(fieldname 32)
  131. // string(value 128)
  132. #define M2C_ACKUPLOADDATA 'r'
  133. // M2C_ACKUPLOADDATA details
  134. // u8(protocol okay (bool))
  135. #endif // CSERSERVERPROTOCOL_ENGINE_H